Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

distribution of color in 3d coordinates and diagonal of bounding box

$
0
0
As the title says I want to find the diagonal of bounding box of the ab-plane from an `RGB` to `CIELab` transformed image. I am not really sure how to achieve this but my fist idea is to get the distribution of color in 3d coordinates (how do I get that in 3d coordinates?) and then get a bounding box of that distribution from where I can extract the length of the diagonal (I don't know can I visualize this afterwards with the [viz module](http://docs.opencv.org/2.4/modules/viz/doc/viz3d.html), not that important though). Does anyone have any experience how to achieve that? Should I use histogram, EM (expectation maximization) and estimate color distribution with a gaussian mixture model, or to play with something simple like to find the mean and standard deviation of each channel? I searched a bit in the net but I couldn't find something straight forward. //Load the images Mat src = imread("image.png"); //Convert to Lab space and CV_32F1 Mat lab; cvtColor(src, lab, COLOR_BGR2Lab ); lab.convertTo(src_lab,CV_32FC1); // Split into individual channels vector channels; split( lab, channels ); then what.....?

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>