Giter Club home page Giter Club logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Did you try cvEqualizeHist( img, out ) instead?

Original comment by [email protected] on 4 Oct 2010 at 11:32

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Yes, but even wors; it compiles, but it crashes on Runtime..
How about the Grayscale conversion problem?

Original comment by [email protected] on 4 Oct 2010 at 12:04

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
I made some changes to that recently to fix issue #24. Can you try with this 
test package instead and see what happens? thanks
    http://www.ok.ctrl.titech.ac.jp/~saudet/javacv.jar

Original comment by [email protected] on 4 Oct 2010 at 1:12

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Unfortunately it's still the same..

Original comment by [email protected] on 4 Oct 2010 at 2:36

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
If you are trying to convert a color image to a gray image, you should used the 
cvCvtColor() function, as exemplified in the README.txt file:
            // Let's try to detect some faces! but we need a grayscale image...
            cvCvtColor(grabbedImage, grayImage, CV_BGR2GRAY);
Does the cvCvtColor() function work or not?

Original comment by [email protected] on 5 Oct 2010 at 11:43

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
That works perfect for grayscale!

However, we still have the problem with histogram equalization. In particular, 
I have found that the problem might be with the cvCreateImage part: I created a 
function to test just cvCreateImage, and in fact it does not work:
public BufferedImage testcvCreateImage(BufferedImage animg)
{
    IplImage img = IplImage.createFrom(animg);

        IplImage testimg = cvCreateImage(cvSize(img.width, img.height), IPL_DEPTH_8U, 1);       

        BufferedImage testBufferedimg = testimg.getBufferedImage();

        return testBufferedimg; //NOT DISPLAYABLE       
}

This might be causing the histogram equalization to fail? Or it may need to be 
treated as a new, separate issue?

Original comment by [email protected] on 5 Oct 2010 at 12:35

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
What do you mean "NOT DISPLAYABLE"? What happens? testimg is an initialized 
image, it's not going to contain anything interesting..

Original comment by [email protected] on 5 Oct 2010 at 1:33

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
True, I was doing it the wrong way. For future readers looking for a sample 
code in javacv for histogram equalization, this sample function code works just 
fine (thanks Samuel, you can now close this issue):
public BufferedImage Equalize(BufferedImage bufferedimg)
    {
        IplImage iploriginal = IplImage.createFrom(bufferedimg);

        IplImage srcimg = IplImage.create(iploriginal.width, iploriginal.height, IPL_DEPTH_8U, 1);
        IplImage destimg = IplImage.create(iploriginal.width, iploriginal.height, IPL_DEPTH_8U, 1);

        cvCvtColor(iploriginal, srcimg, CV_BGR2GRAY);

    cvEqualizeHist( srcimg, destimg );

        BufferedImage eqimg = destimg.getBufferedImage();

        return eqimg;
    }

Original comment by [email protected] on 5 Oct 2010 at 2:29

from javacv.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 28, 2024
Good!

Original comment by [email protected] on 8 Oct 2010 at 3:01

  • Changed state: Done

from javacv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.