quagga2: Any reasons why the version 1.7.7 doesn't provide as much feedback on processd, compare to the V0.12.1?

Any reasons why the version 1.7.7 doesn’t provide as much feedback on processed, compare to the V0.12.1?

I’m talking about those green and blue rectangles printed in the overlaid canvas:

Quagga.onProcessed(function(result) {
		 var drawingCtx = Quagga.canvas.ctx.overlay,
            drawingCanvas = Quagga.canvas.dom.overlay;

	        if (result) {
	            if (result.boxes) {
	                drawingCtx.clearRect(0, 0, parseInt(drawingCanvas.getAttribute("width")), parseInt(drawingCanvas.getAttribute("height")));
	                result.boxes.filter(function (box) {
	                    return box !== result.box;
	                }).forEach(function (box) {
	                    Quagga.ImageDebug.drawPath(box, {x: 0, y: 1}, drawingCtx, {color: "green", lineWidth: 2});
	                });
	            }
	
	            if (result.box) {
	                Quagga.ImageDebug.drawPath(result.box, {x: 0, y: 1}, drawingCtx, {color: "#00F", lineWidth: 2});
	            }
	
	            if (result.codeResult && result.codeResult.code) {
	                Quagga.ImageDebug.drawPath(result.line, {x: 'x', y: 'y'}, drawingCtx, {color: 'red', lineWidth: 3});
	            }
	        }
		}); 

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@ericblade I can confirm 1.8.4 fixes the documented issue. Behaviour is now near identical to 1.4.2. Your efforts are greatly appreciated @ghevge.

Thanks for looking into that. I’ll see if I can do a drop in replacement between 1.4 and 1.5 on my app if that doesn’t break anything (it shouldn’t?) and see what i can see… i’m not sure when i’ll be able to get to that, life has been pretty nuts the last several months.

I can confirm in 1.7 onProcessed contains an almost constantly-empty box and boxes (even with all debug flags enabled), compared to near-constant updates in older versions. I’m now in the process of going through some past versions to track down when it was limited, and will update this comment.

Final edit: 1.4.2 correctly returns lots of boxes, 1.5.0 and above don’t.