Index in position 1 exceeds array bounds (must not exceed 8).

1 view (last 30 days)
this is my error:
Index in position 1 exceeds array bounds (must not exceed 8).
Error in descriptor_PHOG (line 54)
bh_roi = bh(roi(1,1):roi(2,1),roi(3,1):roi(4,1));

Answers (1)

Jan
Jan on 22 Mar 2019
I do not know, which of the variables is "your image". That is is "binary" does not concern the problem.
Because roi is used with indices 1 to 4 only, but the error message mentions 8 as limit, the problem is the size of bh. This means, that at least one of the elements of:
roi(1,1):roi(2,1)
is larger than 8, but bh has 8 rows only.
The forum cannot guess how to fix this based on the posted code.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!