Ask Your Question
0

mat.hpp assert error at line 554

asked 2016-04-17 13:59:54 -0600

Lusine gravatar image

I have a loop and in the 240th step bgrPixel = frame.at<vec3b>(++rowCoord, ++colCoord); throws assert erroror at mat.hpp line 554

for (int rowCoord = 1; rowCoord <
> rowheight - 1; rowCoord++) for (int
> colCoord = 1; colCoord < colwidth - 1;
> colCoord++) { ///////////// //// /////
>                     frame.at<Vec3b>(Point(rowCoord,
> colCoord)) = black;
> 
>             }
>             if (counter == 239)
>             {
>                 int o = 0;
>             }
>             c
>             cout << counter << endl;
>             counter++;
>         }
edit retag flag offensive close merge delete

Comments

what kind of assert error?

just_trying_stuff gravatar imagejust_trying_stuff ( 2016-04-17 15:22:04 -0600 )edit

think of it; the assertion saved a kittens life.

berak gravatar imageberak ( 2016-04-17 15:58:49 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-04-17 15:54:46 -0600

berak gravatar image

updated 2016-04-17 15:56:41 -0600

this is a common trap, it must be either:

frame.at<Vec3b>(Point(col, row))

or

frame.at<Vec3b>(row, col)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-17 13:56:44 -0600

Seen: 114 times

Last updated: Apr 17 '16