Xerbo/aptdec

Cropping noise crops too much

Akito01 opened this issue · 4 comments

Cropping a capture's noise crops too much.
It's correct that it crops all the noise, but it also crops part of the captures where there's only slight noise effectively cropping too much.

Maybe it'd be possible to use a selector between 0 and 3 to tell aptdec how strong the noise should be before cropping?

Xerbo commented

Could you send me the audio file in question, to see what's wrong, since all my captures are horizon-to-horizen without nulls.

I should also mention that there is a threshold internally that you should be able to change pretty easily, (higher value = more crop, lower value = less crop):

aptdec/image.c

Line 323 in 377bc3f

#define NOISE_THRESH 180.0

Just make sure to run make after changing it.

Sure, the file is here: https://rob.radarimages.eu/weather/RAW/NOAA1920200714-075626.wav

Thanks for pointing out that file where I can set the cropping threshold. I've found that for this file a threshold value of 130 is better. Might be personal taste, but processing that file using the HRPT June palette, there's still plenty of image available in the north even though the noise.

-Extra note- I just noticed by misspelling the filename of the palette that a check for the availability of the file is done after reading all the lines. It'd be faster to do this check at first, so we won't have to wait for the processing of all the lines to figure there's a misspelling in a palette filename.

Xerbo commented

Ah, this could be fixed by increasing the filter bandwidth, the noise cropping uses the minute marker as a reference for how much noise there is. And in your recording that clips.

Here's image showing what I mean, the minute marker is way noisier than Channel B:

Crop of the minute marker showing the clipping

Xerbo commented

I'm going to close this issue if I don't get any follow ups on this comment.