필터 지우기
필터 지우기

Segment Coordinates of split screen

조회 수: 1 (최근 30일)
Steven Moran
Steven Moran 2017년 12월 27일
댓글: Walter Roberson 2017년 12월 29일
I split screen into segments for my classifier. I don't just want to classify each segment, I want the pixel coordinates of each segment as well. How do I do this?
thanks

채택된 답변

Walter Roberson
Walter Roberson 2017년 12월 27일
Are the segments all the same size? If so then you should be able to easily convert segment index to screen coordinates.
coordinates_of_start = (index - 1) * width_in_this_direction + 1;
coordinates_of_end = index * width_in_this_direction;
  댓글 수: 2
Steven Moran
Steven Moran 2017년 12월 29일
What value is the 'index' ?
how is this different from regionprops function?
thanks
Walter Roberson
Walter Roberson 2017년 12월 29일
index is the number of the segment in a particular direction. So the 3rd segment down, 4th over, would call for index numbers 3 for vertical direction and 4 for horizontal direction.

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

추가 답변 (1개)

Image Analyst
Image Analyst 2017년 12월 28일
편집: Image Analyst 2017년 12월 28일
What do you mean by segmentation for your classifier? Is it like you want to segment the standard peppers.png demo image into purple region(s), red regions, green regions, and yellow regions, and you want the pixel coordinates of each segment (each class)? And you want to split up the screen to show masks for each segmentation (class)? If so, you can segment the image using whatever method you want, such as classify() function or the Color Thresholder app, then take the mask for each color class and use find() or regionprops() to get the (x,y) coordinates for each class.
  댓글 수: 1
Steven Moran
Steven Moran 2017년 12월 28일
The image is split into segments of equal size. Then each segment is classified in my deep learning algorithm. So the classification comes after the split occurs.
Each segment of pixels is classified, but I want each segment to also have its coordinates recorded because I'm coordinating that with mechanical stage movements.
Hope that makes sense. thanks for your answer

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

Community Treasure Hunt

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

Start Hunting!

Translated by