Ask Your Question

muithi's profile - activity

2018-03-19 04:23:04 -0600 received badge  Notable Question (source)
2017-01-02 11:39:27 -0600 received badge  Student (source)
2016-08-30 09:25:36 -0600 received badge  Popular Question (source)
2015-10-03 09:03:08 -0600 commented question Building OpenCV 3.0 with OpenCV_Contrib for use with Facial Recognition in Java Development in Windows 7

Anyone has an idea on how to go about this?

2015-08-18 02:51:55 -0600 commented question Building OpenCV 3.0 with OpenCV_Contrib for use with Facial Recognition in Java Development in Windows 7

I build the OpenCV.sln with Visual Studio 2012 and after the build I got opencv_face300.dll in the release folder. There was no new opencv-300.jar that was build nor was there any new opencv_java300.dll build in the java folder after the build. What do I need to do to be able to do now to be able to have a new jar file that will allow me to do import.org.opencv.face.*; into my Java workspace?

2015-08-17 06:10:03 -0600 asked a question Building OpenCV 3.0 with OpenCV_Contrib for use with Facial Recognition in Java Development in Windows 7

Hi,

I have followed the steps (using gui version of cmake) shown here on how to build OpenCV with extra modules. My sole goal is to be able to use FaceRecognizer within OpenCV 3.0 while developing in Java.

The first configure looked like this

Second configure after adding path of opencv_contrib modules to OPENCV_EXTRA_MODULES_PATH looked as shown here

Finally after clicking generating I had the following following;

I do not know what to do next as I even changed directory to build folder and attempted to run make -j5 from command prompt but I could not do import org.opencv.face.*; in my netbeans Java workstation.

What else do I need to do afterwards to be able to add import org.opencv.face.*; in my Java workstation?

I also came across a previous similar post too but I did not understand how to make headways with it.

I will appreciate all help and howtos.

Regards,

Joseph Mwema

2015-08-13 07:50:33 -0600 commented question Merging / Combining separately trained Fisherface models

@StevenPuttemans I am now using 150 by 150 pixels. I was using 50 by 50 pixels initially and I was not getting good results. I decided to get loads of face images and had about 15000 of them but after doing face image processing on them (cropping, resizing and face alignment) I ended up with slightly over 12000 face images. I hope to get better results with 150 by 150 pixels.

You say I can get good results if I use face images with low resolution? I am actually steering away from that. Please explain how that would aid in getting good results? I like the approach suggested by @berak of using several predictions.

I wish I could lay my hands on a machine with 32Gb of RAM like you say ( that would have to be a 64 bit ) machine though, like a Proliant HP blade server or sth like that.

2015-08-13 05:38:53 -0600 commented question Merging / Combining separately trained Fisherface models

Thanks @berak for this insightful explanation. Infact I already trained 12 models. You have actually answered several other questions I had on my mind about using different other models for various recognition purposes on the same test image. I have never used more than one model in an application but that last pointer you made about prediction being fast is indeed a very good idea / suggestion. Thank you so much. This was very helpful. I appreciate.

I would rather use fisherface in preference to lbph model. Thank you.

2015-08-13 03:48:20 -0600 commented question Merging / Combining separately trained Fisherface models

Thanks @berak for replying. How would I then go about training a fisherface model with 12000 face images? My application bombs out with insufficient memory allocation when I attempt to train with all the 12000 face images. I had already trained 12 fisherface models which I wanted to merge into one but unfortunately as you have indicated this does not seem to be a feasible option. What damage would it cause if I decided to merge the *.xml files of the separate models into one *.xml model?

2015-08-13 02:00:40 -0600 asked a question Merging / Combining separately trained Fisherface models

Hi,

Is it possible to merge separately trained Fisherface models into one model? I am running into insufficient memory allocation and I was thinking maybe I could break down my training images into small data sets and train them separately (each data set of images trained will output one trained fisherface model ) because I have a large number of images I want to train and have one trained model in the end. I would like to know if this is feasible and if it is, how would I go about it? Is there a function for combining trained models into one in opencv or a way you would recommend I do it? I want to train around 12000 face images. My workstation only has 4Gb of RAM. I save the trained fisherface model in xml.

Regards,

Joseph Mwema

2015-06-29 10:39:11 -0600 asked a question How would I do Face Alignment on JPEG face images in OpenCv while using Java?

I want to align several faces I have at my disposal here using openCv. I want to read a jpg face photo, align it and finally save it as in jpg after alignment. Here is where I am stuck. See below

public class FaceImageAlignment {

/**
 * @Param args the command line arguments
 */
public static void main(String[] args) throws IOException {
    // TODO code application logic here

    BufferedImage img = null;
    img = ImageIO.read(new File("D:/face_test.jpg"));

    //How to align face image using openCv
    //This is where I am stuck on doing face alignment. I want to do Affine alignment on face images as  follows
    //I want to be able to use e.g. an opencv Affine alignement function assuming that function is AffineAlignment()
    //I want to achieve the following assuming there is such a function for affine alignment in OpenCv with Java
    AffineAlignment imgAlign = new AffineAlignment();
    //but I do not seem to figure out how to do face alignment with it



    BufferedImage imgAligned = new BufferedImage(//I will need to put aligned Image here as a BufferedImage);
    File outPutFile = new File("D:\\face_aligned.jpg");
    ImageIO.write(imgAligned, "JPEG", outPutFile );

}

}

Please I need your help on how to implement this in Java. Someone please show me how to do this?

2015-06-24 17:36:25 -0600 answered a question crop detected face image using four points in opencv java

I actually found this example found here very helpful indeed. It worked well for me

2015-06-24 13:31:26 -0600 asked a question Where would I get an all african race database of images for training of gender prediction?

What are the best recommendations for an all african race databases for training of gender prediction? I want to have the best results scores because my target group will be mostly africans. Suggestions Please? I have already laid my hands on this one www.milbo.org/muct/ but it is a mixture of all several races.

2015-06-24 12:44:21 -0600 received badge  Enthusiast
2015-06-18 02:03:29 -0600 commented answer How would I format my string in opencv java to implement next line via putText?

Noted. Thanks for the heads up. Much appreciation.

2015-06-17 07:29:35 -0600 commented question How would I format my string in opencv java to implement next line via putText?

Thank you berak. That did the trick. I actually did this and now I have the 2 lines as I wanted. Thanks a bunch.

double fontScale = 2;
Scalar color = new Scalar(fontScale);
Point pointXY1 = new Point(10, 10);
Point pointXY2 = new Point(10, 30);

putText(imgMat, "Name  :"+resultRetrieved[4], pointXY1 , FONT_HERSHEY_PLAIN, 0.8, color, 1, CV_AA, false);
putText(imgMat, "ID     :"+resultRetrieved[5], pointXY2 , FONT_HERSHEY_PLAIN, 0.8, color, 1, CV_AA, false);
2015-06-17 06:54:35 -0600 commented question How would I format my string in opencv java to implement next line via putText?

Oh! let me try with 3 putText() functions.

2015-06-17 06:45:20 -0600 asked a question How would I format my string in opencv java to implement next line via putText?

I have formated my string to be output via putText() as follows;

String predictedResult = "1. Name :"+resultRetrieved[4] + "\r\n"+ "2. ID :"+resultRetrieved[5] + "\r\n";

in putText() I pass

predictedResult

and I expect to have these two lines

  1. Name: Joseph Mwema
  2. ID: IDTEST001

but I end up having this one liner

Name: Joseph Mwema?? ID: IDTEST001??

How can I get this fixed? I am developing my application using java. Someone kindly show me how to do this correctly?

2015-06-04 04:41:56 -0600 asked a question Could I please request anyone to send me OpenCv_java2411.dll 32bit?

I have a limited internet connection here that limits download of big files. I would like to request anyone who is on OpenCv 2.4.11 to kindly send me a link or show me a place I can download OpenCv_java2.4.11.dll 32 bit. Thank you.

2015-05-30 02:39:09 -0600 commented question How would I go about Saving of a Trained Model of a Person's Set of Face Images to an SQL RDBMs Database?

Both opencv and javacv save to a file. I know with javacv I am on my own unlike if I was using opencv where there's adequate support and documentation. I think I figured out how to go about it. I just need some little time to accomplish it then I share it here for anyone else looking for the same to freely use it.

2015-05-29 17:15:17 -0600 received badge  Editor (source)
2015-05-29 17:06:53 -0600 commented question How would I go about Saving of a Trained Model of a Person's Set of Face Images to an SQL RDBMs Database?

Hi berak, I am using javacv from javacv-0.11 binary bundles.Is that what you were inquiring about?

2015-05-29 15:18:41 -0600 asked a question How would I go about Saving of a Trained Model of a Person's Set of Face Images to an SQL RDBMs Database?

I would like to know the best way of saving the face images of a person to an SQL database after training a model of the person's face images.

Would it be OK to serialize the person_images.yml file and save it as field value in a SQL relation or is there a way I can get it as a string, byte array and save it to SQL relation in a RDBMs database?

I am using OpenCv with Java and this is the function I am looking at FaceRecognizer.save("person_images.yml") to FaceRecognizer.save("how_can_I save_this_to_SQL_Database?")

2014-10-22 08:34:30 -0600 commented question How to make matching by minutiae

Hi galimjan, how did you manage to extract minutiae' x,y position and euclidean distance? I am just looking for a way to do it in Open CV, would you kindly point me in the direction where I can get code to retrieve minutiae x, y positions and their euclidean distance?

2014-10-22 08:30:37 -0600 received badge  Supporter (source)