java.lang.RuntimeException

/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv_contrib-3.1.0/modules/face/src/lbph_faces.cpp:359: error: (-5) The number of samples (src) must equal the number of labels (labels). Was len(samples)=891, len(labels)=0. in function train


Solutions on the web32003

Solution icon of github
via GitHub by matthewcodes
, 6 months ago
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv_contrib-3.1.0/modules/face/src/lbph_faces.cpp:359: error: (-5) The number of samples (src) must equal the number of labels (labels). Was len(samples)=891, len(labels)=0. in function train

Solution icon of github
via GitHub by nightpool
, 1 year ago
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.0.0/modules/imgproc/src/imgwarp.cpp:3363: error: (-5) Unknown interpolation method in function resize

Solution icon of googlegroups
via Google Groups by Juan Camilo Solano Estrada, 1 year ago
/home/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/linux-x86_64/opencv-2.4.9/modules/core/src/matrix.cpp:805: error: (-211) Bad new number of rows in function reshape

Solution icon of github
via GitHub by joheras
, 4 months ago
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.0.0/modules/objdetect/src/cascadedetect.cpp:1634: error: (-215) !empty() in function detectMultiScale

Solution icon of github
via GitHub by ctrueden
, 4 months ago
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.0.0/modules/objdetect/src/cascadedetect.cpp:1634: error: (-215) !empty() in function detectMultiScale

Solution icon of github
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.0.0/modules/imgproc/src/color.cpp:7564: error: (-215) scn == 3 || scn == 4 in function cvtColor

Solution icon of github
via GitHub by joheras
, 4 months ago
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.0.0/modules/imgproc/src/color.cpp:7564: error: (-215) scn == 3 || scn == 4 in function cvtColor

Solution icon of github
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.0.0/modules/imgproc/src/color.cpp:7636: error: (-215) scn == 1 && (dcn == 3 || dcn == 4) in function cvtColor

Solution icon of github
via GitHub by emanresusername
, 10 months ago
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.1.0/modules/imgproc/src/templmatch.cpp:1062: error: (-215) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims() <= 2 in function matchTemplate

Solution icon of stackoverflow
/Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv-3.1.0/modules/imgproc/src/imgwarp.cpp:6360: error: (-215) src.checkVector(2, CV_32F) == 3 && dst.checkVector(2, CV_32F) == 3 in function getAffineTransform

Stack trace

  • java.lang.RuntimeException: /Users/saudet/projects/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/opencv_contrib-3.1.0/modules/face/src/lbph_faces.cpp:359: error: (-5) The number of samples (src) must equal the number of labels (labels). Was len(samples)=891, len(labels)=0. in function train at org.bytedeco.javacpp.opencv_face$FaceRecognizer.train(Native Method)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.