Issue with stmap

Hi everybody. I am working with footage with lens distortion. I have the st maps (distort and redistort, generated in pftrack). But after apply the distortion I get an little error. A kind of shuffeld rows of pixels. I remember same problem a couple of years ago.

It’s happening applying the distort in action (uv map) or using the uvmap matchbox.

I wonder if anyone knows how fix it.

thanks

No idea. Long shot. After distortion do you have a frame size not divisible by 4?

Are your STMap and the UVWarp32 32fp?

Yes. I always stay in 32bits.

The original size is the 2.8 anamorphic of alexa (2880x2160 ) . The overscaned size (calculated automatically by pftrack for the undistort stmap) is 3230 x 2422. It’s not divisible by 4.

@randy might be on the money here. Strange Things happen when image resolution isn’t divisible by 4 due to legacy code from the 90s that still beats deep within Flame’s dark heart. Try throwing a center/crop resize on the STmap out to 3232 x 2424 and see if the error goes away? It might break your roundtripping, but hopefully 2 extra pixels in each dimension won’t be noticeable.

1 Like

After try and try… I saw the problem. Using exposure/contrast in viewer, and setting extreme values, I could take a look beyond of the uv values… and the problem is the exr generated by pftrack:
:sweat:

It could be fixed masking the row with a mask of one pixel height , and offseting carefully one pixel. The final distort doesn’t have any perceptible offsett and I would say that is enough to work.

As I said, I faced up with this problem working with pftrack’s stmaps time ago. It seems there is some kind of bug.

Sorry to bother with such silly things. :sweat_smile:

1 Like

hey ! I just had the same problem from pftrack and this was useful af :slight_smile: sorry for my french but apart from the lines it also gave vertical artifacts . The only way to get rid of those was with a y_blur (colorspace linear) as all the others was giving me :poop: .
Just to add a bit more for any fellow traveler , an easy way to identify the lines is to view the red channel only and play around with gamma and exposure and scan the image.
If anybody wonders what we are talking about i will leave you a small archive with the remedies

1 Like