Matlab imfilter uint8 overflow
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I created a gaussian filter. Then I divide every element by the smallest element so my gaussian filter is in integer. When i convolve an image with it, I get 255 for everything. How do I fix this ? I want to convolve using integer values not decimals. Thanks.
0 个评论
回答(1 个)
Walter Roberson
2016-4-9
double() the data before convolving.
5 个评论
Walter Roberson
2016-4-10
imagesc(yourimage)
to display it automatically scaled according to the data it contains. This will not be the same as either of Guillaume's suggestions (which would normally be valid) because your filters are producing values larger than 255.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!