Activity › Forums › Creative Community Conversations › Apple’s slapdash approach to image processing
-
Apple’s slapdash approach to image processing
Jack Zahran replied 12 years, 3 months ago 12 Members · 27 Replies
-
Jeremy Garchow
January 16, 2014 at 1:35 amIt should be an easy fix, I agree, and light wraps are fairly easy as Simon mentions.
FCPX’s Meyer* allows me to get looks approved more quickly than any other method at the moment.
I do love the speed, but I’d also like the quality when needed.
There are other facets of fcpx that combine the speed and quality, so hopefully Apple can focus on it at some point.
Simon, have you messed with fxplug3? Any better? Worse?
*keyer
-
Walter Soyka
January 16, 2014 at 2:47 am[Simon Ubsdell] “It involves blurring the matte and then combining the blurred version with the original of the matte in order to create a edge that overlaps into the foreground. The amount of the blur determines the depth of the light wrap. This matte is then used to composite a blurred version of the background image back over the foreground… The problem is that Apple haven’t executed the blur properly so as to crop it at the edges of the frame – as I say, it’s a really easy fix.”
As in, like, ticking a checkbox. The built-in M5 Gaussian blur already correctly supports “crop” (more accurately called “repeat edge pixels” in Adobe-land) — but the blur used in the keyer (wrongly) does not make use of this.
To expand on Simon’s explanation of the problem a little, think about what a blur does: it sets the value of each pixel in the image to a weighted average of that pixel and its neighbors over a specified radius. Therefore, edges are special case, as they don’t have the same number of neighbors that an interior pixel has. You can’t calculate these pixels unless you first expand the raster of the image so that it’s large enough that the image’s exterior pixels have the same number of relevant neighbors as the interior pixels.
But what’s outside the edge of the image? You have to fill out from the edge pixels with something in order to calculate their blur, so you have to make an assumption. You can either pretend there’s nothing out there (black), or you can pretend that the pixels at the edge extend outward to the edge of the blur radius. In other words, you have to enlarge the image by x pixels at each edge to perform a blur, where x equals the radius of the blur, and you have to fill in that area outside the original raster with something.
When you pretend there’s nothing out there (black), you get a dark fringing around the edge of your frame when you blur, as if the edges are pulling in. When you extend the edge pixels outwards into the expanded blur raster, this does not occur.
A picture is worth a thousand words, so here are eight thousand words.
The red line shows the original raster of our image to blur — a circle that extends beyond and is cropped by its raster. The area between the red and the green lines is where we are extending the raster, pre-blur. In this first example, these expanded bounds are filled with black:
Now, when we blur this, including the black expanded bounds, we get these edges that expand beyond our original raster, as well as these darker shadows from the blurred outer black bleeding into our original raster:
So we crop this down to our original raster, leaving this dark fringing inside our raster:
Now, if we want to avoid that fringing, we can simply copy the outer line through the expanded bounds, repeating the edge pixels outward, pre-blur:
Blurring this, we get:
And cropping that back to the original raster gets us this, with no incursion of black into the edge-touching areas:
Note that neither one of these is perfect. Nothing gets us back the original extents of the circle that were cropped from the original raster. That would look like this, if we could do it:
However, in the case of a blurred matte for a light-wrap, the second, edge-repeating set is more correct. Repeating the edge pixels acknowledges the fact that the edge-violating areas of the matte extend beyond the extents of the raster, whereas pretending that they end at the raster bounds is clearly incorrect.
And with that, I’ll conclude this evening’s image processing 101 lecture. Any questions?
Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog – What I’m thinking when my workstation’s thinking
Creative Cow Forum Host: Live & Stage Events -
Jason Jenkins
January 16, 2014 at 4:06 am[Walter Soyka] “And with that, I’ll conclude this evening’s image processing 101 lecture. Any questions?”
101? I wish I could understand half of what you just said.
Jason Jenkins
Flowmotion Media
Video production… with style!Check out my Mormon.org profile.
-
Charlie Austin
January 16, 2014 at 5:07 am[Simon Ubsdell] “The problem is that Apple haven’t executed the blur properly so as to crop it at the edges of the frame – as I say, it’s a really easy fix.”
I’ve actually seen the same thing, (blur at the frame edges) when applying say, gaussian blur to a selected area of a picture in apps like Graphic Converter. The blur is applied only to the selection, but the edges get it too. I wonder if it’s an FCP X problem, or a problem with one of the OS X frameworks? Either way, they oughta fix it…
————————————————————-
~ My FCPX Babbling blog ~
~”It is a poor craftsman who blames his tools.”~
~”The function you just attempted is not yet implemented”~ -
Craig Alan
January 16, 2014 at 5:12 amIt’s simple really. You put a round peg in a square hole. Think different.
Mac Pro, macbook pro, Imacs (i7); Camcorders: Panasonic AG-HPX170/AG-HPX250P, Canon HV30/40, Sony Z7U, VX2000, PD170; FCP 6 certified; write professionally for a variety of media; teach video production in L.A.
-
Walter Soyka
January 16, 2014 at 1:41 pm[Jason Jenkins] “101? I wish I could understand half of what you just said.”
Then I didn’t do it right. I’ll come back with a better explanation after I have a few minutes to draw up some new illustrations.
Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog – What I’m thinking when my workstation’s thinking
Creative Cow Forum Host: Live & Stage Events -
Walter Soyka
January 16, 2014 at 1:45 pm[Charlie Austin] “I’ve actually seen the same thing, (blur at the frame edges) when applying say, gaussian blur to a selected area of a picture in apps like Graphic Converter. The blur is applied only to the selection, but the edges get it too. I wonder if it’s an FCP X problem, or a problem with one of the OS X frameworks? Either way, they oughta fix it…”
Both edge-handling options for blurs are already implemented — look at the “Crop” checkbox on the Gaussian blur, for example. It’s just that the keyer uses the wrong option.
Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog – What I’m thinking when my workstation’s thinking
Creative Cow Forum Host: Live & Stage Events -
Jeremy Garchow
January 16, 2014 at 2:09 pmAt the very least, you can build your own light wrap in FCPX and have control over the blur and intensity. This is obviously a bit much for a light wrap, but I made it so we can see it.
I still don’t like hat FCPX does to all edges of a key. For me, a key is all about the edges.
Here’s what it looks like (image):
-
Simon Ubsdell
January 16, 2014 at 2:28 pmThat’s neat 🙂
If we just had the Motion Channel Mixer filter (and a Dilate/Erode option, as in the Motion MinMax filter) in X there’s a lot more one could do with building custom keyer components.
As you say, the built-in keyer gives some pretty nasty edges – and there’s nothing you can do to fix it.
Simon Ubsdell
http://www.tokyo-uk.com -
Simon Ubsdell
January 16, 2014 at 2:29 pm
Reply to this Discussion! Login or Sign Up








