Here's what I would like to do:
I have two output of detected circle images, which is performed using two techniques from the given input image. One technique detected the circle accurately more than another one. So how to apply the metrics for this output? I am new to Python. Hence, I need help to resolve this.
Simply I encircled the output in the output image. But I need to show this performance in metrics format.
Related
I am working on detection of dental issues using thermography. I need to separate the all the given colours in the image into separate clusters (4-7 in number) so that the high-temperature zones (seen white in the image) are seen separately, which can be followed by thresholding if need be.
I am also attaching a sample of the images I will be working on. I am looking for a suitable program to carry out the execution in MATLAB.
I've already worked on the same, the program being attached in the previous question, which gives 3 clusters only.Since I'm a beginner, I need help in establishing more clusters.
image obtained using thermal camera on which clustering is to be carried out
the closest I could get to the sort of clustering I want to carry out. here, in this image green-blue cluster and white cluster are in the same image, which i want to have in separate clusters, hence the need of more clusters
expected result after clustering and thresholding
Rather than hoping that by chance clustering does what you need, I'd rather just use the ground truth you have...
In case you haven't noticed: there is a color index to the right. That is an easy to use, ordered (this is extremely beneficial over clustering, in particular to set thresholds) easy to detect key to interpreting these images without hoping on a random generator.
Note that you will likely also need to read off the numbers that give the color scale, in order to compare images.
You can read your image file in Matlab and then convert the data from RGB format to HSL or HSV with the function rgb2hsl() or rgb2hsv().
They are two alternative representations of the RGB color model. Then you can easily make your discrimination with the value of H which is abbreviated for hue.
For more information take a look at the following link: HLS and HSV
I want to identify all occurrences of a list of images in a screenshot and get the label of the emoji (e.g. "smile").
The list of images holds all emojis (full list):
and so on…
And this is the screenshot (show large):
The screenshots can have different resolutions and different heights where the emoji occur.
My ideas were:
Using OpenCV and a variety of filtering and iterate all emoji images over it (maybe using template matching)
Using neural networks like tensorflow, training your own model with the emojis
How would you do it ?
There are several classic ways to answer your problem:
Simple regular correlation: https://en.wikipedia.org/wiki/Cross-correlation.
The simple correlation is used when you have exactly the image you are looking for, with no change in intensity.
Normalized correlation (math behind template matching): https://en.wikipedia.org/wiki/Template_matching.
The simple correlation is used when you have exactly the image you are looking for, with no change in intensity.
If you have different intensities between your screenshot and your emoji base picture, you should use normalized correlation.
Both these methods will give you an image with peaks, and your emojis will be localized at the local maxima of this image.
As your emojis can be very similar to one another, you will have to use a threshold on the correlation image in order to discriminate between the emoji you are testing and the ones that look nearly like him.
This method can be time consuming, but can be easily speed-up by using an image pyramid.
An image pyramid is a set of image where the first one is your image, the second one is a subsampling of the first by a factor of 2, and so on:
https://en.wikipedia.org/wiki/Pyramid_(image_processing).
Then the correlation is applyed on the top level of the pyramid to find an approximate location, then on the top - 1 level around the approxiamte location and so on.
About the neural network, or other machine learning methods you want to try, they are really heavy solutions and you have a pretty simple problem, so you should normaly don't need them.
You have the exact picture you are looking for, without rotation, deformation or intensity change, and the template matching should be very effective.
I am new to Matlab and I would like to use Matlab to compare the following pictures and find out the differences between them.
Real picture:
Reference picture:
First, the system should match the real picture and the reference picture
Second, the system should match the modified picture with the reference picture and highlight out the differences.
Please advise on my doubt:
How can I match the similarity from two total different image? Should I selectively compare part of the both images? I have an idea using histogram and normalized to find out the peak match.
Thank you.
There are many things people do. This is an active research area called image matching.
Sometimes people do template matching. Which is to match the entire reference picture to the real picture at many locations and at many scales. You can read more about this particular technique here: http://en.wikipedia.org/wiki/Template_matching
I am looking for a C library that given an image of size x, it will split the image into multiple images so that I can send every subimage to a dedicated CPU to do detect segments on it using region growing or what ever.
Do you really want to split the image?
If you are using multi-core CPUs, it's better to load the image once, then run processing threads on it (I assume, the processing only reads the image) with x,y,width,height parameters.
If you have more hosts, there are a dispatcher, and it is doing several operations with the image: decompress, split, compress parts, transmit parts. I think, the processing hosts are on the same local network. If you can send the image to this local network as broadcast, I mean that all the hosts receives the image at once, it would be a performance gain: the displathcer has not to split and re-send parts, processing tasks should just pick the appropiate part of the whole image received (x,y,width,height). I don't know what image format are you using, but I'm pretty sure that you don't have to decompress the whole image, at least vertically you should skip unwanted regions. (You should split image to full-width regions avoid decompressing unneeded areas.)
Merging the results from the separate segmentation outputs will be the hard part. What if you happen to split right through a segment? You'd get a segment from each split image, and you'd have to merge them together. There will be uncertain cases, so you'll have to pick a metric to decide when to merge two regions.
If this is a concern, you might want to try out the Seam Carving algorithm to generate splits that aren't likely to intersect a region edge. Photoshop's Content-Aware Resize tool uses seam carving to find horizontal and vertical paths in an image that are not visually important.
As pointed by japresis merging the resulting segmentation results may be your hardest part.
If you are using graph-cut based image segmentation algorithm, you may augment your code with this approach that provides a principled way for performing parallel operations and combine them in an optimal way.
While agreeing with Shai and japreiss, and underlying that since your goal is image segmentation you'll have boundary issues (because you need neighborhood information), for the image manipulation part I'd suggest something like
libpng: http://www.libpng.org/pub/png/libpng.html
And take a look to these StackOverflow questions:
How to encode PNG to buffer using libpng?
Using libpng to "split" an image into segments (this isn't properly answered yet)
When you have your buffer filled with the image values, reading and writing portions of it should not be tricky at all.
I would like to generate the outlines/lines of an image.- I know you can use a laplacian filter to generate the outline image but I need to take it one step further. I want to actually receive an array of lines (that can consist of multiple line segments) descibing the image. Are there existing algorithms to do that? Do you have any ideas to get there from an outline image?
Thanks
As long as the lines are straight (or can be parametrized in an adequate way), you might use hough transform.