DCM900 Digital Camera for Microscope

OpenCV Enumerate Cameras

C++ OpenCV 2.4.11: List all cameras
Add API to enumerate cameras #4269

VLC DirectShow

Python DirectShow

github.com/andreaschiavinato/python_grabber
Capturing Images from Camera using Python and DirectShow

List Capture Devices for Python OpenCV on Windows

ULARGE_INTEGER

What ctypes types to use with WORD and DWORD definitions

Python OpenCV

import numpy as np
import cv2

def show_pic():

    i: int = 0

    while True:
        cap = cv2.VideoCapture(i)

        if not cap.isOpened():
            print(f"Cannot open camera {i}")

        else:
            while True:
                ret, frame = cap.read()

                if not ret:
                    print(f"Can't receive frame (stream end?) from camera {i}. Exiting ...")
                    break
                else:
                    print(f"Frame receive from camera {i}")
                    break

        cap.release()
        i += 1

        if i > 20:
            break

if __name__ == '__main__':
    show_pic()

Cannot open camera 0
Cannot open camera 1
Cannot open camera 2
Cannot open camera 3
Cannot open camera 4
Cannot open camera 5
Cannot open camera 6
Cannot open camera 7
Cannot open camera 8
Frame receive from camera 9
Cannot open camera 10
Cannot open camera 11
Cannot open camera 12
Cannot open camera 13
Frame receive from camera 14
Cannot open camera 15
Cannot open camera 16
Cannot open camera 17
Cannot open camera 18
Cannot open camera 19
Cannot open camera 20
[
  0: 'ScopeTek DCM130BW',
  1: 'ScopeTek DCM130E',
  2: 'ScopeTek DCM200',
  3: 'ScopeTek DCM310', 
  4: 'ScopeTek DCM35E',
  5: 'ScopeTek DCM500',
  6: 'ScopeTek DCM500BW',
  7: 'ScopeTek DCM510',
  8: 'ScopeTek DCM800',
  9: 'ScopeTek DCM900',
 10: 'ScopeTek MDC140BW',
 11: 'ScopeTek MDC200',
 12: 'ScopeTek MDC320',
 13: 'ScopeTek MDC560',
 14: 'OBS Virtual Camera'
]

Linux

idVendor=0547 idProduct=4d90

0547  Anchor Chips, Inc.
	4d90  AmScope MD1900 camera

usb.ids
microscope:start
AmScope/TopuTek/ScopeTek does provide libusb drivers though, so you could make a custom application.

github.com/JohnDMcMaster/uvscada/

v4l2

python v4l2 webcam capture test
Linux Video4Linux2 API (v4l2)
How to get a list of video capture devices (web cameras) on linux ( ubuntu )? (C/C++)
How to Capture Frames from Camera with OpenCV in Python

keyboard

conda install -c conda-forge keyboard

pygame

Camera Module Introduction

anaconda.org/cogsci/pygame
anaconda.org/jiayi_anaconda/pygame

Installation of pygame with Anaconda

Conda Support for 1.9.6 and 2.0.0.dev10 #1953

python -m pip install -U pygame --user
python -m pip uninstall pygame

Leave a Reply

Your email address will not be published. Required fields are marked *