cropping live feed from blackmagic capture devices.

444 views
Skip to first unread message

Ron Peer

unread,
Oct 1, 2014, 4:31:57 PM10/1/14
to ql...@googlegroups.com
Hello all and figure 53 people.
I've asked it before but now i see more and more support with blackmagic's hardware and it seems like a good time to bring it up again...
  It would be great if one could geometricaly crop a live camera cue  with different kinds of aspect ratios, and by crop i mean to be able to loose pixels from the horizontal and/or vertical  side of the live input without stretching or squeezing the live input.
and if one can be rude, with minimum latency :-).
right now, when you feed HD-SDI camera, you stuck with 1920x1080 pixels. you want less horizontal pixels? the video will shrink.
any thoughts, ideas or workarounds?

Best,
Ron P.

Joshua Langman

unread,
Oct 1, 2014, 4:38:34 PM10/1/14
to ql...@googlegroups.com
You can crop with a surface mask. As of 3.1, this will even let you see other media on other, lower surfaces through the masked area.

Lucas Krech

unread,
Oct 1, 2014, 5:02:48 PM10/1/14
to ql...@googlegroups.com
Easy enough to do in Quartz Composer using a stretch-crop or crop patch in a custom composition for QLab. 

-L

*insert witty mobile device advertising here*
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53

---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

micpool

unread,
Oct 1, 2014, 9:06:39 PM10/1/14
to ql...@googlegroups.com
Unless I am misunderstanding what you want to do , you can create a surface at the cropped size you want and assign the surface to your display.

You assign your camera cue to that surface with custom geometry  and scale it or move it as necessary.

If you want your cropped camera to appear on a larger background assign another larger surface to your  display and set the layer order to put the cropped camera surface in front.

Example attached (TV Clip art, free to use, from https://openclipart.org/detail/funky-old-tv-by-stevepetmonkey)

Assign both surfaces to your display and patch your camera to camera 1

It should look like the attached screen shot

Mic
Cropped camera example.zip
Screen Shot 2014-10-02 at 02.05.09 (2).png

wbdreynolds

unread,
Oct 2, 2014, 3:21:53 AM10/2/14
to ql...@googlegroups.com, des...@lucaskrech.com
I was trying to make a custom quartz image filter patch to use as a custom effect in Qlab that would do exactly this the other day, but couldn't figure out how to stop the crop patch from stretching the image back to its original dimensions after losing pixels from one edge - is this possible to do as an image filter do you know?
cheers
will

Lucas Krech

unread,
Oct 2, 2014, 8:13:51 AM10/2/14
to wbdreynolds, ql...@googlegroups.com
Did you publish the inputs for image size in the crop patch and then set values in QLab? Another route would be to place an image in the composition whose size is your desired output and get its dimensions and feed them to the dimension input on a stretch crop patch. 

It is possible this is a limitation of the image filter and that it treats the crop as any other shift in pixels but then returns the original dimensions though with a distortion.  I've not tried cropping in QC and feeding to QLab save for limiting filters like blur so can't speak from experience. Can anyone at Figure 53 speak to this?


-L

*insert witty mobile device advertising here*

Dave "luckydave" Memory

unread,
Oct 2, 2014, 3:07:59 PM10/2/14
to ql...@googlegroups.com
On Thursday, October 2, 2014 at 5:13 AM, Lucas Krech wrote:
It is possible this is a limitation of the image filter and that it treats the crop as any other shift in pixels but then returns the original dimensions though with a distortion.  I've not tried cropping in QC and feeding to QLab save for limiting filters like blur so can't speak from experience. Can anyone at Figure 53 speak to this?

There are a few issues with cropping, or really anything that puts transparency between the edge of the image, and the original image frame. I've been banging my head against it for a long time, and have found a few workarounds, but nothing that gives great performance. As it happens, we've been experimenting with cropping and similar ideas just in the past week, and hopefully making the kind of progress I've been hoping for since the before the release of QLab 3. Once we feel we've made something that can be trusted for shows, we'll be making it available post-haste. (If it turns out to be a problem we can, indeed, solve. Things are looking promising...)

Ron Peer

unread,
Oct 8, 2014, 1:53:09 AM10/8/14
to ql...@googlegroups.com
thank you all for the great ideas and methods, 
  just came back from a nice Zanzibar holiday,will try it out.asap.
Luckydave - this really sounds very promissing. looking forward to hear the news.
Thanks again folks.
Ron Peer.


בתאריך יום חמישי, 2 באוקטובר 2014 12:07:59 UTC-7, מאת luckydave:

wbdreynolds

unread,
Oct 27, 2014, 10:13:13 AM10/27/14
to ql...@googlegroups.com, wbdre...@gmail.com, des...@lucaskrech.com
finally had a moment to think about this again

Lucas, yes, for what i want to do i need to be able to publish the inputs and then set crop amounts in qlab. that's what i tried, but he crop patch insisted on stretching the cropped image back out to the original image's dimensions. i tried adding in some maths logic to the patch to try to set the dimensions of the final image too,  but couldn't get that to work either. the next idea i had was to try to turn some number of rows/columns of pixels transparent instead of cropping them off, but i couldn't figure out how to do that!

for what i wanted to do at the time it would have been enough to set those pixels to black rather than transparent, but a) i couldn't  figure that out either, and b) that's not a very universal solution!

i'll keep my fingers crossed for luckydave's experiments!

Lucas Krech

unread,
Oct 27, 2014, 10:30:26 AM10/27/14
to ql...@googlegroups.com
Composite the crop on top of a still black frame of the original input dimensions. Also, did you use a crop or a stretchCrop? The latter is designed to do the action you describe. You may need to feed a stretch crop precise dimensions to get it to behave how you want. 


-L

*insert witty mobile device advertising here*

micpool

unread,
Oct 27, 2014, 12:18:58 PM10/27/14
to ql...@googlegroups.com
Isn't the solution actually contained somewhere in the patch that Freddy Komp posted on Oct 21 called  GradientBlendPatch.qtz

I haven't got time at the moment to develop this into a 4 shutter crop, but I did a quick hack and got a functioning left shutter for the crop with softness control which I attach. The Blend with Mask seems to be the key feature here so you are producing a full frame with alpha where you want the cropping.

It should be possible to expand this to a 4 shutter crop (with rotatable shutters should you be so inclined)


Mic
cropper.qtz

micpool

unread,
Oct 27, 2014, 12:31:13 PM10/27/14
to ql...@googlegroups.com
Heres a bundle demonstrating the crop

Mic
Left Hand edge crop QC.zip

Lucas Krech

unread,
Oct 27, 2014, 2:39:22 PM10/27/14
to ql...@googlegroups.com
Make a solid rectangle on transparent PNG and composite as the BG on a Source Atop Composite. Live feed is Source. Run PNG through a StretchCrop with sizing published to QLab for dynamic changes. May need source to be stretch cropped to the reference dimensions of the PNG. If crop need not be dynamic just omit the stretchcrop on the PNG. 


-L

*insert witty mobile device advertising here*
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53

---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Left Hand edge crop QC.zip>

micpool

unread,
Oct 27, 2014, 6:24:11 PM10/27/14
to ql...@googlegroups.com, des...@lucaskrech.com
That works really well and is very versatile. You can  use image  transform to scale and rotate the rectangle or use a circle (or any other shape) PNG instead of the rectangle. You can even apply a blur to get a soft edge to the crop, although the latency can then be counted in seconds.

Mic

Nick Van Houten

unread,
Aug 12, 2015, 11:17:36 PM8/12/15
to QLab, des...@lucaskrech.com
Just finding this awesome QC patch...since I am a bit overwhelmed by the Quartz patch world...what is the secret to making this crop from the bottom as opposed to the left? I assume it involves changing some of those formula elements...

Thanks!

-Nick

micpool

unread,
Aug 13, 2015, 11:01:45 AM8/13/15
to QLab, des...@lucaskrech.com
Here's a version of the cropper that allows the crop to be at any angle and  in any position.

However, I have just noticed that inserting this as a video effect (or the previous version) changes the brightness of the cue image.

I can't work out why this is, and I've just checked, and the brightness shift affects quite a lot of my custom quartz patches.

Hopefully, someone else can explain why?

Mic
cropper2.qtz

micpool

unread,
Aug 13, 2015, 3:46:25 PM8/13/15
to QLab, des...@lucaskrech.com


On Thursday, August 13, 2015 at 4:01:45 PM UTC+1, micpool wrote:
I have just noticed that inserting this as a video effect (or the previous version) changes the brightness of the cue image.



Testing again with a simple QC patch that just connects the image in port  directly to the image out port the images are markedly different when Custom Quartz effects are switched in and out.

Effect out


And Effect In


Simple Custom Quartz Test.zip
Reply all
Reply to author
Forward
0 new messages