Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV4Android - BilateralFilter Problems

So I'm attempting to use a bilateralFilter and it's crashing for reasons unknown to me.

I'm following these as a guide and I'm not seeing anything wrong:
http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html
http://docs.opencv.org/2.4/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html

private Mat sharpen(Mat passedImage)
{
    Mat bilateral = passedImage.clone();
    int iSize = 9;

    Imgproc.bilateralFilter(bilateral, bilateral, iSize, iSize*2, iSize/2);

    return bilateral;
}

OpenCV4Android - BilateralFilter Problems

So I'm attempting to use a bilateralFilter and it's crashing for reasons unknown to me.

I'm following these as a guide and I'm not seeing anything wrong:
http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html
http://docs.opencv.org/2.4/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html

private Mat sharpen(Mat passedImage)
{
    Mat bilateral = passedImage.clone();
passedImage.clone(); //Passed Image is a 8UC4
    int iSize = 9;

    Imgproc.bilateralFilter(bilateral, bilateral, iSize, iSize*2, iSize/2);

    return bilateral;
}

OpenCV4Android - BilateralFilter Problems

So I'm attempting to use a bilateralFilter and it's crashing for reasons unknown to me.

I'm following these as a guide and I'm not seeing anything wrong:
http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html
http://docs.opencv.org/2.4/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html

private Mat sharpen(Mat passedImage)
{
    Mat bilateral = passedImage.clone(); //Passed Image is a 8UC4
passedImage.clone();
    Imgproc.cvtColor(bilateral, bilateral, Imgproc.COLOR_BGRA2BGR);
    int iSize = 9;

    Imgproc.bilateralFilter(bilateral, bilateral, iSize, iSize*2, iSize/2);

    return bilateral;
}

OpenCV4Android - BilateralFilter Problems

So I'm attempting to use a bilateralFilter and it's crashing for reasons unknown to me.

I'm following these as a guide and I'm not seeing anything wrong:
http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html
http://docs.opencv.org/2.4/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html

private Mat sharpen(Mat passedImage)
{
    Mat bilateral = passedImage.clone();
    Imgproc.cvtColor(bilateral, bilateral, Imgproc.COLOR_BGRA2BGR);

    Mat bOutput = new Mat(passedImage.size, CvType.CV_8UC3)

    int iSize = 9;

    Imgproc.bilateralFilter(bilateral, bilateral, bOutput, iSize, iSize*2, iSize/2);

    return bilateral;
}

OpenCV4Android - BilateralFilter Problems

So I'm attempting to use a bilateralFilter and it's crashing for reasons unknown to me.

I'm following these as a guide and I'm not seeing anything wrong:
http://opencvexamples.blogspot.com/2013/10/applying-bilateral-filter.html
http://docs.opencv.org/2.4/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html

private Mat sharpen(Mat passedImage)
{
    Mat bilateral = passedImage.clone();
    Imgproc.cvtColor(bilateral, bilateral, Imgproc.COLOR_BGRA2BGR);

    Mat bOutput = new Mat(passedImage.size, CvType.CV_8UC3)

    int iSize = 9;

    Imgproc.bilateralFilter(bilateral, bOutput, bilateral, iSize, iSize*2, iSize/2);

    return bilateral;
}