rr1706 / vision2015

Computer vision solution for FRC 2015 game
https://rr1706.github.io/vision2015/
Other
5 stars 0 forks source link

Separating grey tote / green bin #5

Open cmastudios opened 9 years ago

cmastudios commented 9 years ago

An idea I just had would be having a user select a contour in the detected color image and having the program find a threshold that covers ~80% of the pixels in the contour while keeping it distinct from all other detected contours, for use during light-environment calibration. Otsu's thresholding allows one to separate a foreground and a background. @faust1706 could it be used here? Or maybe a routine to find the average color value across the contour and calculate lightness. Maybe it could remove the floor from a depth image?

H-Park commented 9 years ago

That actually has a very good chance of working. Try and implement it.

cmastudios commented 9 years ago

It doesn't look like it works for color, as the threshold function works only for grayscale. @faust1706 do you know how to work with it?

H-Park commented 9 years ago

I have never implemented otsu thresholding. I have really only reason the original paper on it and then Dr Yin said it can be used for image thresholding. Try cv::splitting the image and doing it per color channel maybe?