under flow and over flow of image
조회 수: 1 (최근 30일)
이전 댓글 표시
what is the pre-processing that executed on a gray image to prevent the over and under flow of image processing? the rang of image [0-255]
댓글 수: 0
답변 (2개)
Walter Roberson
2012년 7월 15일
There is no method that can prevent all overflow and underflow in image processing. Even setting all image locations to zero is not enough, as "image processing" can include steps that add or subtract arbitrary constants from the image.
댓글 수: 0
Image Analyst
2012년 7월 15일
You can cast your image to single or double if you don't want to have the intensities clipped to the range 0-255. That way if they are outside that range, they will still have the value they should have.
댓글 수: 2
Walter Roberson
2012년 7월 15일
That will not be enough if, for example, one of the steps is to take exp() of the image values.
Given any particular image processing algorithm, it might be possible to do type conversion and scaling so as to avoid overflow and underflow, but there is no mechanism that can be used to avoid overflow and underflow for all image processing algorithms.
Image Analyst
2012년 7월 15일
Yes, there are limits. Personally, I've never run into a situation where I've ever exceeded the limits of double (where my values exceed realmax = 1.7977e+308), but I suppose one could.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!