[JAVA] Bureau: OpenCV prend une image claire

Goal
Last time OpenCV taking a dark picture, this time modify some code and get a clear picture.

OpenCV_webcam2.java



import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.videoio.VideoCapture;

public class OpenCV_webcam2 {

	static {
		System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
	}
	
	public static void main(String[] args) {
		VideoCapture camera = new VideoCapture();
		camera.open(0);
		
		if(!camera.isOpened()) {
			System.out.println("Error");
		}else {
			Mat frame = new Mat();
			try {
				System.out.println("Utilisez la version Ryo de l'éclairage de battement de webcam");
				camera.read(frame);
				Thread.sleep(500);
				camera.read(frame);
				Thread.sleep(500);
				camera.read(frame);
				Thread.sleep(500);
				
				Imgcodecs.imwrite("D:\\projects\\Java\\OpenCV_Samples\\resource\\imgs\\frame_clear.jpg ",frame);
				System.out.println("Achèvement des applaudissements");
				
			}catch(Exception e) {
				e.printStackTrace();
			}
		}
		camera.release();
	}
}

Result
![frame_clear.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/276243/256f14df-351c-8966-49db-996e5e43e67a.jpeg)

Recommended Posts

Bureau: OpenCV prend une image claire
Bureau: OpenCV prend une photo
Bureau: Manuel OpenCV une prise de vue
Bureau: image de fusion OpenCV
Bureau: seuil OpenCV
Bureau: OpenCV Dilate
Bureau: OpenCV Expand
Bureau: OpenCV Affine
Bureau: OpenCV Emboss
Bureau: OpenCV CLAHE
Bureau: OpenCV HDR
Bureau: Polylignes OpenCV
Bureau: OpenCV Denoise
Bureau: netteté OpenCV
Bureau: OpenCV Concat
Bureau: OpenCV OpenCV_SalonUseBlurAddWeighted
Bureau: OpenCV Mosaic
Bureau: OpenCV Erode
Bureau: OpenCV Denoise
Bureau: Rectangle OpenCV
Bureau: OpenCV Watershed
Bureau: Texte OpenCV
Bureau: OpenCV NormalizeBlur
Bureau: OpenCV StereoSGBM
Bureau: OpenCV Spot
Bureau: OpenCV Canny
Bureau: OpenCV Denoise3
Bureau: histogramme OpenCV
Bureau: OpenCV Dft
Bureau: OpenCV Decolor
Bureau: OpenCV FaceDetector
Bureau: OpenCV Denoise2
Bureau: OpenCV StereoBM
Bureau: Filtre OpenCV Kirsch
Bureau: Filtre laplacien OpenCV 2
Bureau: OpenCV Add WaterMark
Bureau: OpenCV Fill ConvexPoly
Bureau: OpenCV Grab Cut
Bureau: OpenCV Sharpness Gui
Bureau: Filtre Freichennel OpenCV
Bureau: OpenCV Draw Circle
Bureau: OpenCV Mean Filter
Bureau: OpenCV Sobel Filter2
Bureau: OpenCV OpticalFlow PyrLK
Bureau: Piano virtuel OpenCV
Bureau: Filtre OpenCV Scharr
Bureau: aperçu de la webcam Opencv
Bureau: Filtre laplacien OpenCV
Bureau: Flou médian OpenCV
Bureau: OpenCV Add Broad
Bureau: OpenCV Robinson Filter
Bureau: enregistrement vidéo OpenCV
Bureau: Aplatissement de la texture OpenCV
Bureau: OpenCV Flood Fill
Bureau: espace colorimétrique OpenCV
Bureau: Filtre OpenCV SqrBox
Bureau: redimensionner l'image OpenCV
Bureau: Croquis au crayon OpenCV
Bureau: carte des couleurs OpenCV
Bureau: OpenCV Draw Point
Bureau: OpenCV Sobel Filter