필터 지우기
필터 지우기

how to select a specified region in an image based on location and calculate its area

조회 수: 5 (최근 30일)
I want to calculate the area of the material included in each pucket?
  댓글 수: 2
Image Analyst
Image Analyst 2014년 12월 26일
What is the material, and what is a pucket?
The lighting is very bad. Try to improve it and your task will be a LOT easier.
See my File Exchange for several image segmentation demos http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
helwan ghgs
helwan ghgs 2014년 12월 26일
Thanks for your interest in answering me.
The material is sand, and the bucket is the lifter used to carry the material and then cascading it (make it fall) vertically.
I want to write a simple code to calculate the vertical area of the material carried by each bucket. and I want to define each bucket location by its angular position. i.e. the first bucket at the left down side where the angle said to be zero (horizontal) and then the next one at angle 30 from the horizontal.....
I tried to use imageJ software first to make filtration but it failed because I found the logic selection in bw all white?

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

채택된 답변

Mohammad Abouali
Mohammad Abouali 2014년 12월 26일
use p=roipoly() to draw a polygon around the area you want to measure it's area.
then the area would be sum(p(:))*pixelsize^2 if you want to automate this, then you need to first write a code that detects those region that you want.
  댓글 수: 2
helwan ghgs
helwan ghgs 2014년 12월 26일
Thanks for your interest in answering me.
The material is sand, and the bucket is the lifter used to carry the material and then cascading it (make it fall) vertically.
I want to write a simple code to calculate the vertical area of the material carried by each bucket. and I want to define each bucket location by its angular position. i.e. the first bucket at the left down side where the angle said to be zero (horizontal) and then the next one at angle 30 from the horizontal.....
I tried to use imageJ software first to make filtration but it failed because I found the logic selection in bw all white?
helwan ghgs
helwan ghgs 2014년 12월 28일
But, I want matlab to draw such polygons autmatically by detecting the sand color which is yellow......and do not how?

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

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 12월 26일
I don't know what/where the bucket is, what/where the sand is, and where the shadows are. The lighting is horrible and could definitely be improved. Plus who's idea was it to have a sand-colored background when you want to find sand pouring in front of it?!?! The disc thing should be black or at least some contrasting color. I'd fix all that first since it's far easier to design an image analysis algorithm if you have a good image to start with.
  댓글 수: 11
helwan ghgs
helwan ghgs 2015년 1월 1일
no Sir., may be you have missunderstanding with my problem. Area_1 is the area of a specific region selected by the ROIPOLY in each image file so it should be a matrix of values equals to the number of files processed. Thanks alot I think I can handel it, thanks again for your interesting to help me with my problem. I will cite your file exchange weblink in my work (but it seems it return to name" Image Analyst" I donot know do you perefer this name for citing or you can give your real name?). and sure I will be back for you any question maybe you can help. Wish you a very happy new year
Image Analyst
Image Analyst 2015년 1월 1일
편집: Image Analyst 2015년 1월 1일
You said "I need Area_1 to be a matrix of the number of the number of image files being processed. " A matrix is a 2D array and I already saw that you were using that equation for one of them so I figured the second column would be the "number" like you asked for. But now it seems like you just want a row or column vector (1-D array) rather than a matrix. To get that, simply index Area_1 with filesProcessed. Don't use k because some k's may be skipped if there is no image for that k.
Area_1(filesProcessed) = (d_1 / b) * 1963.5;
You don't need to credit me specifically in your work but maybe you can just say something like "I wish to thank the volunteers in the MATLAB Answers forum for their helpful guidance and suggestions" or something similar.

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

카테고리

Help CenterFile Exchange에서 Repeated Measures and MANOVA에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by