File talk:Image restoration (motion blur, Wiener filtering).png
Jump to navigation
Jump to search
perhaps because it was written for an older version of Octave, but it appears there are a few errors/incompatibilities:
in blur_c.m, the wrong syntax is used at the end to write the image file (for both Octave 4.2.0, and Matlab):
if(L == 3) imwrite(fnameout, IM_OUT(:,:,1), IM_OUT(:,:,2), IM_OUT(:,:,3)); else imwrite(fnameout, IM_OUT); endif
should simply be:
imwrite(IM_OUT, fnameout);
deblur_c.m appears to call detect_c.m, but instead calls a non-existent detect.m:
printf("Detekovano: \n"); [delka uhel] = detect(IM_BLUR)
-->
printf("Detekovano: \n"); [delka uhel] = detect_c(IM_BLUR)
and similarly for writing the output image:
if(L == 3) imwrite(fnameout, uint8(IMd1)(:,:,1), uint8(IMd1)(:,:,2), uint8(IMd1)(:,:,3)); else imwrite(fnameout, uint8(IMd1)); endif
-->
imwrite(uint8(IMd1),fnameout);