Comments (6)
Good catch. For a two-pass filter like the edge detection and sketch filters, I was writing the first pass to disk, not the end result. That should now be fixed in the repository.
Thanks for pointing this out.
from gpuimage.
Thanks Brad. Pulled in the changes and looks great.
Thanks again for putting together this library. My experience in image processing/filtering is non-existent and this has been a great experiment in learning.
from gpuimage.
Hi!
Thanks for that great piece of software ;)!
I find it very helpful, expecially for me: I don't know anything about elaborating images and I was asked to add some effects to photo sharing app.
I've some problem and I think it can be something similar to the one discussed in this thread.
I have a problem with Sketch effects (and TiltShift too): when I apply Sketch effect on preview image it works really well, but when I use it on full size image (and save image data to file) it seems like just half effects was applied.
For example with Sketch effetc I got image without too much contrast (eg. the edge aren't very "dark").
Do you have some insights?
Thanks!
William
from gpuimage.
That's really a different issue. The sketch filter is based on edge detection routines. These are calculated based on neighboring pixels, so when you have a preview at a lower resolution the effect will be performed over a larger effective area in the image than when you capture a high-res still photo. You can control this to some degree by setting the texelWidth and texelHeight parameters of the filter to be 1/width and 1/height of the image size you start with. This will keep the edge detection calculations relatively constant.
The tilt shift filter is a different case, in that it uses a Gaussian blur. That blur is calculated based on local pixels, and again if you increase the image resolution it is now blurring over a smaller relative radius. You could try increasing the blurSize scaling value, but you will quickly see banding in that. I don't really have a good way of maintaining a constant image processing quality for this filter between images of various resolutions.
from gpuimage.
Has anyone come up with a solution to the Tilt Shift preview and final output not look the same?
I get a nice effect on the preview but the final captured image has a lot less effect to it.
from gpuimage.
@pednaa - This comment doesn't really have anything to do with this issue.
The reason for the difference in preview and photo appearance is that the Gaussian blur used for the out-of-focus section of the image is calculated based on neighboring pixels. The blur samples over a 9-pixel radius around each pixel, so for lower-resolution previews this blurs a larger region than in the high-resolution final image. You need to apply the blur over a larger number of pixels to achieve the same effect in the higher-resolution image.
Unfortunately, my blur filters are currently hardcoded to sample from a set number of pixels for performance reasons, and increasing the pixel spacing will introduce image artifacts. Multiple blur passes or a custom Gaussian blur that works over a larger radius would be needed here to achieve the same size of blur on a higher-resolution image.
from gpuimage.
Related Issues (20)
- help you to kill a bug
- How to get the buffer after using Filter? HOT 2
- Video with GPUImageMovie has a strange lines when I apply GPUImageLookupFilter HOT 2
- H
- 可以给第三方传过来的视频加美颜、滤镜吗? HOT 8
- didCompletePlayingMovie call immediately HOT 1
- photo
- How to create Ordered Dithering filter using GPUImageFilter
- 添加一些滤镜,画面出现屏闪现象
- The rapid growth of memory
- GPUImageStillCamera crash with invalid array index HOT 1
- Build input file cannot be found module.modulemap Xcode project Objective-C
- How to use Lookup Filter to Video? HOT 1
- GPUImageMovie 如何播放网络视频,同时添加滤镜效果 HOT 1
- 如何用gpuimage在一个视频里添加2种模式水印?
- ShaderDesigner[4974:64452] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000299bb00> F8BB1C28-BAE8-11D6-9C31-00039315CD46
- GPUimage导入使得 UIDeviceOrientationDidChangeNotification 通知接受不到
- A function declaration without a prototype is deprecated in all versions of C and is not supported in C2x
- 'AVCaptureStillImageOutput' is deprecated: first deprecated in iOS 10.0 - Use AVCapturePhotoOutput instead.
- GPUImage for Android?! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuimage.