|
Detect whether camera is present? Thomas Wagner from Germany [51 posts] |
10 year
|
STeven,
is there a way to automatically detect whether any camera is present or not?
Depending on the outcome, I'd like to either use live stream or turn to images from files.
Should work without knowing which type of camera is used, if I know one special type is used, I could probably use the module of that type.
BR T.
|
|
|
Steven Gentner from United States [1446 posts] |
10 year
|
Thomas,
There is a CAMERA_NAME and CAMERA_PATH variable that gets set when a camera is active. You might be able to use that for detection of a camera. Otherwise, you may want to constrain the problem a little more since checking for IP based cameras would take forever.
Is there a specific use case that you are thinking about using this camera discovery for?
STeven.
|
|
|
Thomas Wagner from Germany [51 posts] |
10 year
|
http://wiki.intego-junior.de/index.php?title=Solve_a_Sudoku#Improved_version.2C_including_OCR_detection
STeven,
I have added an improved version of the sudoku solver here. When detecting a live camera, I want to switch away from loading from file.
I will probably not put tooo much furthewr work into this program, but there are some things which may be interesting for you:
* when adding or removing images files to the image directory during the run of the program, strange things happen to the results of the sudoku. I'd expet RR to either include or ignore changes of the directory during execution, but it seems do do neither nor.
* Adding or removing a camera during the run does not yield stable results at all.
* Even if the camera is present at the beginning of execution, changing from one sudoku to the next with the camera does also not seem to update in a correct way.
Maybe you can learn a little more from playing with this.
Thanks again,
Thomas
|
|