MATLAB Answers

0

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

Asked by IP student ;( on 22 Mar 2019 at 9:36
Latest activity Answered by Jan
on 22 Mar 2019 at 13:39
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));

  2 Comments

Check the sizes of each variable.....

Sign in to comment.

Tags

1 Answer

Answer by Jan
on 22 Mar 2019 at 13:39

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.

  0 Comments

Sign in to comment.