I am trying to loop on frames video in openCV java here is my code
Mat frame = new Mat();
int numOfFrames = 0;
boolean hasNext = true;
while(hasNext){
hasNext = video.read(frame);
numOfFrames++;
}
the problem is , it loops forever with no result or error or memory leak ! any help please