Vb.net Identify how much specific colors in an image - vb.net

is there a vb.net code to identify how much specific color(brown,yellow,green) in an image? Like I have an image of a leaf and i want to identify how much yellow colors, brown colors and green colors of that image so i can have a result that either the leaf is:
dead-ALMOST BROWN
healthy-ALL GREEN
unhealthy-YELLOWISH
Do i need to convert the image first to other types like bitmap/threshold ?
DO you have any reference for this? Thanks a Lot in advance

Related

How to add two images together (green screen system) in LabVIEW

I have two images, one with subject and other one with background. The subject image has green background and I want to remove the green color from subject and add the subject without green color to another background, basically changing the background of one picture with another in LabVIEW without C code or MATLAB code, only using LabVIEW blocks.
So far, I got the following, but I am not getting one thing how to remove a very small portion of pixels. How to solve this problem,
So your algorithm is to replace a pixel, when red - blue =0 in the first place.
This condition is true for all this colors:
While there is no magenta in the picture, there is some almost black below the elbow and some almost white at the hand. So, that's replaced.
Try to restrict the colors to be replaced more, maybe like this:
Also, I'd to this independently for red and blue. So, for example
green > A AND red < B AND blue < C AND green-red > D AND green-blue > E
Since one of your files is names "final lec final.vi", I'd stop here ;-)
Oh, and just for fun: Playing with brightness and contrast reveals the JPEG artifacts, which is one part of the problem:

Coreldraw Multiple Contours in VBA

Guys I Am trying to set up a three colour text that is editable
Basically what I want is the text to be black
A 1st contour of 1mm that is white
a 2nd contour of 2mm thick which is black
I have tried the following 2 step contour
ActiveSelection.CreateContour cdrContourOutside, 2, 2, , , CreateRGBColor(0, 0, 0), CreateRGBColor(255, 255, 255)
this works perfectly as I want and when I edit the text the contour changes to the new text however the contours are both the same width (2mm) and not 1 & 2mm as i want
Also I cant get it to specify the correct color for each contour
If I break apart the 1st contour then add another this gives me contours of different widths and colors but I then loose the edit ability as the contour is not attached to the text
Any Ideas I Know its possible as I have seen a commercial macro that does it
Any Help appreciated
Mark
The best I can do for you is to show you the object model. I do not have CorelDraw and therefore cannot test anything.
Here is the link to the CorelDraw Object Model.
http://apps.corel.com/partners_developers/csp/resources/CorelDRAW%20VBA%20Object%20Model.pdf
And here is a link to a Programming Guide for CorelDraw.
http://apps.corel.com/partners_developers/csp/resources/dvba_pg.pdf
You can look up "Applying Effects" on page 72 of the programming guide which may help.
I would suggest also looking at creating curves from the .Shapes object and then looking at the TextRange object. the TextRange.Text property is the actual text you want to see and the TextRange.colorindex is the color of the text I believe. You will have to do some exploring, but this should help.

Convert colored line in Bitmap image to System.Drawing.Graphics

is there any way to convert a colored lines in a picture (say Path Lines in Google Earth, colored red ) into lines of Drawable objects (System.Drawing.Graphics)? If there is no direct way, please point me to the right directions on how to do this?
Basically I want to convert those 3 red lines in the image into 3 red line objects in VB.NET through code. Thanks.

Excel userform label different color text

I am creating a userform in Excel, I have a Label with a large amount of text in. I need to have certain words in Bold and in Red color and the rest in standard black.
I can change the whole text color in the properties but not just certain words.
Is this possible and if so how would I do it?
Select certain word and fill with BOLD or make it RED
Also this depends on your Excel Version, I using Excel 2013
I do believe that it isn't possible..
You'll have to create different Labels in order to change only certain parts of your text color.

Forming a specific colour filled shape in powerpoint when importing a data from excel cell

I am a beginner in programming. I know how to import a data from excel to powerpoint in such a way that when I change the data in the cells in excel, the corresponding datas in the powerpoint changes as well.
But is there a way to create a specific shape (with specific colours) in powerpoint automatically for a range of data imported from excel.
For example, if I type the number 1 in excel, it should go to powerpoint as well and a square box with the colour green should be formed in power point slide with the number 1 in it.
If number 2, then yellow
and number 3 red
Any help would be deeply appreciated! Thanks in advance!
Without your code it is not possible to give you an example. I would look at
Add shape:
http://msdn.microsoft.com/en-us/library/office/ff744336%28v=office.15%29.aspx
Once you have the shape, you can color it, add text etc, see:
http://msdn.microsoft.com/en-us/library/office/ff744177%28v=office.15%29.aspx
Regards,
HP