A simple question on image processing
Afficher commentaires plus anciens
Hello every body, I have uploaded a simple image on the website:
I would like to extract the outlined portion only. I just startted learning MATLAB. Could any body suggests how I can extract that part of image?
Thanks.
5 commentaires
PT
le 10 Avr 2013
Is the outlined portion enclosed in the red dashed circle?
Walter Roberson
le 15 Avr 2013
Google reports and error in attempting to access that image.
Image Analyst
le 15 Avr 2013
Try this one (from her comments): https://docs.google.com/file/d/0BwwPVFIzkQWSYTU4OVNqN24zdE0/edit?pli=1
Walter Roberson
le 15 Avr 2013
That one does not have any outlined area or any red dashed circle, so I cannot tell what needs to be extracted.
Image Analyst
le 15 Avr 2013
Basically about half way out the blob, there is a thin, faint, noisy, interrupted "ring" of dark pixels. That is what she wants to find.
Réponses (3)
Image Analyst
le 10 Avr 2013
1 vote
What do you mean by "extract"? Do you mean you want an image with everything outside the circle blackened? Do you want the bounding box of it cropped out to another, smaller image? Do you just want a list of all pixels inside the circle in a 1D list?
15 commentaires
Image Analyst
le 10 Avr 2013
Modifié(e) : Image Analyst
le 10 Avr 2013
Do you already know the coordinates of the red circle? You should if you plotted it. Otherwise, find the red circle pixels, and then use bwconvhull to make a solid disk mask out of it. Then find the bounding box of the mask (a couple of different ways to do that, such as regionprops), then use imcrop().
Shamima
le 10 Avr 2013
Modifié(e) : Image Analyst
le 10 Avr 2013
Image Analyst
le 10 Avr 2013
I would threshold and find the centroid. Then I'd send out a bunch (maybe 2 * (rows+columns)) lines out with improfile(). Sum them to get the average radial profile. Then hopefully by looking at that you can find the "notch" at the certain radius. Then use poly2mask(), etc.
Shamima
le 10 Avr 2013
Image Analyst
le 11 Avr 2013
I probably won't have time for that until the weekend, if even then. By that time, you'll probably have this solved. Post what code you have at the time you stop developing it and I may get to it in the next few days. Remember, we're volunteers with real jobs, not paid tech support people.
Shamima
le 11 Avr 2013
Shamima
le 12 Avr 2013
Shamima
le 14 Avr 2013
Image Analyst
le 14 Avr 2013
Then why not let the user click on some points along the circle perimeter and use the circle fitting code in the FAQ to find it? Or let the user click at the center and then take radial profiles to find the radius?
Shamima
le 14 Avr 2013
Shamima
le 14 Avr 2013
Image Analyst
le 14 Avr 2013
Have you experimented around with imfindcircles() and hough()?
Shamima
le 15 Avr 2013
>> As I am not familiar with MATLAB, I find difficulty in using the MATLAB functions.
At this point, I would recommend the official documentation available here. If you are already familiar with another language, you would spend probably no more than a long day full time, which would prevent you from being constantly pulled back by lack of knowledge about MATLAB basics (which are not trivial, especially if you have a challenging application to develop). I would recommend the following actually:
Under MATLAB, you could get..
- PDF labeled "MATLAB Primer" and study chapters 2 and 5.
- PDF labeled "Mathematics", and train to have a good mastery of chapters 1 and 9.
- PDF labeled "Programming Fundamentals" and have a look at the table of content so you can use it as a reference later.
There would also be the User's Guide under Image Processing Toolbox, which contains a significant amount of examples and illustrations.
Shamima
le 10 Avr 2013
0 votes
4 commentaires
Image Analyst
le 10 Avr 2013
This should have been a comment, not an "Answer."
Shamima
le 10 Avr 2013
Image Analyst
le 10 Avr 2013
See the comment in my answer above.
Shamima
le 10 Avr 2013
Ayshath Afra
le 21 Juin 2020
0 votes
% create pre-processed datastore
imdb = imageDatastore(db_path,...
'IncludeSubfolders',true,...
'LabelSource','foldernames',...
'ReadFcn',@readCBIR);
Does anything wrong in this command
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!