Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ColorSpaces/interactiveColorDetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mat img, placeholder;
// Callback function for any event on he mouse
void onMouse( int event, int x, int y, int flags, void* userdata )
{
if( event == EVENT_MOUSEMOVE )
if( event == EVENT_MOUSEMOVE and (x<img.rows and y<img.cols))
{

Vec3b bgrPixel(img.at<Vec3b>(y, x));
Expand Down Expand Up @@ -102,4 +102,4 @@ int main( int argc, const char** argv )
}
}
return 0;
}
}