Crop image

조회 수: 3 (최근 30일)
Nick ALan
Nick ALan 2011년 12월 9일
Hi,
This is NICK.I want to selct a pixel os size 100*100 or 50*50.
I have to do A) Define Mask size (Y*Y) square input in the code I used. B) Move the Mask systematically around image(either in upward or side ward direction). c) Within each area,identify Blank area(white zone)-Brown Infill material (white in picture)-green identify shallow pores -yellow Rock-Blue
http://i39.tinypic.com/wtho5j.jpg. Please give me one example or sample code to solve it.
Thank you, NICK

답변 (3개)

Image Analyst
Image Analyst 2011년 12월 9일
Check out the help for rbbox, and imcrop. Then check out my BlobsDemo:
Check out my other submissions to do color segmentation.
By the way, I'm not sure what step B is or why you think it is necessary. You can find the white blobs simply by thresholding the image - you don't need to scan any mask around.
  댓글 수: 2
Nick ALan
Nick ALan 2011년 12월 10일
@Image Analyst I want step B to extend it so that I can easily identify pores (shallow pores).Will you give me code for the solution.........
Image Analyst
Image Analyst 2011년 12월 10일
Like I said I see no reason at all for systematically moving a window around when you can get everything all in one shot, in one single line of code. Doing your Step B won't help one bit.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2011년 12월 10일
  댓글 수: 1
Nick ALan
Nick ALan 2011년 12월 11일
@ Image Analyst Today I am full busy with other work.I will look at it in the evening and will message you if any help is required.

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2011년 12월 10일
Your image does not have sufficient resolution to be able to detect the pores in the basalt sample.
In a series of earlier threads since deleted by the poster (aggh!) I posted specific references to studies of pore size ranges in basalt. I then demonstrated that optical wavelengths were too long by a minimum factor of 200 to be able to detect the basalt pore positions even at only 1 pixel per pore.
  댓글 수: 2
Nick ALan
Nick ALan 2011년 12월 11일
@ Walter Roberson I had searched about basalt cubes in the answers section but I didn't find anything. The threads were deleted why????whether I can found any image of the previous thread.My task is to select any basalt image and select a pixel of 100*100 or 50*50 and extend it in upward or sideward direction.Will you give me an example and code for it to solve.
Your help is highly required.
Walter Roberson
Walter Roberson 2011년 12월 15일
I never got a clear answer as to why that poster kept deleting the older questions as they went along, even though we requested that they not do that.
I already told you to use ginput() or rbbox() to get the input point. Get the coordinate of the lower-left corner. Add 10 to both the x and y in order to get the upper right coordinate. Extract the block between and do whatever you want with it.
I am quite busy these days, and will not be able to assist further in this matter.

댓글을 달려면 로그인하십시오.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by