Software Beta release

The Spiral scan is not finishing even after the task indicator completely fills the bar.New images are being captured continously.I had to manually cancel the task.

The number of steps as can be noted was 10 10 1…but the number of captures has gone beyond 200 …

thanks - that’s one I should look into! Did the abort button work? If so, that’s progress at least…

If you’re able to raise an issue I’ll do my best to fix that one.

Yes I could cancel the task…I ll try to raise the issue

One more thing I would like to ask w.r.t scan…should the z step size be increased proportional(some sort of) to the x and y step size …to accommodate the deviations/errors?..so that autofocus doesn’t stray beyond certain steps?

The Z step size in the scan refers to the spacing between images in a Z stack at each XY location; it’s separate from the range of the autofocus. In general, you’re right - the potential for focus drift between images increases as the step size gets bigger. However, if you are using the “fast” autofocus method, its default range is quite large anyway so I would be surprised if this was a problem.


Another stack n scan issue
Capture button becomes non responsive if resolution of image is not selected either as full or resize… cannot terminate the event too.

hmm, that definitely looks like a bug! Do you see anything in the “logging” tab, or if you SSH in to your microscope and run ofm log?

ERROR: Incomplete frame data received. Camera bandwidth may have been exceeded. Consider lowing resolution, framerate, or target bitrate.

whiteout screen…if I reduce the framerate/bitrate I receive the stream again

That is correct. There are situations where as I understand it there is too much information in a frame to be transferred before the next frame is due. This leads to the whiteout image. This is now picked up by the software, giving you the warning to reduce the bit rate. That has to be done manually because an automatic change on the fly would break things like the fast autofocus algorithm.

1 Like

Long thread on it here: Camera feed going white - Request Help - OpenFlexure Forum

I’ve just tried this on my microscope, and I don’t see the issue; neither of those buttons is selected by default.


Was it the whiteout issue that was causing it to fail (in which case the problem is simply that it doesn’t correctly terminate the task) or was the whiteout a different issue?

Hi Openflexure,

You mention the ‘store raw data’ embeds the raw data within the JPEG image. How do you extract the raw data? say for image processing?

We want to save the raw data from an epi-fluorescence microscope set-up where images won’t confuse the raspberry pi camera with values of zero for red, green or blue.

Hi Rob,
The slightly esoteric JPEGs are the same as the ones produced by raspistill or the picamera Python library, and I believe there are a variety of tools to extract them. I actually don’t do it all that often myself, but I’m fairly sure the tools accompanying my CRA compensation paper (on gitlab) will extract the raw data from a JPEG (assuming camera version 2). I think there’s also a Python library called something like raspiraw that does a similar thing.

Hi Richard/OpenFlexure,

So I’ve been trying to access your raw data file from the gitlab repository. Is there a way around
“from . import picamera_array” and “from .dump_exif import exif_data_as_string”
as the full stop, which I assume links to the file in the folder, doesn’t work.
The problem is, without the aforementioned import, the file won’t run. Do you recommend a command to locate/import this file?

The specific file i’m trying to use is named “extract_raw_image.py”

Hi @robarch have you installed the module, or are you trying to run the file directly? There are (admittedly not super prominent) install instructions in the relevant folder:

I think there is a difference between what happens when you try to run it with python extract_raw_image.py and python -m picam_raw_analysis.extract_raw_image. I believe it might even be possible that there is useful documentation if you try python -m picam_raw_analysis.extract_raw_image --help.

I am hoping there is a little bit of helpful documentation at:
https://picamera-raw-analysis.readthedocs.io/en/latest/

This was also linked from the readme, but again not that prominently…

Hi Richard,

I have now installed the module and everything seems to be working. However, I am unable to obtain the raw data when using “python -m picam_raw_analysis.extract_raw_image image.jpg”
changing image.jpg to the file name of my images doesn’t work and I have tried adding the file path as well. The error I get is “FileNotFoundError: [Errno 2] No such file or directory: ‘PineStem1.jpg’”

Hi @robarch did you get this working in the end? I know I fixed the EXIF bug, but I suspect there were other things you figured out yourself. It would be helpful if you could mention them here, because I’m sure you won’t be the only one!