how can i detect a square shape in a jpg imgae?

1 view (last 30 days)
i want to detect a white coloured square in an image having green background. how can i do this task?

Answers (1)

Image Analyst
Image Analyst on 24 Apr 2013
No hough transform needed. Assuming it's nice, perfect computer graphics, just look at the red or blue channel and threshold.
redChannel = rgbImage(:, :, 1);
binaryImage = redChannel < 128;
You can post your image if you want.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!