seperating vertical and horizontal images from an image seperately
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
I want to seperate the horizontal and vertical images seperately fom an image.If F is my original image then for getting its vertical image I have the equation
Dv_F(i,j)=Abs(F(i,j)-F(i-1,j))  for i=1 to m-1, j=0 to n-1
For horizontal image
Dh_F(i,j)=Abs(F(i,j)-F(i,j-1))  for j=1 to n-1, i=0 to m-1
How can I implement these in matlab? Its very urgent. Please someone help.
댓글 수: 0
답변 (1개)
  Turlough Hughes
      
 2019년 10월 15일
        
      편집: Turlough Hughes
      
 2019년 10월 15일
  
      I'm not sure what you mean by vertical / horizontal image but from your equation it looks like you want to find the absolute difference of adjacent pixels to form a new image, first in the vertical direction and secondly in the horizontal direction. Let's a assume you have a grayscale image F, you can use the imabsdiff function
      Dv_F=imabsdiff(F(1:end-1,:),F(2:end,:))
      Dh_F=imabsdiff(F(:,1:end-1),F(:,2:end))
Please refer to the documentation on imabsdiff to confirm if this is what you are looking for.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

