Closed FabianPlum closed 2 years ago
Could you post your scan settings here so we can have a look? One image every two seconds is not necessarily unusual, given the time it takes the scanner to move from one position to the next. Are you using the latest version of the scAnt code?
Yes I updated the script file.
Did you download the latest version of the entire repository or only one specific file?
It also seems like you are using two 5 mm extension tubes for a relatively large specimen. In this case, one should suffice. Check that the animal is properly in focus, by adjusting the focus on the lens.
I am not sure if I download all, I will check and update the files again and try again. Thanks
Are you using a USB 3.0 (or later) cable for the camera? If not, that may lead to long transfer times. It also appears, that your image looks not well exposed.
You can try opening the aperture of your lens further and increasing the gain. You should also adjust the red and blue balance ratios, as right now the image appears to have a noticeable blue tint
yes, I am using USB 3.1. I have attached the whole log information below, in case you capture anything I am doing wrong, please let me know. Right now Z-axis stopped at -10000 and not going further, Image is not focused. The scanner is running but nothing happening. The saved images are not in focus. I have attached a screenshot of the settings.
(base) C:\Users\basnagala.1>cd C:\Users\basnagala.1\Documents\GitHub\scAnt
(base) C:\Users\basnagala.1\Documents\GitHub\scAnt>conda activate scAnt
(scAnt) C:\Users\basnagala.1\Documents\GitHub\scAnt>python scAnt.py Spinnaker library version: 2.5.0.80 Detected Blackfly S BFS-U3-200S6C with Serial ID 21519381 Number of cameras detected: 1
Execute CustomFLIR.initialise_camera and pass the number of the listed camera, in case more than one has been detected!
Acquisition mode set to continuous... CONFIGURING EXPOSURE
Automatic exposure disabled... Shutter time set to 90000 us...
Automatic exposure enabled...
Automatic gain enabled...
Homing stepper X
Home reached for stepper: X
QObject::connect: Cannot queue arguments of type 'QList
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
C:\Users\basnagala.1\Documents\GitHub\scAnt\scAnt.py in checkActiveStackThreads(self=<__main__.scAnt_mainWindow object>) 1220 print("Failed to save:", img[1]) 1221 print(error_save_FLIR_img) 1222 img[0].Release() 1223 # remove entries from queue once done 1224 self.FLIR_image_queue.remove(img) img = [<PySpin.PySpin.ImagePtr; proxy of <Swig Object o... 'Spinnaker::ImagePtr *' at 0x00000258C556FD20> >, r'C:\Users\basnagala.1\Documents\3D PRINTER\scANT...kBug\SB1\SB1\RAW_x_00190_y_00000_step13500.tif'] ].Release undefined
C:\Users\basnagala.1\Anaconda3\envs\scAnt\lib\site-packages\PySpin\PySpin.py in Release(self=<PySpin.PySpin.ImagePtr; proxy of <Swig Object o... 'Spinnaker::ImagePtr ' at 0x00000258C556FD20> >)
36145 def Release(self):
36146 r"""Release(self)"""
36147 return _PySpin._SWIG_ImgPtr_Release(self)
36148
36149 def GetID(self):
global _PySpin = <module 'PySpin._PySpin' from 'C:\Users\basnag...te-packages\PySpin\_PySpin.cp37-win_amd64.pyd'>
_PySpin._SWIG_ImgPtr_Release =
The above is a description of an error in a Python program. Here is the original traceback:
Traceback (most recent call last): File "scAnt.py", line 1222, in checkActiveStackThreads img[0].Release() File "C:\Users\basnagala.1\Anaconda3\envs\scAnt\lib\site-packages\PySpin\PySpin.py", line 36147, in Release return _PySpin._SWIG_ImgPtr_Release(self) _PySpin.SpinnakerException: Spinnaker: Could not find image to release [-1013]
Displaying progress! Displaying progress! Displaying progress! Captured Image with width = 5472, height = 3648 Time to write image to device: 1.5997185707092285 seconds Displaying progress! Moving stepper Z to position -10500 Captured Image with width = 5472, height = 3648 Time to write image to device: 1.5438306331634521 seconds Displaying progress! Moving stepper Z to position -10000 Captured Image with width = 5472, height = 3648 Time to write image to device: 1.754715919494629 seconds Displaying progress! Moving stepper Z to position -9500 - Motor Did not move to -9500
The capture time seems correct. A complete scan of about 4000 images takes on average about 2 hours and with a capture time of roughly 1.6 seconds per image that appears fine.
Did you take out one of the rings now? The scanner cannot autofocus the images, you need to set the focus and range to the closest and furthest focal plane the specimen appears sharp in. Vary the step-size based on the focal overlap between images for a smoothly stacked final shot. Keep in mind, the smaller the step-size (in the Z axis in this case) the more images you will take.
For a specimen of the size you have in the scanner above, you should capture roughly 20 images per orientation at a F5.6 - F8 aperture.
Scanning is "slow" that is "true", but that is still best what we have and this is really big thing!!! Big, Big thanks for Fabian and other group!! They started build this wonderful machine!!
[sbasnagala] you have many things wrong, please read https://peerj.com/articles/11155/ at least several times.
I attached link to my machine settings (easyupload link under). White balance is not perfect, but this is the "rame" which i like to use. Maybe this will help you?
I am running the scanner with 2 rings now. The image is focused now, the scanner took 22 images as it moves backward and all the images are blurry. Gimble arc moved to the position perpendicular to the ground and the camera moved forward and stopped at -19000. The image is not focused on his point. Are you saying to re-scan the specimen with different focal points by manually stopping the scanning process?
[henrikmyl] - Thanks for the comment, I must read the paper again at some point I guess. I clicked the link but could not find the machine settings.
Hi Suranga,
At the distances, you have set in the software and the size of your specimen, you should only use one extension ring. Again, the scanner does not automatically focus the image for you. You need to drive the Z-axis (the camera) back to the furthest focal distance you need, for example, -20000 (this is just an example and may not be the value for your specific use-case). Then, you need to adjust the focus on the lens. The scanner software cannot physically change the focus on your camera; you need to adjust this for the first position yourself. This closest focal point is your Min [Z Axis] value.
After you have done that, with the closest point of the specimen in focus, slowly drive the Z-axis forward until the point furthest away on the specimen is in focus. Note down the value of the Z-axis - this is now your Max [Z Axis] point.
Depending on the geometry of your specimen, you may want to repeat the process for different X and Y orientations.
When you have set up the scan correctly, you should not have to interfere with the scanning process manually.
All the best Fabi
I will close this thread for now, as the discussion no longer relates to the original topic [Slow scanning progress]
If you continue to have issues getting images in focus, please open a new issue thread!
Following up on a comment posted by @sbasnagala in https://github.com/evo-biomech/scAnt/issues/2#issuecomment-1079000749
Hi Fabian, Thanks!! All the stepper motors working right now!! I started scanning and it seems like it is very slow. It's been 12 min into the scan so far and when I check the output folder, there are only 7 images taken every 2 seconds. The progress bar is still 0%, and says "running Scan". I can see the image is not focused in the live view and z-axis is not moving and the gimble arc stopped halfway between 0 and ends top. Any clue what is going on?
Originally posted by @sbasnagala in https://github.com/evo-biomech/scAnt/issues/2#issuecomment-1079000749