GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

Why does the SmoothToonFilter look different from the preview to the final photo?

Open jadelmag opened this issue 14 years ago • 1 comments

Why smoothToon is different when you watch through the lens and when you take the picture. I want mean the picture with the filter smoothToon lost accuracy on the effect in the picture that you make.

You take a picture with this effect and the filter is good in the camera but not in the picture.

jadelmag avatar Jun 12 '12 23:06 jadelmag

The difference you are seeing is most likely due to the fact that the Gaussian blur and edge detection applied to the images is done in terms of pixels, so the smaller preview image will have the blur and edge detection work over a larger proportional area of the image than with the final photo.

You should be able to override this default scaling by setting the texelWidth and texelHeight values to constant values (like 1/480.0 and 1/640.0) and adjusting the blurSize between the preview image and taking the final photo. Again, you have to account for the pixel size difference between the two images, and while these adjustments won't make the two images identical, it should make the final photo closer to the preview.

BradLarson avatar Jun 17 '12 04:06 BradLarson