Hi.
Im trying to write a program in OpenCV (using java binding) that uses the cvLoad function.
I will be executing this row multiple times: CvHaarClassifierCascade cascade = new CvHaarClassifierCascade(cvLoad("data.xml"));
Is there someway I can exclude the IO for all the times the above is executed?
I tried to re-use and copy the pointer to the xml data and with that logic avoid the thousands of IO executions.
Pointer xmlData;
<lots of="" logic="">
private Pointer getClassifierData() {
if(xmlData != null) { //dont start any IO, reuse xml data, resue pointer in some form? Pointer resusedPointer = xmlData.copyToNewPointer(); //here is what I cant figure out
} else { xmlData = cvLoad("data.xml"); }
}
Thanks
//Fredrik