spmallick / learnopencv

Learn OpenCV : C++ and Python Examples
https://www.learnopencv.com/
20.68k stars 11.52k forks source link

Exception ERROR in ColorSpaces: interactiveColorDetect.cpp #780

Open PrimusSPS opened 1 year ago

PrimusSPS commented 1 year ago

Current code throw an exception error when cursor is moved in the "placeholder" area. It can be fixed by updating the if condition on line 12:

FROM: LINE 12: if( event == EVENT_MOUSEMOVE)

TO: LINE 12: if( event == EVENT_MOUSEMOVE and (x<img.rows and y<img.cols))