Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having errors DLL of the cam not installed !! #14

Open
mbadinga1 opened this issue Nov 20, 2023 · 7 comments
Open

Having errors DLL of the cam not installed !! #14

mbadinga1 opened this issue Nov 20, 2023 · 7 comments
Assignees

Comments

@mbadinga1
Copy link

Hello,
I having an issues when I launch the project.
DLL of the cam not installed !! Is there another way to have avaspecx64.dll ? I try on internet and I contacted the company also but no success.

Thank you for help

@Mahieu-Williame
Copy link
Contributor

Mahieu-Williame commented Nov 23, 2023

Hello,

you can find the avaspecx64.dll following this instruction :
$ pip install https://github.com/MSLNZ/msl-equipment/archive/main.zip
be aware to install it in the correct folder as describe in the main page of spas (../spas/lib/avaspec3/avaspecx64.dll)

The DLL of the camera is mandatory to acquire not to reconstruct hyperspectral cube. Let me know our needs, acquisition or reconstruction ? in the case of acquisition, let me know the model of your camera ?

best

@tbaudier
Copy link
Contributor

Could you have a look to that branch please #15

@mbadinga1
Copy link
Author

Hi there! I really appreciate your reply. Thank you so much for that.
But even after testing with the branch without lib, I'm still having this problem. The screen grab is as follows:

image
image
In my second screenshot, could be a problem with opencv ( I try with this but no success : https://stackoverflow.com/questions/43184887/dll-load-failed-error-when-importing-cv2)

I have also tried with spyder here console errors :
image

The response from @Mahieu-Williame,I installed the library but can find avaspecx64.dll after installation, it is a folder with MSL-Equipment files.

I followed readme instructions, is the installation part of readme up to date ? Because requirements.txt is not inside ./spas/ . The response from @Mahieu-Williame, installation of library in : (../spas/lib/avaspec3/avaspecx64.dll) this not the case on readme too (this not my main point).

Thank you so much.

@Mahieu-Williame
Copy link
Contributor

Hi,
the "lib" folder must be installed in the parent folder: SPAS_INSTALL_WITHOUT_LIB/lib. As I see, you installed it in the "spas" child folder: SPAS_INSTALL_WITHOUT_LIB/spas/lib. Actually our main folder is called "spas" where we also have a subfolder called "spas".

Are you using a 32-bit Win OS? We have not tried SPAS on a 32-bit computer!

You have another error, the program cannot find the file "cie-cmf.txt" to convert the hypercube into an RGB image. You can see this file in your "spas" folder. In the "convert_spec_to_rgb.py" file, change the line :
cmf = np.loadtxt(Path(file).parent.joinpath('cie-cmf.txt'), usecols=(1,2,3))
by :
cmf_path = 'your path to the file : /cie-cmf.txt'
cmf_all = np.loadtxt(cmf_path)
cmf = cmf_all[:, 1:]

Try installing the DLL in the right place to see if the bug with CV2 goes away?

best

@mbadinga1
Copy link
Author

Hi ,
Thank you for reply.
My PC is x64-based PC ! I did not try spas on 32-bit (it is true in my screenshot we can see Win32 but this not 32-bit PC see https://stackoverflow.com/questions/29745275/entry-message-msc-v-1500-64-bit-amd64-on-win32).

I still have the same issue, even by replacing the path as you describe. I put DLL is right place but still have the same CV2 problem.
image

I have comment all cv2 in file to bypass this error but another error come in : spyrit exists but not spyrit.learning
image

Any help ?

Thank you !

@mbadinga1
Copy link
Author

another question , I would like to know if it is possible to have an hypercube with the resolution such as 512x512x2048 or more!
Thanks

@Mahieu-Williame
Copy link
Contributor

Hi,
CV2 is used to visualize in live the output of the camera to adjust the optical elements. It is activated when execute the line :
displayVid(camPar) in the "main_seq_2arms.py" module

The "Learning" folder in spyrit no longer exists since the new fork. The "Permutation_Matrix" function is found in the following module : "spyrit/misc/sampling.py". You can change the line :
from spyrit.learning.model_Had_DCAN import Permutation_Matrix
by
from spyrit.misc.sampling import Permutation_Matrix

I did not try it

For raw acquisition, the hypercube size is limited by the physical memory of the DMD we use. This model can store a maximum of 43000 patterns that means that 128x128 is the maximum (spectral dimension has no limit and depends on the spectrometer detector). This lead to 128²x2 = 32734 patterns. A subsampling strategy is implemented which reduce the numbers of patterns. Therefore, a 256x256 matrix could be acquired with a subsamplig factor of 3 which is entirely possible. A 512x512 matrix could be acquired with a subsamplig factor of 12 that become complicate at this stage of development. But another limitation is the size of the covariance matrix that becomes huge, it is the square of the square of the size of one side of the hypercube :
128 -> 1 GB
256 -> 17 GB
512 -> 275 GB

best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants