cf.edgedetect.jxs-help doesn't seem to be working?

gpvillamil's icon

No matter what I do, the cf.edgedetect.jxs-help patch in examples/jitter-examples/render/slap-helpers doesn't seem to do anything: I just see a white output window, when I'm expecting to see something more like the output of jit.sobel.

Am I doing something wrong or is it broken?

jason@seeinginvideo.com's icon

I looked in the javascript file and everything looks fine, but I too ran into complications. If you set the width, height and thresh to 1, 1, .25 you see some black artifacts appear, but no edge detection is happening. I'm guessing there's a glitch somewhere in the javascript file that I can't seem to find. Sorry!

Rob Ramirez's icon

i was able to get an edge detection shader working based on the tutorial here:
http://www.ozone3d.net/tutorials/image_filtering.php

Max Patch
Copy patch and select New From Clipboard in Max.

however, this requires you to use non-rectangular textures.
patch and shader below.

        A 3x3 edge detection filter

Joshua Kit Clayton's icon

Yeah, this is broken. A fix is in the next release. Here's a modified shader for you. The issue was it was using device coordinates and not the texture coordinates, which the example had assumed to be the same thing.

FWIW, This is a greyscale based mask for edges. For jit.sobel style edge detection, please use cf.sobel.jxs.

    A 3x3 edge detection filter