Image from Gradient and Magnitude
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello, with imgradient I can compute the magnitude and direction of an image's gradient. Is it also possible to somehow compute an image from magnitude and direction?
I basically have a 2d matrix with a linear ramp in a certain direction, and I want to increase the slope of this ramp, so that the direction stays the same, but the values increase faster.
The overall offset does not matter.
Thank you very much!
댓글 수: 0
답변 (1개)
Image Analyst
2014년 7월 6일
Sounds like it should be theoretically possible to rebuild the image, but I'm not sure how. I take it that you somehow have the gradient image, not from imgradient() but from some other source - otherwise you'd already have the original image and you would not need to recreate it.
댓글 수: 5
Image Analyst
2014년 7월 6일
My method just amplified all slopes. If you have a particular ramp that you want then you have to add or multiply that ramp image by the original image
output = image1 .* rampImage;
or
output = image1 + rampImage;
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!