4

你好,我有以下圖片分割的問題。它是需要被識別的有色字符。我正在使用銳化,維納去模糊和維納平滑。之後,我用模糊c均值聚類(3級)分割圖片。但是在字母E的情況下,我得到的最好的結果是沒有銳化,去模糊和平滑處理,只是使用閾值fcm分割。但是,我應該得到比這更好的結果,我可以將這兩部分整體結合起來(不僅僅是上半部分與另一半黑色部分)。圖像降噪OCR

我怎麼能解決這個問題,以更強大的和其他圖像也工作,例如圖片中的5? 5的結果是在fcm集羣之上進行銳化,減弱和平滑處理。我怎麼能讓它更連接也許?

我真的很感激任何幫助,我可以得到,拜託,哦,我在matlab中這樣做...所以它會很高興從那裏得到任何幫助,謝謝!

This is letter E, i would like to get one element as a whole

Second pic is number 5, should be more smooth and connected, without any spaces between lines

編輯:

我下面的代碼是這樣的: 函數[BW,電平] = fcmthresh(IM,SW) 如果(nargin < 1) 誤差( '你必須提供一張圖片。'); elseif(nargin == 1) sw = 0; elseif(sw〜= 0 & & sw〜= 1) 錯誤('sw必須是0或1.'); 結束

data=reshape(IM,[],1); 
[center,member]=fcm(data,3); 
[center,cidx]=sort(center); 
member=member'; 
member=member(:,cidx); 
[maxmember,label]=max(member,[],2); 
if sw==0 
    level=(max(data(label==1))+min(data(label==2)))/2; 
else 
    level=(max(data(label==2))+min(data(label==3)))/2; 
end 
bw=im2bw(IM,level); 

function img=wienerDeblur(im) 
ImgNoisyBlurry = im2double(im); 
PSF = fspecial('laplacian'); %LEN, THETA add parameters for 'motion' 

noise_var = 0.0001; %0.0001 
estimated_nsr = noise_var/var(ImgNoisyBlurry(:)); 
wnr3 = deconvwnr(ImgNoisyBlurry, PSF, estimated_nsr); 
img = wnr3; 

end 

H = fspecial('unsharp'); 
im = imfilter(im,H,'replicate'); 
im = wienerDeblur(im); 
im = wienerSmoothing(im); 

這就是所有的代碼,加上我只用fcmthres字母E,因爲它的工作原理是最好的。 我讀了關於形態圖像處理(膨脹,侵蝕),以便可能做的伎倆。

有沒有更好的圖像對比和噪音去除技術?

+0

您現在的工作代碼是什麼? – 2012-07-30 07:01:06

+0

我會首先檢測背景顏色反轉區域,並將圖像的所有部分轉換爲相同的背景(通過反轉一半),然後開始分割和過濾... – Spektre 2015-05-19 08:05:40

回答

0

你擁有了它在黑色和白色,你可以使用奇異值分解(HTTP後: //en.wikipedia.org/wiki/Singular_value_decomposition),你可以比較奇異值。

對於去除噪聲,將較小的奇異值設置爲0.