always getting "Malformed data passed to binarizer."
See original GitHub issueHi I am always getting the same malformed data error. Even when I simply create an Uint8Array filled with RGBA values I get the same error. like this:
pixelBuffer = new Uint8Array(textureSize * textureSize * 4);
I have tried using Uint8ClampedArray with the same result. What am I doing wrong here?
I made a fiddle here with my project that throws the error. The error is thrown when you click on the screen.
To give you some background info on the fiddle, I am using the 3D graphics library Three.js to scan QR within the 3d environment (will be used for augmented reality). In the scene, the camera is being rendered out to a DataTexture like in this example. The idea is to use the Uint8Array texture data to give to jsQR.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top Results From Across the Web
Why do I get a "Malformed data passed to binarizer" while ...
I found the error... I should use const code = jsQR(imageData, width, height);. instead of: const code = jsQR(imageData, blue.width, ...
Read more >Add option to disable inverting (#78) - Codecell
throw new Error("Malformed data passed to binarizer."); } // Convert image to greyscale. blackPoints.set(hortizontalRegion, verticalRegion, average);.
Read more >mtweb.cs.ucl.ac.uk/mus/lib/python2.7/scikit_learn-...
We get the default parameters from init and then # compare these against the actual values of the attributes. # this comes from...
Read more >sklearn.preprocessing.Binarizer
Binarize data (set feature values to 0 or 1) according to a threshold. Values greater than the threshold map to 1, while values...
Read more >Index (Spark 3.0.2 JavaDoc) - Apache Spark
Aborts this writing job because some data writers are failed and keep failing ... Get the attempt ID for this run, if the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had to change to the following
new Uint8ClampedArray(png.toRGBA8(data)[0])
after decoding the png buffer, then it worked. Example:@erikparr, hey did you figure out what was wrong? Im getting a similar error