You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing your project since I have to decode a wsq file into a png image, but I'm having some errors.
At first I tried with a wsq file i'm currently working with (which I'll attach) and I got the following output.
File "D:\BachelorThesis\decoder.py", line 321, in
main()
File "D:\BachelorThesis\decoder.py", line 317, in main
WSQFileReader().decode(WSQcompressed_file,showDetails).tofile(WSQuncompressed_file)
subbands[i] = np.asarray((self.blocks[0] + self.blocks[1] + self.blocks[2])[prev: prev + size]).reshape((M,N))
ValueError: cannot reshape array of size 8797 into shape (98,90)
Then I tried with an image from the NIST sample dataset where It worked fine. I got the png image successfully.
Then the error also showed up when I used an image from the sample images from the NIST dataset. Specifically with:
D:\reference_images_v2.0_raw\decode\225\sample_01.wsq (Which I'll also attach)
"File "D:\WSQ\BachelorThesis\decoder.py", line 127, in decode
subbands[i] = np.asarray((self.blocks[0] + self.blocks[1] + self.blocks[2])[prev: prev + size]).reshape((M,N))
ValueError: cannot reshape array of size 149900 into shape (375,400)"
Do you mind checking this out?. I suspect it might be a dependency problem. I installed all of the requeriments you specified on a virtual environment.
Hello, sorry for the late response but I'm quite busy with exams at the moment.
I've investigated the issue and there seems to be a size mismatch between subbands during the decoding process.
I have attached a quick solution to the problem. Although the fix does not work in the expected way (the decoded image might have some artifacts), it does provide a way to continue the decoding process without halting the program.
At the moment this is the best I can do, but I will definitely look into it at a later time.
Hi !
I was testing your project since I have to decode a wsq file into a png image, but I'm having some errors.
At first I tried with a wsq file i'm currently working with (which I'll attach) and I got the following output.
File "D:\BachelorThesis\decoder.py", line 321, in
main()
File "D:\BachelorThesis\decoder.py", line 317, in main
WSQFileReader().decode(WSQcompressed_file,showDetails).tofile(WSQuncompressed_file)
subbands[i] = np.asarray((self.blocks[0] + self.blocks[1] + self.blocks[2])[prev: prev + size]).reshape((M,N))
ValueError: cannot reshape array of size 8797 into shape (98,90)
Then I tried with an image from the NIST sample dataset where It worked fine. I got the png image successfully.
Then the error also showed up when I used an image from the sample images from the NIST dataset. Specifically with:
D:\reference_images_v2.0_raw\decode\225\sample_01.wsq (Which I'll also attach)
"File "D:\WSQ\BachelorThesis\decoder.py", line 127, in decode
subbands[i] = np.asarray((self.blocks[0] + self.blocks[1] + self.blocks[2])[prev: prev + size]).reshape((M,N))
ValueError: cannot reshape array of size 149900 into shape (375,400)"
Do you mind checking this out?. I suspect it might be a dependency problem. I installed all of the requeriments you specified on a virtual environment.
sample_wsq_files.zip
PS: Awesome work.
The text was updated successfully, but these errors were encountered: