A simple question on image processing

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 件のコメント

PT
PT 2013 年 4 月 10 日
Is the outlined portion enclosed in the red dashed circle?
Walter Roberson
Walter Roberson 2013 年 4 月 15 日
Google reports and error in attempting to access that image.
Image Analyst
Image Analyst 2013 年 4 月 15 日
Walter Roberson
Walter Roberson 2013 年 4 月 15 日
That one does not have any outlined area or any red dashed circle, so I cannot tell what needs to be extracted.
Image Analyst
Image Analyst 2013 年 4 月 15 日
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.

サインインしてコメントする。

回答 (3 件)

Image Analyst
Image Analyst 2013 年 4 月 10 日

1 投票

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 件のコメント

Image Analyst
Image Analyst 2013 年 4 月 10 日
編集済み: Image Analyst 2013 年 4 月 10 日
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
Shamima 2013 年 4 月 10 日
編集済み: Image Analyst 2013 年 4 月 10 日
Hi, thanks for the comments. There won't be any red pixel boundary, I have put the original image to the following link: https://docs.google.com/file/d/0BwwPVFIzkQWSYTU4OVNqN24zdE0/edit?usp=sharing
I need to crop out a portion as shown with some indentation mark in the original image. How can I crop up that portion. Thanks.
Image Analyst
Image Analyst 2013 年 4 月 10 日
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
Shamima 2013 年 4 月 10 日
Thanks for your comments. I am a bit new in MATLAB. Could you be a bit more elaborate on finding out the notch at certain radius?
Image Analyst
Image Analyst 2013 年 4 月 11 日
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
Shamima 2013 年 4 月 11 日
I have applied mask as follows:
mask01=slice01<=90 for thresholding. I have placed the output on the following link:
https://drive.google.com/folderview?id=0BwwPVFIzkQWSSVVTSXlKbWd1Qlk&usp=sharing
But I am not sure how to proceed to the next step. Please provide some suggestions.
Shamima
Shamima 2013 年 4 月 12 日
I think I got what you suggested. After thresholding the border is clearer. Now if I start from center on ward at a certain radius each time and move onward by averaging the radial pixel values, there will be a sharp deviation at the indented portion. But i don't know how to write the syntax in MATLAB, I need some suggestion.
Shamima
Shamima 2013 年 4 月 14 日
Hello, I found the centroid of the image and then gradually tried to move radially outward. But center does not coincide with the ceter of the circle. in that case, how can I find the notch/ indent? Please provide some suggestion.
Image Analyst
Image Analyst 2013 年 4 月 14 日
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
Shamima 2013 年 4 月 14 日
I would like to develop some automatic algorithm. Could you give me the link to the circle fitting algorithm? Sorry, I am totally new in MATLAB.
Shamima
Shamima 2013 年 4 月 14 日
Thank you. But I have a number of images, trying to develop some automatic algorthm to identify the notch. Could you provide some suggestion about that. As when the number of images are large, user intervention may not be good. I am trying to compare pixel values for different images of same series but as pixel values not uniform, yet to find out a suitable logic to make it automatic.
Image Analyst
Image Analyst 2013 年 4 月 14 日
Have you experimented around with imfindcircles() and hough()?
Shamima
Shamima 2013 年 4 月 15 日
I need to see how to use these functions in MATLAB. At this moment, I have displayed the images using C program and I found for a certain arc length, along the indent/ notch the pixel value is very high. For a small portion of arc length, I find this property in all images after thresholding. Now from that small piece of arc lenth, i need to find correct center by varying the angle for particular arc length. If you any good algorithm about this, please let me know. I am not sure whether I am proceeding on the right track. As I am not familiar with MATLAB, I find difficulty in using the MATLAB functions.
Cedric
Cedric 2013 年 4 月 15 日
編集済み: Cedric 2013 年 4 月 15 日
>> 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
Shamima 2013 年 4 月 10 日

0 投票

Yes, I would like to remove every thing outside the outlined boundary. I only need the portion that lies inside the boundary. Thanks.

4 件のコメント

Image Analyst
Image Analyst 2013 年 4 月 10 日
This should have been a comment, not an "Answer."
Shamima
Shamima 2013 年 4 月 10 日
yes, it should be a comment. sorry for that. I would like to consider the portion interior to boundary only.
Image Analyst
Image Analyst 2013 年 4 月 10 日
See the comment in my answer above.
Shamima
Shamima 2013 年 4 月 10 日
Hi, thanks for the comments. There won't be any red pixel boundary, I have put the original image to the following link:
https://docs.google.com/file/d/0BwwPVFIzkQWSYTU4OVNqN24zdE0/edit?usp=sharing
I need to crop out a portion as shown with some indentation mark in the original image. How can I crop up that portion. Thanks.

サインインしてコメントする。

Ayshath Afra
Ayshath Afra 2020 年 6 月 21 日

0 投票

% create pre-processed datastore
imdb = imageDatastore(db_path,...
'IncludeSubfolders',true,...
'LabelSource','foldernames',...
'ReadFcn',@readCBIR);
Does anything wrong in this command

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2013 年 4 月 10 日

回答済み:

2020 年 6 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by