Closed jadelmag closed 12 years ago
How many filter do you have in your pipe? For my case, it works if I have less than 3 filters. More than that, sometimes it turns black...
well, my problem is with GPUImageToonFilter and AdaptiveThreshold, and they use more than 3 filters So i think this is the problem.
Thanks
Have you tried "prepareForImageCapture" on the last filter?
Yes, or I think so...
(void)applySelectedEffect { //Paramos la cámara [stillCamera stopCameraCapture];
//Borramos las dependencias de los filtros existentes y la cámara [filter removeAllTargets]; [stillCamera removeAllTargets];
//Creamos un nuevo filtro filter = nil;
[self selectedEffect]; [filter prepareForImageCapture];
//Creamos las dependencias entre ellos [stillCamera addTarget:filter]; GPUImageView filterView =(GPUImageView)viewCamera; [filter addTarget:filterView];
//Encendemos la cámara [stillCamera startCameraCapture]; }
each filters use prepareForImageCapture。
This is a known issue (see other issues here) that I am working on.
Well, I'm glad I found this before spending too much time. My filter chain looks something like crop -> {group} -> output, where group is subclassed and constructs ToneCurve -> Monochrome -> Vignette. Seems that removing the vignette is the most reliable, though not perfect. Calling prepareForImageCapture doesn't seem to work reliably as it should.
Try this now. I believe that I've tracked down where the black frames were coming from. The latest code in the repository should fix this.
Tested. It works! And now I dont even have to use "prepareForImageCapture". Nice work, Brad-san!
I think that did it! I can't reproduce the bug anymore.
Great work!
When I use GPUImageSmoothToonFilter, it is quite easy to reproduce this black screen issue again. When use GPUImageToonFilter , this issue happen randomly. Even it is black screen, it can still provide the valid data because it is okay capture the real image.
What is the root cause of the black screen ?
Sometimes when you change filters you have a black screen in your output. I have this problem with AdaptiveThreshold and GPUImageSmoothToonFilter with stillcamera.
How can i solve it? Only happens with this filters