Fig.1 MicroScope_Cam_class101.py
The microscope cam software is created in Python to show scale in the image viewer. This document is its usage notes.
- Image View: Still or Live image is displayed at 1/2 scaled image viewer.
- Camera Selector: Select Webcam or Microscope cam.
- Camera setting: Change the exposure etc. using the driver provided by the camera manufacture.
- Scale-Bar: Show and hide the Scale-Bar.
- Scale-Bar length: Change between 1um and 1000um to fit the objective lens magnification.
- Scale-Bar color: white, black, green, light blue, red
- Scale-Bar location: Move Scale-Bar where to mouse click.
- Save file: Save as jpg file.
- Start PC: Start your PC.
- Start program: Click MicroScope_Cam.py to start program. A Pop-Up Window for camera connection appears, so press the OK button. Start live camera view.
- Image View: Pressing the “Play//Pause” button, change into Still or Live image.
- Focus: Adjust the focus of your microscope while looking at the Live image view.
- Exposure adjustment: Press the “Set Configuration” button. A function setting Pop Up Window appears. (Fig. 2 is our lab’s camera driver’s sample. Function is depend on your camera driver.) The exposure is set to Auto in the default. Auto-exposure images are not always good, and if they look slightly overexposed or underexposed, it's good to change the exposure manually to get a properly exposed image.
- Scale-Bar and Objective Lens: When changed Objective Lens, select lens from “Objective Lens tab” to fit, and press “Objective Lens” button.
- Scale-Bar location: Move Scale-Bar where to mouse click.
- Scale-Bar: Scale-Bar shows on/off, Scale-Bar length, Scale-Bar color, as you like.
- Save still image: Push the button “Save Image File” to save in jpg file.
Fig. 2 Camera profile setting window
You shall change these values to fit your camera.
- Camera spec. length(um)/pixel (4.2um/pixel written in program now.)
- Relay Lens magnification (x0.7 written in program now.) It is good to change these values to fit your monitor or lens.
- Program window size: 1350x690 (For FWXGA 1366×768 )
- Image View window size: 800x600
- Image View window scale: 1/2 (Camera is 1600x1200 Pixels)
- Objective Lens magnification: (selectable)
- Camera: 1/2inch color CMOS, 1600x1200pixels, 4.2um/pixel, 10fps(max) (material(4))
- Relay Lens (Eyepiece): 0.7x (material(3))
- Objective Lens: 5x, 10x, 20x, 50x, 100x (material(1))
- OS: Windows10
- Python: Version 3.8.10
- Libraries: OpenCV, Pillow
- Regarding the display of video, referred to material(5)
- None