D
D
DWZ2019-12-22 13:18:01
Video
DWZ, 2019-12-22 13:18:01

Program-detector of "squared" frames in video?

There is a video file (H264 codec, TS or MP4 container), in which, due to compression, some frames went into squares. There are no error flags, the counters are in order.
Is there a program that will tell you exactly which frames are "squared"? Not necessarily working with video, it is possible with the *.BMP set.
Or at least an algorithm? Or the idea of ​​an algorithm?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
@
@nidalee, 2019-12-24
_

H.264 and H.265 have a deblocking filter, it catches and tries to fix exactly these artifacts. It is necessary to gut the specifications and source codes of the encoder for how it finds these frames.
It is necessary to work with video, since special software can accurately find the sizes and positions of macroblocks, the compression / loss of which gives these artifacts. Thus, by translating p- and b-frames into pictures (in fact, a set of i-frames), you will only complicate your task.
I would dig here , here and further.
PS: By the way, StreamEye from the link above is most likely able to do this. But he, EMNIP, is completely paid. There were also free alternatives.

H
hint000, 2019-12-22
@hint000

Or the idea of ​​an algorithm?

Through the Fourier transform, calculate the spectrum for each frame. Broken frames will have 2-3 characteristic peaks at multiple frequencies. Because Artifact squares are supposed to be 8x8, 16x16, 32x32, 64x64 pixels.
You can also use the second option, simpler - to calculate the average contrast between adjacent grid cells 8x8, 16x16
,. The task is interesting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question