Ask Your Question

emre's profile - activity

2018-11-28 07:39:18 -0600 received badge  Notable Question (source)
2017-11-24 02:36:28 -0600 received badge  Notable Question (source)
2016-03-20 07:38:17 -0600 received badge  Popular Question (source)
2015-10-20 09:28:55 -0600 received badge  Popular Question (source)
2013-05-20 09:06:00 -0600 asked a question I do not find opencv jar file to work in eclipse linux

I downloaded opencv 2.4.5 for linux and I wanted to use on eclipse IDE, I examined java guide its website, and according to that guide I must create user library and add external jar file which opencv-2.4.5.jar named.Although I did not find this jar file. How can I do to work in Eclipse on Linux ?

2013-03-31 10:07:44 -0600 received badge  Scholar (source)
2013-03-31 10:07:43 -0600 received badge  Supporter (source)
2013-03-31 10:07:37 -0600 commented answer I can't detect full body in java

thanks this solution is working rigth (just I guess cascadeClassifier.detectMultiScale(resim, rect, 1.05, 0); should be cascadeClassifier.detectMultiScale(resim, rect, 1, 1.05); because double and int values are in different parametres)...

2013-03-31 09:50:22 -0600 received badge  Editor (source)
2013-03-31 09:49:11 -0600 asked a question I can't detect full body in java

While I use haarcascade_upperbody.xml to detection in videocapture, I never get any error or problem but when I used haarcascade_fullbody.xml program couldn't detect anyone's body.. I am going to use finding human heigth...if you give some hints, solutions or advising another way for this problem, I will very pleased...thanks for reading

here is my code :

package main;

import javax.swing.JOptionPane;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.core.MatOfRect;
import org.opencv.core.Point;
import org.opencv.core.Rect;
import org.opencv.core.Scalar;
import org.opencv.highgui.Highgui;
import org.opencv.highgui.VideoCapture;
import org.opencv.objdetect.CascadeClassifier;

public class ResimCek {

public void resimCek() throws InterruptedException{
    System.loadLibrary("opencv_java244");
    CascadeClassifier cascadeClassifier = new CascadeClassifier("haarcascade_fullbody.xml");
    VideoCapture cap = new VideoCapture(0);
    if(!cap.isOpened())
        JOptionPane.showMessageDialog(null, "Cam can not found", "Error", JOptionPane.ERROR_MESSAGE);

    Mat frame = new Mat();
    cap.retrieve(frame);
    Highgui.imwrite("cek.jpg", frame);
    cap.release();
    Mat resim = Highgui.imread("cek.jpg");
    MatOfRect rect = new MatOfRect();
    cascadeClassifier.detectMultiScale(resim, rect);
    Scalar renk = new Scalar(255, 0, 0);
    for(Rect dik : rect.toArray()){
        Core.rectangle(resim, new Point(dik.x, dik.y), new Point(dik.x+ dik.width, dik.y+dik.height), renk);
    }
    System.out.println(rect.height());
    Highgui.imwrite("dene.jpg", resim);
    }
}