Madhubalan Posted June 3, 2013 Report Posted June 3, 2013 Hi, How to extract and calculate dominant color in an image,using this dominant color of an image,how to create color mask image.I have attached an example image of an screw.If anyone can provide me with an algorithm for color mask image,it would be helpful. Thank you MADHUBALAN Quote
ShaunR Posted June 3, 2013 Report Posted June 3, 2013 (edited) Well. The dominant colour is grey Edited June 3, 2013 by ShaunR 1 Quote
Madhubalan Posted June 3, 2013 Author Report Posted June 3, 2013 Hi shaun R, can you please breif me,How you calculated grey is a dominant color,is there any formula or method to calculate it. Thanks MADHUBALAN Quote
ShaunR Posted June 3, 2013 Report Posted June 3, 2013 (edited) Hi shaun R, can you please breif me,How you calculated grey is a dominant color,is there any formula or method to calculate it. Thanks MADHUBALAN It was a joke. It is a grey-scale image, therefore it can only be grey Edited June 3, 2013 by ShaunR Quote
Madhubalan Posted June 3, 2013 Author Report Posted June 3, 2013 Hi shaun R, No,it is a color image. Regards MADHUBALAN Quote
ShaunR Posted June 3, 2013 Report Posted June 3, 2013 Hi shaun R, No,it is a color image. Regards MADHUBALAN OK. Maybe you have taken a colour image, but you have taken a colour picture of a grey object against a grey background. The dominant colour will still be "GREY". A quick and dirty (although not foolproof) method is to just look at the mean of each colour component. A better but much more complicated method is to use K-means clustering. I don't know of any LabVIEW examples off-hand, but here is one you can translate from Python. Quote
Madhubalan Posted June 4, 2013 Author Report Posted June 4, 2013 OK. Maybe you have taken a colour image, but you have taken a colour picture of a grey object against a grey background. The dominant colour will still be "GREY". A quick and dirty (although not foolproof) method is to just look at the mean of each colour component. png histogram color.jpg png histogram color BD.jpg A better but much more complicated method is to use K-means clustering. I don't know of any LabVIEW examples off-hand, but here is one you can translate from Python. Hi shaunR, I will try this,can please send the vi file of png histogram color. Thank you Madhubalan Quote
hooovahh Posted June 4, 2013 Report Posted June 4, 2013 Hi shaunR, I will try this,can please send the vi file of png histogram color. Thank you Madhubalan It comes with the IMAQ toolkit I believe. Quote
Madhubalan Posted June 4, 2013 Author Report Posted June 4, 2013 It comes with the IMAQ toolkit I believe. Hi, Color mask and dominant color descriptor both options are not available in both labview and vision assistant.. It comes with the IMAQ toolkit I believe. Hi, if you could find both,can you please send me. Thanks MADHUBALAN Quote
Madhubalan Posted June 4, 2013 Author Report Posted June 4, 2013 OK. Maybe you have taken a colour image, but you have taken a colour picture of a grey object against a grey background. The dominant colour will still be "GREY". A quick and dirty (although not foolproof) method is to just look at the mean of each colour component. png histogram color.jpg png histogram color BD.jpg A better but much more complicated method is to use K-means clustering. I don't know of any LabVIEW examples off-hand, but here is one you can translate from Python. Hi, In the image you posted, finding the dominant color from RGB,but if to find first 10 or 20 or..dominant color in an image,how to find it?. Quote
hooovahh Posted June 4, 2013 Report Posted June 4, 2013 Hi, if you could find both,can you please send me. Thanks MADHUBALAN I don't think it's free but it comes with a trial. http://joule.ni.com/nidu/cds/view/p/id/2758/lang/en Quote
flintstone Posted June 5, 2013 Report Posted June 5, 2013 Give some more Information, what are the characteristics of your input picture, what result do you have to deliver. The additional toolkit will cost you money, somehow I don't think this is an option for you. Quote
Madhubalan Posted June 5, 2013 Author Report Posted June 5, 2013 Give some more Information, what are the characteristics of your input picture, what result do you have to deliver. The additional toolkit will cost you money, somehow I don't think this is an option for you. Hi, Thank you for the reply.For dominant color in an image and color mask image,my project is to find the object(screw) from the other objects,i am using the technique from a paper "Fast Object Detection Based on Color Histograms and Local Binary Patterns"http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6412323.In this paper they have to find the printer from other object,i have to find the screw instead of printer.In this paper,they are using few techniques,in which initial step is calculate color mask image show in fig 5. Thank you Madhubalan Quote
flintstone Posted June 5, 2013 Report Posted June 5, 2013 I guess I would try with bucket sorting the pixels. 2^24 buckets should not make a problem on a normal machine and bucket sorting is a very easy algorithm. Quote
Madhubalan Posted June 6, 2013 Author Report Posted June 6, 2013 (edited) I guess I would try with bucket sorting the pixels. 2^24 buckets should not make a problem on a normal machine and bucket sorting is a very easy algorithm. i am trying with k-means clustering... Edited June 6, 2013 by Madhubalan Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.