how to select certain shape from different images?

i have an image of star
and
I want to select a this shape from other different images that content star and other shapes
how to do that

7 Kommentare

Is the image of the star close enough to show sunspots? oblateness? Is the color fidelity quite good? Is the image available in multiple bands?
Stars usually only show up as dots in images; it is not easy to tell them apart, at least not unless you can capture the picture of some of the planetary nebula near them.
bym
bym am 28 Mai 2012
perhaps aboomnea meant a pentagram or other simple geometric shape
Geoff
Geoff am 28 Mai 2012
I'm sure Walter realised that. What he's saying is: "ask a good question, get a good answer"
Isee You
Isee You am 29 Mai 2012
thanks for u
proecsm said what i want to say
star is a simple shape
Isee You
Isee You am 29 Mai 2012
my star image is like this
http://www.surfling.org/darkstar/images/star.gif
and other image content small and large star image and other shape
http://www.mediafire.com/i/?c67bq9ox0n5kapv
and so other image
what i want is i want to select the all stars in this images
Your sample image is filled. Should only the (small) filled stars be selected, or should the large non-filled stars also be selected?
Some of the hollow stars are different aspect ratios (stretched more vertically); should those be found or only the ones with the same aspect ratio?
Is the task to be able to find portions of the image that match the given input image, or is the task to be able to match stars specifically?
Isee You
Isee You am 29 Mai 2012
i want to select the edges of the stars even star is small or large filled or non filled
only the out line of stars

Melden Sie sich an, um zu kommentieren.

Antworten (3)

Stephen
Stephen am 29 Mai 2012

0 Stimmen

haha, Walter :)
You can use the rucklidge algorithm. It relies on the haussdorf distance of a set of points, say the 10 points of your pentagram, and looks for a similar set of distances in all points of the target image. It takes a while sometimes, but it's pretty good.
You can also decompose the image with wavelets and look for similar signatures that way I've heard, but I can't help you build something like that. There may be something in the file exchange, like train a face recognizer to look for pentagrams or satanic faces.

1 Kommentar

Isee You
Isee You am 29 Mai 2012
my star image is like this
http://www.surfling.org/darkstar/images/star.gif
and other image content small and large star image and other shape
http://www.mediafire.com/i/?c67bq9ox0n5kapv
and so other image
what i want is i want to select the all stars in this images

Melden Sie sich an, um zu kommentieren.

Image Analyst
Image Analyst am 29 Mai 2012

0 Stimmen

I agree that it is a poorly phrased question that is so ambigous and open-ended as to make answering it have a high likelihood of wasting time. About all I can say, unless the poster posts an image or gives other additional information, is that this is a case of pattern recognition and there are thousands of ways to do that. You can go here http://iris.usc.edu/Vision-Notes/bibliography/contentspattern.html#Pattern%20Recognition,%20Clustering,%20Statistics,%20Grammars,%20Learning,%20Neural%20Nets,%20Genetic%20Algorithms for a list of them. The CBIR (content based image retrieval) community is involved heavily in this research right now, so you might look up CBIR methods. You might get your star by using nromxcorr2(), SURF, MSER, looking at the perimeter square to area ratio, or dozens of other ways depending on what your images look like. Sorry I can't explain all or any of them here - it would waste my time unless I know what kind of images you're dealing with.
Image Analyst
Image Analyst am 29 Mai 2012

0 Stimmen

For the images you have now provided, I'd recommend that you look at my image segmentation demo. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 Modify it to take the "solidity" - I think that will be enough to pick out just the stars. Basically it comes down to this process:
  1. extract the red channel: redChannel = rgbImage(:,:,1)
  2. threshold: binaryImage = redChannel > 128;
  3. call imfill: binaryImage = imfill(binaryImage , 'holes');
  4. call bwlabel and regionprops asking for solidity: regionprops(binaryImage, 'Solidity')
  5. filter out, using ismember, those blobs not having the require solidity values. See my demo.
My demo has everything you need. Give that a shot and let me know if you can't figure it out.

5 Kommentare

Isee You
Isee You am 29 Mai 2012
thanks
1 . at first i work with gray images . My real project work with liver . i develop algorithm to isolate the liver from CRT image but my algorithm is not prefect .i have an idea to develop my algorithm by have reference image that content a liver only (i use photo shop to isolate liver) and then i want to isolate the liver in the other images that have the same shape of my reference liver image even the liver is small or large
i sea your demos http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
but no one of them can help me
what is your opinion?
Aha, so the truth comes out, which it should have at the beginning, since none of what was said so far applies to livers. Not sure why you sent us on a wild goose chase about stars. Anyway, what is a CRT image? Do you mean CT? But won't the liver have different shapes depending on the slice plane's angle? I suggest you see if anyone else has done it before in section 20.8.2 and 20.8.2.1 here: http://www.visionbib.com/bibliography/contentsmedical.html#KK6863
Isee You
Isee You am 30 Mai 2012
I'm sorry that I was not baptized .just i give simple example no thing else
Yes it CT images
the machine Responsible for taking pictures produced many pictures, but there is picture of patients have the same shape and angle ,i need to isolate only the first image that look like other image (same liver shape).
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Isee You
Isee You am 30 Mai 2012
http://imageshack.us/g/85/14340572.jpg/

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 28 Mai 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by