Hello,
I am looking for logic or suggestions regarding to access the or do various operations with selected rectangles from the image. for example in given image I am able to draw rectangle by using rectangle function but I want to convert the selected rectangle parts into gray scale or to find the non zero element values for it.
for (int i = 612; i >= 0; i = i-204)
{
cout << "i" << i << endl;
rectangle( roi1, Rect(i, 0, 161, 643), (255, 255,255), 2, 8, 0 );//add this line to draw contour on main screen
}
imshow( "Display window", roi1 );
Is there any suggestions how can I do so?
Thank you very much in advance.
Regards.