http://mirror.transact.net.au/pub/sourceforge/s/project/sv/svenlib/src/sven/segmentation/Thresholders.java i have found this java code but how to assing this histo value it give me error double[] histo = new double[MAX_VALUE + 1];
How to apply moment preserving to grayscale document image
1 回表示 (過去 30 日間)
古いコメントを表示
Hi how to apply moment preserving to grayscale document image to obtain gray values. how to proceed i need a example code.
7 件のコメント
Image Analyst
2012 年 12 月 31 日
It is not clear. Please explain it to someone else and have them write it down and paste their explanation back here. Otherwise all I can say is try this:
outputImage = inputImage;
Everything from the input image will be preserved, including ALL moments.
回答 (1 件)
Image Analyst
2013 年 1 月 2 日
Ah, finally now we're getting somewhere. Moment preserving THRESHOLDING. That thresholding word is important. You really didn't explain the algorithm though. So I have no idea what g1 and g2 are, given some arbitrary gray scale image. And the FAQ applies here.
But let's assume you have them and you calculated a threshold value of T according to your formula. Then you could binarize (threshold) the image into two levels (foreground and background) simply by doing this:
binaryImage = grayImage < T; % Or you can use <=, >, or >= if you want.
This will not preserve ALL moments, but may preserve one or a few of the moments if T was chosen appropriately.
2 件のコメント
Image Analyst
2013 年 1 月 6 日
Yes, I know that. How about 42 and 213 - will those do? If not, then why not?
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!