Ask Your Question

Rifat's profile - activity

2017-04-30 02:59:07 -0500 commented question Without making any changes to my already running opencv Java program, I suddenly get an error : bad flag in cvgetmat

I fixed the error.. The problem was in the image path... The path that I was providing was accidently deleted and it was passing null value as an argument... Unfortunately while debugging I was not able to find this kind of issue.. Thank you @berek

2017-04-30 00:05:23 -0500 commented question Without making any changes to my already running opencv Java program, I suddenly get an error : bad flag in cvgetmat
2017-04-29 10:04:58 -0500 asked a question Without making any changes to my already running opencv Java program, I suddenly get an error : bad flag in cvgetmat

My program was running very smoothly. But I don't know for what reason it is now showing me this error.. I am confused that whether is there any problem with the eclipse IDE in which I am writing the program or am I missing something?

[(http://Http://com. Minhaskamal. GenderRecogniser github)] I am using the predict class only from this package. I have made some changes to this program and it was running very well. Any idea what should I do?

2017-03-02 00:04:58 -0500 received badge  Enthusiast
2017-03-01 10:57:49 -0500 asked a question Is there any opencv java code available for age determination ?

i am not able to find it :(

2017-02-28 09:35:27 -0500 commented answer i want to read image captured by webcam videocapture and write that to some external file

Thanks a lot .You made it so simple.

2017-02-24 09:40:54 -0500 commented answer i want to read image captured by webcam videocapture and write that to some external file

i downloaded it from the link [(http://github.com/opencv-java/face-detection/tree/master/src/it/polito/teaching/cv)]

2017-02-24 09:33:41 -0500 commented answer i want to read image captured by webcam videocapture and write that to some external file

it is a class which is imported by the program

import javafx.scene.image.Image;
2017-02-24 08:05:36 -0500 commented answer i want to read image captured by webcam videocapture and write that to some external file

what is the way to do it.?

2017-02-24 08:03:10 -0500 commented answer i want to read image captured by webcam videocapture and write that to some external file

when i executed it separately ,it worked well. But i want to include it in a program where face is detected and saved as an object of Image class. The code is below:

Runnable frameGrabber = new Runnable()
                {

                @Override
                public void run()
                   {
                    Image imageToShow = grabFrame();
                    //System.out.println("inside runnable");
                        Platform.runLater(() -> {
                                try{
                                        originalFrame.setImage(imageToShow);
                                    }
                                catch(Exception ex)
                                        {

                                            System.out.println(ex);
                                        }
                                });
                          Imgcodecs.imwrite( "my"+".png",imageToShow );

                   }
                };

it gives the error message "The method imwrite(String, Mat) in the type Imgcodecs is not applicable for the arguments (String, Image)"

2017-02-22 11:37:22 -0500 commented answer i want to read image captured by webcam videocapture and write that to some external file

thankyou so much for your help.

2017-02-22 11:09:43 -0500 asked a question i want to read image captured by webcam videocapture and write that to some external file

I am working on a project where my first step is to detect faces by webcam and the 2nd step is to save those images into some file .i am using opencv programs for facedetection.

imagetoshow contains the image of face detected by the webcam.The code line for this is as:

Image imageToShow = grabFrame();

i did first step but i am getting problem in second step Code snippet to read the image that i am using is below:

  try{
       f = new File("imageToShow"); //image file path
       image = new BufferedImage(width, height,
       BufferedImage.TYPE_INT_ARGB);
       image = ImageIO.read(f);
       System.out.println("Reading complete.");
 }catch(IOException e){
       System.out.println("Error: "+e);
 }

It seems that it is not reading anything from the file specified .Am i doing it in the right way?

2017-02-19 08:57:42 -0500 received badge  Supporter (source)
2017-02-19 01:48:16 -0500 marked best answer .CV_LOAD_IMAGE_GRAYSCALE cannot be resolved or is not a field

Blockquote

 i downloaded the project of gender detection from opencv but i m facing
 problem in function highgui.CV_LOAD_IMAGE_GRAYSCALE .i already changed the highgui to imgproc but now it      shows CV_LOAD_IMAGE_GRAYSCALE cannot be resolved or is not a field .here is the code snippet from gender detection opencv program:
for(int i=0; i<types; i++)

{ standardImages[i] = new Mat(size, Imgproc.CV_LOAD_IMAGE_GRAYSCALE); }