Whole tissue scan help

Hi Daniel, a few updates for you. My code to automatically detect background vs sample is now available at Joe Knapper / Background detect · GitLab. I’ll need to write some clear instructions and probably a log so I can check it’s working as expected, but should be ready for you to test next week

Included are a few images I’ve built using the new approach, thanks for suggesting we add this feature, it makes unusual shaped scans a lot more reliable. You can see ImageJ can’t arrange the background properly, but I don’t think there’s a way around that



2 Likes

@dgrosen code and instructions are now up at Joe Knapper / Background detect · GitLab. Hopefully everything is clear, but if not feel free to ask here or drop me an email

2 Likes

Thanks Joe. I will start working on this tomorrow and update you on the progress.

1 Like

I installed raspbian desktop in oracle virtual desktop. I get an error message:
pi@raspberry:~/background-detect $ phyton -m venv .venv
/usr/bin/phyton: No module named venv

Hi Daniel, the code is designed to run on your computer, so there’s no need to SSH into the microscope through raspbian. If you have python installed on your computer, that should be all you need to run the code, using virtualbox and raspbian isn’t required

Once again forgive my ignorance. To give you some context…Imagine a physics nobel prize (you) teaching algebra to a kindergarten student (me). :grinning: So I installed VSC in my windows PC. I was able to get this far.
I downloaded the repo on
C:\Users\dgrosen\Downloads\background-detect and then I run the code on VSC. But I get an error No module named ipykernel

huh…note to myself: run pip install ipykernel and fixed the issue! :crazy_face:

2 Likes

and here I go again…I dont know how to run the jupyter notebook :sob: :sob: :sob:

No problem, if you’re in vscode then you can run each cell (block of code) individually by clicking on it and pressing either the run button that appears (looks like a play symbol :arrow_forward:) or CTRL+Enter. This is better than setting it running through all cells automatically, because there’s cells that might need your input

Intuitively that is what I am doing. I need to play with this a little bit more.

test
Minor update on this, my tiling code failing as it leaves the sample shows exactly why this project is useful!

2 Likes

I cannot make it work. I am running into multiple errors when running the code on VSC. I know this is much to ask but…will it be possible to see a video on how you do it?

No problem, what kind of errors? And are they after running the first cell? If they’re from the first cell, I’d guess the virtual environment isn’t being used properly, which is an easy fix :+1: I’ve linked the video below

Worth checking what I click at the end, which shows which version of Python is being used (whether or not the venv is working). YouTube seems to be ruining the quality of this video, if it doesn’t get better overnight I’ll find another way to get the footage to you

1 Like

Hi all, thanks to @r.w.bowman’s work integrating the code, this is how the background detect scans will look when released in the software

For various boring autofocus reasons, this is slower than it’ll work on your samples

2 Likes