Image History: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(Created page with "{{Pagelinks}} == Links == <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * /History ODB tree * History System </div> It is possible to use t...")
 
No edit summary
Line 2: Line 2:


== Links ==
== Links ==
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[/History ODB tree]]
* [[/History ODB tree]]
Line 7: Line 8:
</div>
</div>


It is possible to use the midas history system to periodically record images from a network-connected webcam, for later playback through the midas history webpage. The [[midas data logger|mlogger]] will automatically grab the current image from the webcam, and store it on disk.
== Overview ==
 
It is possible to use the midas history system to periodically record images from a network-connected webcam, for later playback through the midas history webpage. The [[Mlogger|midas data logger]] will automatically grab the current image from the webcam, and store it on disk.


Requirements for this system to work:
Requirements for this system to work:
* libcurl must be available when compiling midas
* libcurl must be available when compiling midas
* The current webcam image must be accessible via a URL (http or https)
* The current webcam image must be accessible via a URL (http or https)
* The webcam features are configured in the [[/History/Images|/History ODB tree#images]] section of the ODB
* The webcam features are configured in the [[/History ODB tree#images|/History/Images]] section of the ODB
* [[mlogger]] is running.
* [[Mlogger|mlogger]] is running.


You can log multiple webcams, and specify the recording period and storage duration independently for each.
You can log multiple webcams, and specify the recording period and storage duration independently for each.
Line 33: Line 36:
== Configuring the ODB ==
== Configuring the ODB ==


See the [[/History/Images|/History ODB tree#images]] documentation.
See the [[/History ODB tree#images|/History/Images]] documentation.


== Using the web interface for viewing images ==
== Using the web interface for viewing images ==
Line 39: Line 42:
An example from the MEG experiment is shown below.  
An example from the MEG experiment is shown below.  


[[File:MEG_image_history.png|500px]]





Revision as of 10:11, 24 June 2020


Links

Overview

It is possible to use the midas history system to periodically record images from a network-connected webcam, for later playback through the midas history webpage. The midas data logger will automatically grab the current image from the webcam, and store it on disk.

Requirements for this system to work:

  • libcurl must be available when compiling midas
  • The current webcam image must be accessible via a URL (http or https)
  • The webcam features are configured in the /History/Images section of the ODB
  • mlogger is running.

You can log multiple webcams, and specify the recording period and storage duration independently for each.

Note that although normal midas history variables can be logged to a database, the images from webcams are always only stored as files on disk (in the directory specified in `/Logger/Data dir` in the ODB).

Tips for finding your webcam's image URL

Depending on the brand of your webcam, it may trivial or tedious to find the correct URL for getting the current image. In the best case, the URL is specified in the user manual. More often, you need to do a bit of digging.

The best place to start is by loading your camera's normal web interface. Depending on how the page is coded, you should be able to find the correct URL by either:

  • Right-clicking the image and choosing "Copy Image Location" or similar (only works if the web interface is using a raw "img" tag to display the image)
  • Looking at the source code of the webpage (for example if the web interface specifying the URL as a CSS property)
  • Opening the Network tab of your browser's Developer Tools, reloading the page, and finding the request that loaded an image (should work in almost all cases)
  • Googling for help on your specific webcam brand/model

For AXIS cameras, the URL is typically http://<name>/axis-cgi/jpg/image.cgi

Configuring the ODB

See the /History/Images documentation.

Using the web interface for viewing images

An example from the MEG experiment is shown below.

MEG image history.png


You can go "backwards" in time and browse all stored images. The buttons at each image allow you to step backward, forward, and play a movie of images, forward or backward. You can query for a certain date/time and download a specific image to your local disk. You can even synchronize all time axes, drag left and right on each image to see your experiment from different cameras at the same time stamps. You see a blue ribbon below each image which shows time stamps for which an image is available.

Initially, only the most recent image is loaded to speed up loading time. As soon as you click on the image or one of the arrow buttons, previous images are loaded progressively, which you can see in the ribbon bar becoming blue. For slow internet connections this can take some time. For typical webcams and one minute update period you get typically a few GB per week.