Jit.lcd overlay to demonstrate zoom area from original video. issue - not showing all sides of square object.

Martin Daigle's icon

I am trying to make an object that takes a 1920x1080 video allows me zoom into an area. I want to see the zoomed in area on the original video with a square box that gets resized to the dimentions that I select.

I am trying to make a square with the Jit.lcd object and it seems to only print some of the square's sides. I also tried with jit.mgraphics; however, I run into a similar problem there as well.

I am using a dimention of 1920 and 1080 and I notice that it works better when I'm working with smaller ranges.

Cheers!

TestDrawsquare.maxpat
Max Patch

Martin Daigle's icon

I did not fix the problem, but I found a workaround. Increasing the width (pensize $1$1) allows me to get a stable rectangle.

Roman Thilenius's icon

that is only the result of downscaling since the pwin in smaller than the video.

is that for displaying only? then what about downscaling first to the current object size and then applying the framerect in its actual size?

TFL's icon

Makes me remind that a couple days ago I found this patch from Pedro Santos which does exactly this.

Martin Daigle's icon

This patch is part of a larger one that is for Motion Capture with the use of a camera that recognizes blobs of light; therfore, maintaing the largest dimention is best to maximize accuracy.

I really love the patch Mentioned by TFL,

Ideally this would all be managed by My GPU, but I don't know where to start to convert all of this work in GL, because, some of the more complex objects that I use are made for Jitter.

I'll add the patch if you want to see this object in context, let me know if you have any suggestions to streamline the video processing!

(you need the CV.Jit package for the patch to work as intended)

DrummerBalanceField.maxpat
Max Patch