Bonjour,
J'ai du mal avec la fonction calcHist en java. Voilà le code que j'ai écrit:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 public void histo(Mat m){
        List<Mat> image = new ArrayList<Mat>();
	image.add(m);
 
	MatOfInt channels = new MatOfInt(1);
 
	//Mat mask = Mat.zeros(3, 3, CvType.CV_8UC1);
 
	Mat hist = new Mat();
 
	MatOfInt histSize = new MatOfInt(256);
 
	float range[] = {0, 256};
	MatOfFloat ranges = new MatOfFloat(range);
 
	Imgproc.calcHist(image, channels, new Mat(), hist, histSize, ranges);
}
J'ai cette erreur là: je ne comprend pas ce que ca veut dire
OpenCV Error: Assertion failed (j < nimages) in unknown function, file ..\..\..\modules\imgproc\src\histogram.cpp