Image processing / restoration in Matlab

I have some images that I would like to fix from artifacts. They show different animals, but they look as if they were curled up (look at the attached image). The folds are straight, and they also pass through the wings, they are simply difficult to see, but they are. I would like to remove the folds, but at the same time save the information from the image (the structure and color of the wings). I am using MATLAB right now and I have tried several methods, but nothing works.

Initially, I tried to see if I could see anything using FFT, but I do not see the structure in the spectrum that I can remove. I tried using several border detection methods (e.g. Sobel, etc.), but the problem is that edge detection always finds the edges of the wings (because they are stronger) and not straight. I was wondering if anyone has any ideas on how to solve this problem? I am not attaching any code because none of the methods that I tried (and did not describe) work.

Thanks for the help in advance.

Example

+5
source share
2 answers

I will leave this bit here for those who know how to erase these lines without affecting image quality:

a = imread('https://i.stack.imgur.com/WpFAA.jpg'); b = abs(diff(a,1,2)); b = max(b,[],3); c = imerode(b,strel('rectangle',[200,1])); 

enter image description here

+3
source

I think you should use two-dimensional fast Fourier transform. It might be easier to use GIMP / Photoshop first if the filter allows it.

I assume that the CC sensor was broken (it is good for old problems with the scanner). Maybe electric distortion when he read the camera sensor. Such signals in theory are repetitive in nature. I do not think this was caused by the incorrect translation of colordepth / colorspace

If you like the code, you can also write your own pixel-based filter in which you take x vertical pixels (say 20 or so), comparing them to the next vertical line of 20 pixels. Compare with HSL (L lightnes), not RGB. Of all the pixels, the calculation of brightness changes in this way.
Then, to check for a pixel, H (heu) is within the range of neighboring pixels, take the average scale of their brightness (ea take 30 pixels horizontally, calculate the average brightness of the first 10 and last 10 pixels, apply this brightness to the central pixel 15, ... // 30, 15, 10 try to find what works well

Since you have whole strokes that seem brighter / darker, such a filter will smooth out this action, the difficulty is to remain other patterns (wings are less distorted), knowing what color space the sensor could take for a better solution HSL, maybe HSV or so ..

+2
source

Source: https://habr.com/ru/post/1275654/


All Articles