c#,image-processing,imagefilter
The main problem is you're blurring the pixel with pixels to the left and below the source, but not to the right and top. Try changing your inner loop to: for (Int32 x = Math.Max(0, xx - blurSize); x <= Math.Min(xx + blurSize, image.Width-1); x++) { for (Int32 y =...
image,opencv,filter,imagefilter
Should summary of kernel matrix elements of this filter is equal to 1? If you want the brightness of the convoluted image to be the same, then the sum of all elements of the kernel should be 1, e.g. if you want to blur your image. This is called...
image-processing,gpuimage,core-image,imagefilter,adaptive-threshold
Here's a CIKernel that works well on your sample image kernel vec4 coreImageKernel (sampler i) { vec2 dc = destCoord(); // center pixel color vec4 c = unpremultiply(sample(i, samplerTransform(i,dc+vec2(0.0,0.0)))); // for a whiteboard, the max of a neighborhood is likely to be the color // of the whiteboard vec4 cmax...
ios,objective-c,calayer,imagefilter,snapchat
You should only need 2 image views (the current one and the incoming one, as this is a paginated style scroll), and they switch role after each filter change. And your approach of using a layer mask should work, but not on a scroll view. So, ensure that your view...
java,bytearray,bufferedimage,imagefilter
Use the RawImageInputStream from jai. This does require knowing information about the SampleModel, which you appear to have from the native code. Another option would be to put your rawBytes into a DataBuffer, then create a WritableRaster, and finally create a BufferedImage. This is essentially what the RawImageInputStream would do....
c++,opencv,masking,imagefilter
If you are asking how to multiply matrices, OpenCV API does it: Mat::mul Performs an element-wise multiplication or division of two matrices. EDIT: This tutorial explains how to apply a mask matrix on an image. I think that's what you are looking for.. http://docs.opencv.org/doc/tutorials/core/mat-mask-operations/mat-mask-operations.html...
image-processing,opencl,imagefilter
You can keep the buffer in the global memory of the device between kernel calls to avoid the extra copies. When you create the buffer, make sure you use the flag 'CL_MEM_READ_WRITE', this will allow the Sobel kernel to write to it, and the Median kernel to read from it...
java,opencv,netbeans,imagefilter
You create a 9x9 kernel matrix, but then fill only a 3x3 submatrix of it, leaving other elements unititialized. To fix it, just change: int kernelSize = 9; to: int kernelSize = 3; Your code actually works in the newest Opencv (3.0 beta), but those unititialized elements break it in...
java,android,c++,android-ndk,imagefilter
R = Color.red(pixel); ... G = Color.red(pixel); ... B = Color.red(pixel); You are taking the red value for each color in your Java code. You probably want to adjust that to take the correct value instead like so: R = Color.red(pixel); ... G = Color.green(pixel); ... B = Color.blue(pixel); As...