-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello,
Code is great but camera preview hangs. When investigated, I found that this code is causing problem
ScanCardFragment :
` @OverRide
public Mat onCameraFrame(CameraBridgeViewBase2.CvCameraViewFrame inputFrame) {
rgba = inputFrame.rgba();
if (isScanning && dealRetriever.getDeal().getHand(currentPos).getCards().size() < 32)
{
Core.transform(rgba, gray, coefficients);
/***This line is causing problem***/
Imgproc.adaptiveThreshold(gray, bw, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 101, 35);
/***This line is causing problem***/
cards = detector.detectCardsInImage(bw, rgba);
cards_set = CardDetector.CardsToSet(cards);
getActivity().runOnUiThread(new Runnable() {
public void run() {
if(dealUpdater !=null && currentPos !=null && cards_set!=null){
dealUpdater.addCardsToHand(currentPos, cards_set);
}
}
});
}
return rgba;
}`
Can you help me in Imgprov.adaptiveThreshold function?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels