Pcolor: Draw a square around (highlight) a single pixel
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
I would like to draw a square around a single pixel to emphasize it. I envision something like the default grid of pcolor, but only around a single pixel. Is this possible, or are there other ways to draw the eye to a single position on a pcolor grid?
댓글 수: 0
답변 (1개)
  Image Analyst
      
      
 2014년 5월 27일
        You might try this:
Otherwise, just write into the columns and rows like you'd expect
yourImage(row-1:row+1, column - 1) = 255; % Left edge
yourImage(row-1:row+1, column + 1) = 255; % Right edge
yourImage(row-1, column) = 255; % Top edge
yourImage(row+1, column) = 255; % Bottom edge
댓글 수: 2
  Image Analyst
      
      
 2014년 5월 27일
				You can use plot() or line() to plot lines in the overlay above the image.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

