I need a suggestion how to convert the image in rectangle into a grayscale image.
I want to convert the rectangle around the tube to grayscale:
for (int i = 612; i >= 0; i = i-204)
{
cout << "i" << i << endl;
rectangle( OI, Rect(i, 0, 161, 643), 1, 2, 8, 0 );
}
imshow("Display window",OI);
I am using rectangle
function to draw rectangle.
Are there any suggestions for how can I convert the image in the rectangle into grayscale?