kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Color histogram matching and GrabCut segmentation in Labview with OpenCV

Klemen
Active Participant

Yet again I will post two algorithms based on openCV and built as a DLL library (along with c++ source code and labview vi), that are useful (at least I found them useful in my projects), but  not included in the NI Vision libraries:

- color histogram matching and

- grabcut segmentation.

I really like labview for its simplicity and some really good vision functions/libraries. I also love openCV because it includes so many good up to date computer vision algorithms. In my opinion, the combination between labview vision and openCV is an excellent and formidable beast, that can accomplish almost anything.

I hope that someone finds this (and similar) posts useful for their projects. Beats starting from scratch anyways. Code is compiled with VS2010 x86 and OpenCV 2.4.5. Add  "...\opencv\build\x86\vc10\bin" to system path or recompile the source code yourself.

Examples of segmentation:

original1.jpgsegmented1.jpg

original2.jpgsegmented2.jpg

original3.jpgsegmented3.jpg

Example of histogram comparison:

original.jpg

                                   ORIGINAL IMAGE

original_light.jpgoriginal_dark.jpg

                              LIGHTER IMAGE                                                                                     DARKER IMAGE

Comparison results:

original image VS original image -> correlation = 1

original image VS lighter image -> correlation = 0.139762

original image VS darker image -> correlation = 0.192917

Be creative.

Best regards,

K



https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Download All
Comments