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?
can you try again, and use the
10101
button, to format your code, not the"
one ?it's getting better, keep on trying ;)