Weka Histogram (Black) - weka

Any idea why the histogram is in black colour?

The class attribute of your dataset (looks like the UCI automobile one) is numeric, not categorical. Only in the latter case will you see a colored in histogram.

Related

1D random black and white mask in Inkscape

I have been trying to create a random black and white mask like the following in Inkscape without success:
My nearest try has been to use black as initial color for the clones, 100% of change of color lightness for each column and alternate the sign of color changes. The result is this chessboard-like mask
The randomize option does not work because it randomizes the color property and not the "index" of the clone whose color is to be switched.
Note: Although my first approach was through the user interface, solutions using the scripting capabilities of Inskcape are also welcome.
I tried the following approach:
Make an original tile with undefined color (shown as ?)
Make a row of tiled clones, with initial color black, and 100% random light component. This will result in a row of random gray levels.
Group all the tiles together and select the group.
Apply the extension Color->Black & White to turn those grays into either black or white.

Detect Plants in a grass Image

I'm new in the Computer Vision.
I would like to detect some kind of plants in a grass images.
Original Image
Canny Edge Detection Algorithmus
Hough Line Transform (After Edge Detection)
I have already tried:
to remove the grass in the background with comparing th average of white pixels in a a region.
line detection with the hough line transform algorithm (the grass adds wrong lines)
What's in your opinion the best approach to detect this plant?
Dummy solution came in my mind. Since the grass is more detailed that the plant itself:
Apply Canny or any other edge detector.
Pass through the image using a window (let us say 10*10). For each window:
Compute the Density (number of white pixel if using Canny)
store it in array
Threshold the values in the array using Otsu algorithm. The less values represent the windows that are part of the plant.
Remap all needed window to the original picutre.
if a window is computed as not part of the object but in the same time it is surrouned by windows of the object, it is part of it.
Just for fun, and very similar to Humam's answer, just done using standard deviation instead of density, and making the image transparent where it doesn't think there are leaves. I used ImageMagick straight at the command line:
convert weed.jpg \( +clone -canny 0x1+10%+30% -statistic standarddeviation 10x10 -blur 0x8 -normalize -negate \) -compose copyopacity -composite result.png
I implemented Humam's approach.
But added some Steps after the Otsu algorithm:
Fulfill every black connected component
extract the mask with a matrix subtraction
Store the mask in a vector
sort it by area size (= sum(mask))
pick the biggest mask (=plant)
on the plant mask: do Step 1 -3 again
remove all small masks from the plant mask
I have some old and bad images from the plant, i'm going to test the algorithm the next days on these images.
unfortunately it's winter in my country and the grass is covered with snow. so i have to wait a couple of weeks to make some proper image from this plant.
Result of extraction.
The next step is to detect if the extracted image is the desired plant.

Detecting color range from "average" in OpenCV

Currently I am using a HaarCascade to detect a face in a picture. Which is working, I am getting a rect of where the face is.
Now I want to get the "average?" (skin color) in that rect. And use that as a base for the color range to search for other skin in the photo. How should I go about that?
I have found the inRange function, which searches for a color in a range. But I am not quite sure how I could get the average color of my skin in there. It seems that the inRange function needs HSV values? However, I don't know quite what that format is. It doesn't seem to be the same as HSB in photoshop. (Which I tried for "testing purposes").
My question boils down to this, how can I get the "average" color in a rect, and find other colours in that range (e.g, lighter and darker than that color, but the same shade).
Thanks.
Get the 3D color histogram within the detected region of interest. That is, not three 1D histograms for each channel, but one 3D histogram for all 3 channels together. OpenCV's calcHist has options for that. Here's an example which does that. This example is using Python bindings for OpenCV, but it shows how to set the parameters.
Also, set the range of the histogram within a reasonable range for skin color. As MSalters suggested in the comments, HSV is a better color space for things like this. Perhaps you can disregard the S and V channels and only do the 1D histogram for V. Try is out.
The bin with the highest count is going to be your "average" skin color.

How to Identify currency note using color?

How to use Open CV to detect the color of the currency note.I'm going to identify the currency note using the color.
You can calculate which color occurs the most in an image by using OpenCV's histogram function, then picking the highest value. Alternatively, you could rescale the image to 1x1 pixels and pick that color (which should be the average color).
However, identification using color alone is unlikely to give results that are precise enough for any use. American banknotes are all the same color, and it's not much better with Euro notes: a dirty €20 can be as gray as a €5 (and €200 and €100 are pretty similar).

Getting and comparing object's color from image

My aim is to determine the color of object. And make a classification, for example some blue, little bit dark blue or light blue can be classified to one type - Blue. I have some template objects images. There are many of them. What I want is to group this images manually. For example some objects have blue colored text, but some areas of yellow etc. By some algorithm at first I group them manually, and then each group should be analyzed by computer to make some feature extraction. And then while getting from camera as video or image of the random selected object, I want to identify it's group correctly. How can I do it? Which features should be extracted and how can they be compared? I was thinking of histogram of a Hue plane in HSV. But don't know what features to get from that histogram and then to compare it with another(from template images)
EDIT 1: Example of images that should be classified, later will post more if neccessary.
image example
It is always good to use the LAB color space in order to mimic human perception.
http://en.wikipedia.org/wiki/Lab_color_space
That is because the Euclidean metric in this color space represents the perceptual distance between colors, that is, how close they are.
You should cluster by A,B and ignore L value which is the brightness.
HSV can be tricky to use in varying light situations. This is especially true outside, where shadows are a lot bluer than sunlight areas.
Ideally, you can use the hue and saturation components and ignore the value component. This would make the distance between a light blue and a dark blue very small:
dist = sqrt((h1 - h2)^2 + (s1 - s2)^2
The gotcha is that hue is actually a continuous scale (like an angle). The difference between 255 and 0 should only be 1.