Ask Your Question

Is it possible to instantiate cascadeclassifier with two different xmls ?

asked 2016-04-21 12:52:37 -0500

Gilzo gravatar image

I want to detect an object within another object. Its not make sense to do all the pre processing (integral image, feature extraction etc...) again if I know that the second object is within the first one. The trivial way to do it is to find the first object and then set ROI for the other classifier. But then, we doing some of the job we have already done. So I wander if there is a way to do
mJavaDetector = new CascadeClassifier(mCascadeFile.getAbsolutePath());

but with more that one XML.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-04-22 00:01:45 -0500

berak gravatar image

no, you can't.

to detect 2 different objects, you need 2 seperate CascadeClassifier instances, and load a seperate xml each.

"But then, we doing some of the job we have already done."

imho, that's not an issue. calculating the integral img for lena takes 0.001343 seconds on my box

(and imho you won't be able to share the feature extraction for different objects)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-04-21 12:52:37 -0500

Seen: 72 times

Last updated: Apr 22 '16