# error while visualizing the cascade stage features

I have trained a boosted cascade classifier with opencv and i want to visualize the cascade stages features as shown in the tutorial here: https://docs.opencv.org/3.3.0/dc/d88/...

The problem is that everytime i run the batch: opencv_visualisation --model=sunmodel.xml --image=sunn.bmp

where sunn.bmp is actually a positive sample from the training set, and i have also resized it to 24*24 as the defined dimension in the training process.

I get the following error: the model is not an haar or lbp feature based model! please select a model that can be visualised by the software

Although i am using Haar features in the training, I am also using the cascade parameter mode to be: -mode ALL

Any idea what is happening?

edit retag close merge delete

-mode ALL is the exact problem. For my project we did not consider rotated features and thus the drawer does not support this at all. Hence its error message should be more clear =/

( 2018-03-07 09:14:15 -0500 )edit

Thank you Steve for getting back to me :)I have actually tried using -mode HAAR too and its still giving the same error!!

( 2018-03-07 09:23:27 -0500 )edit

Can you leave the mode for training unspecified and just use -featureType HAAR. In that case it should work...

( 2018-03-07 09:35:16 -0500 )edit

Sure I will do that now :) thank you so much! one more thing, Do you think i can calculate the number of rejected windows in detectMultiScale()? as am trying to compute the value of the True negative and i need to know how many windows were rejected in the search proccess! I have also raised a question on: