when I use GPUImageHistogramEqualizationFilter, I found it doesn't work.
If I set newHistogramType = kGPUImageHistogramRed , the red color was disappeared in the result.
When I set newHistogramType = kGPUImageHistogramRGB , I got a black picture.
I guess the the value colorMapping was not sent to uniform sampler2D inputImageTexture2
the code in GPUImageHistogramEqualizationFilter.m:
` for (unsigned int x = 1; x < 256; x++) {
histogramBins[0][x] = histogramBins[0][x-1] + data++;
histogramBins[1][x] = histogramBins[1][x-1] + data++;
histogramBins[2][x] = histogramBins[2][x-1] + *data++;
data++;
}
the method updateDataFromBytes in GPUImageRawDataInput.m:
`- (void)uploadBytes:(GLubyte *)bytesToUpload;
{
[GPUImageContext useImageProcessingContext];
// TODO: This probably isn't right, and will need to be corrected
outputFramebuffer = [[GPUImageContext sharedFramebufferCache] fetchFramebufferForSize:uploadedImageSize textureOptions:self.outputTextureOptions onlyTexture:YES];
glBindTexture(GL_TEXTURE_2D, [outputFramebuffer texture]);
glTexImage2D(GL_TEXTURE_2D, 0, _pixelFormat, (int)uploadedImageSize.width, (int)uploadedImageSize.height, 0, (GLint)_pixelFormat, (GLenum)_pixelType, bytesToUpload);
}`
the author note that " This probably isn't right, and will need to be corrected", and I want to know how to solve the problem.
Thanks.
Sorry for my poor English.
when I use GPUImageHistogramEqualizationFilter, I found it doesn't work. If I set
newHistogramType = kGPUImageHistogramRed
, the red color was disappeared in the result. When I setnewHistogramType = kGPUImageHistogramRGB
, I got a black picture.I guess the the value colorMapping was not sent to
uniform sampler2D inputImageTexture2
the code in GPUImageHistogramEqualizationFilter.m: ` for (unsigned int x = 1; x < 256; x++) { histogramBins[0][x] = histogramBins[0][x-1] + data++; histogramBins[1][x] = histogramBins[1][x-1] + data++; histogramBins[2][x] = histogramBins[2][x-1] + *data++; data++; }
[_rawDataInputFilter processData];`
the method
updateDataFromBytes
in GPUImageRawDataInput.m: `- (void)uploadBytes:(GLubyte *)bytesToUpload; { [GPUImageContext useImageProcessingContext];}` the author note that " This probably isn't right, and will need to be corrected", and I want to know how to solve the problem. Thanks. Sorry for my poor English.