MATLAB Answers


separate the color channels of the image in face detection

Asked by Elahe Karimi on 14 Jun 2019
Latest activity Commented on by Elahe Karimi on 16 Jun 2019
I used this code for face detection. Input is color image.
I want to separate the color channels of the image. That is:
When I separate colors after using this code : [bbox, bbimg, faces, bbfaces, imageCrop] = detectFaceParts(detector,RedImg,1);
, code show the following error:
Error using ShapeInserter/step
The Image input has 1 color planes and the Pts input has 1 shapes. The Color value(s) parameter must be a scalar.
Error in detectFaceParts (line 137)
bbX = step(shapeInserter, bbX, bb);
Error in TrainData (line 88)
[bbox, bbimg, faces, bbfaces, imageCrop] = detectFaceParts(detector,RedImg,1);
I've sent all the code in the file.
How do I separate channels and do all of the colored matrices (that is, red and blue and green) face detection with this code?
Please advise me which problem is my work and how can I fix it?
thank you so much


Show 1 older comment
If we could run your program, that would help us help you. The algorithm may work for that poster's image, but not for yours and might require tweaking of the algorithm. You should attach your image and script if you want people to help you.
@Image Analyst , thanks a lot. My problem has been solved. For the next questions,I'm doing the thing you said. Thank you for your advice.

Sign in to comment.

0 Answers