Add Images from Camera

By Sandra Schloen, March 2020; Updated March 2021

If your computer (e.g. laptop, or tablet computer) has a camera installed, OCHRE may be able to access this device to let you take a picture using the camera and insert it directly as a resource link.

If OCHRE detects that such a device is available, the Other links pane of the Links panel will include a camera icon. (If no camera icon appears, OCHRE did not detect a compatible device and this feature will not be available on the computer.)

If multiple cameras are available, OCHRE will choose the "rear"- or "world"-facing camera as its preference.

Use the Click button to take a snapshot. The camera will be turned on, the image will be generated from the camera input, and the camera will then be turned off.

Note: Image capture does not currently work on MacOS computers due to security issues. Please contact us if you need this feature.
Webcam test while working from home on a cloudy day in Chicago during the pandemic.

OCHRE will create an image using the JPG format. OCHRE will also create an image Resource to manage the snapshot. The image file will be named using the UUID assigned to the corresponding OCHRE Resource item to ensure uniqueness; e.g.

4ff3869b-7102-4491-a545-59f61c7d4134.jpg

After you Click to take the snapshot, a pop-up window asks you to choose a Resource hierarchy as the destination of the newly added resource. Select a hierarchy and click OK.

You will also be asked if you wish to use the chosen hierarchy as the destination of all subsequent snapshots taken during the current session. If you answer Yes, you will not be prompted again. If you answer No, you will be asked each time you take a snapshot.

Name of Image Resource

When OCHRE takes the snapshot and creates a corresponding Resource to manage it, OCHRE will, by default, name the Resource simply "Image." You can control this by setting the Label for Camera images and the Sequence # on the Preferences tab of the destination hierarchy to which you assign the snapshots. In this example, OCHRE will call the first snapshot "Onsite image 100.jpg" (and its thumbnail "Onsite image 100_thumbnail.jpg"). OCHRE will then increment the sequence number so that the Resource Name of the next image taken will be called "Onsite image 101.jpg" and so on. (Maximum Sequence # is 99999.) Leave the Sequence # set to zero to suppress auto-numbering altogether.


The Refresh button to the left of the Label field will "forget" any default actions taken during the current session, and prompt anew.

Resolution of Image File

By default, OCHRE will generate an image whose resolution is 1280 x 720; this is a standard high definition (HD) option on most laptops. If your camera supports other resolutions (check the camera settings on your computer) you can request a specific resolution by choosing from the list provided by the Camera options of the Resource Inbox. This setting is not available on other Resource hierarchies -- it is only available on the Resource Inbox because it is specific to the computer's camera more generally, not to any particular hierarchy.

If your computer does not support the selected Image resolution, OCHRE will try to find and use the nearest supported resolution instead.

Note that the naming options are NOT available on the Resource Inbox since this controlling hierarchy is shared by multiple users in offline sessions. This would cause sequence numbers to get out of sync, for example, if images were being labelled in multiple offline sessions. See more below on managing this image capture feature when using OCHRE offline.

Location of Image Files — when working with OCHRE ONLINE (in the usual way)

The ultimate destination of the image will depend on the Access/Paths of the hierarchy you choose; there are several possible scenarios.

  • Scenario 1: The Access/Paths have no details specified.

      • If no paths are specified on the Resource hierarchy selected as the destination of the images, OCHRE will create a local cache called "OCHRE_images" in your User "home" directory. All snapshots from the built-in camera will be stored here, along with a corresponding thumbnail image for each (labelled with the suffix "_thumbnail"). This home directory cache might be, for example, "C:\Users\Sandy\OCHRE_Images." OCHRE will pop-up a message telling you where the images are being placed. It is up to you, the User, to find the snapshots in the local cache and copy them to a safe destination.

  • Scenario 2: The Access/Paths specify a local directory on the local computer.

      • In this case, OCHRE will store all snapshots in the specified folder, creating a corresponding thumbnail image for each snapshot. If the Alternate root folder is the same as the Resource root folder, and if no Alternate suffix is provided for the thumbnail image, OCHRE will use the suffix "_thumbnail" to distinguish the thumbnail from the original image in the same folder.

  • Scenario 3: The Access/Paths specify a remote server directory, in which case FTP access needs to be enabled (either on the hierarchy onto which the images are dropped, or on the project's Resource Inbox).

      • OCHRE will create a thumbnail image for the snapshot and upload both the snapshot and its thumbnail to the specified server location. If FTP access is not enabled or is not successful, an error condition will be triggered.

The Access/Paths specification determines the final location of the snapshots taken by the camera. Here the paths are set to a local folder under Windows 10.

Contact OCHRE Data Service staff for assistance configuring access, paths, FTP credentials, and other details.

Managing Image Capture Offline

The image capture feature is designed to be integrated into the workflow when using OCHRE offline. Excavators onsite can take snapshots directly from the Links pane of items they have just entered, as described above. These images will be immediately available on the item's thumbnail panel of its View, in the usual way. Images can be uploaded directly to the server upon restoring the offline session. There are, however, a variety of implications of using this feature of which the Project Administrator or Data Manager should be aware.

Prepping Offline Sessions

  • Choose an appropriate Resolution for the project images from the picklist on the Resource Inbox (defaults to 1280 x 720).

    • If different computers with different capabilities are being used offline, you can adjust the Resolution option on the Inbox between creating one offline session and the next, if needed (a project might want to use a standard size in any case).

    • Alternatively, a User can adjust the Resolution option in their offline session, if needed. This will be a temporary, in-memory update solely for the purpose of the offline session; the change will not be posted back to the database when the offline session is restored.

  • Every User's offline session should include a Resource hierarchy to serve as the destination hierarchy for images captured offline. This hierarchy can have naming specifications specific to that User. For example, for the supervisor of Field A, you might use a name specification on the hierarchy's Preferences pane to label the Resource items "Field A 101", "Field A 102."

    • In a pinch, the Resource Inbox can be used as the destination hierarchy if there is no other option available to the offline session, but we do not recommend this as standard practice (e.g. the Inbox does not support custom-labeling options).

Location of Image Files — when working with OCHRE OFFLINE

The ultimate destination of the image will depend on the Access/Paths of the hierarchy you choose; again, there are several possible scenarios.

The Independent Approach

The Project Administrator or Data Manager might choose to manage the offline images independent of the offline procedures. In this case, Scenarios 1 and 2 described above could apply in the usual way. That is, you might specify no Access/Paths, or a local Access/Paths option and let OCHRE use the local folders for the captured images. In this case, you are completely responsible for managing the images, backing them up, and making sure they ultimately find their way to a secure server location. You might consider this option if there is little Internet connectivity available to your project (although, even if this is the case you can still use the integrated approach described next ...).

The Integrated Approach

In this scenario, images captured offline are managed by OCHRE in a manner that is tightly integrated with OCHRE's Offline procedures. (See the next section on restoring offline sessions that include images.)

OCHRE manages a resource cache on the offline computer for all images required offline (this cache includes GEO images like the basemap and any raster images required for a User's offline session). Typically the User does not need to manage, or even to be aware of, this resource cache; it is created in the Application Data section of the offline computer. Under the integrated approach, OCHRE uses this resource cache as the location in which to collect images captured offline. [For the curious minded, my resource cache is located at: C:\Users\Sandy\AppData\Roaming\OCHRE\resource\0cf123ef-9d67-841e-9b0d-86e6fe78726b; meddle with this folder at your peril!]

In this scenario the Access/Paths of the destination hierarchy available to the offline session must specify a remote server directory. This also requires that FTPS/SFTP access needs to be enabled (either on that same destination hierarchy or on the project's Resource Inbox).

Restoring the offline session

When restoring the offline session, you can choose to upload images immediately as part of that process. If, however, the Internet connectivity does not make that a practical option, or if there is a high volume of images to upload, you can choose to defer the upload. OCHRE will report how many images it found in the offline session to inform your decision.

When you choose to upload the offline images, OCHRE will create a thumbnail image for the snapshot and will post both the snapshot and its thumbnail to the server, based on the Access/Paths specified on the destination hierarchy. If the file transfer is not successful for some reason, you can always try again, having resolved the FTP issues. OCHRE will retain the original image in the resource cache, so you do not need to be concerned about "losing" the image if the file transfer is not successful on the first try.

Managing the Resource Cache

The Offline tab of a User's account provides the opportunity to manage the content of the resource cache and other offline data.

Uploading images

If you deferred posting the images during the restoration of the offline session, or if there were file transfer errors during an attempted upload, the Offline utilities will have an active "Upload images" button that indicates how many pending images are still offline. Go ahead and perform the upload using this button. If the Upload button is disabled, that indicates that there are no images pending offline needing to be uploaded.

Purging images

Once OCHRE has successfully uploaded images to a secure server destination, they are marked as posted. But they are not automatically deleted from the resource cache. (Since file transfer issues and Internet connectivity can be so problematic in field situations, we do not want to take any chances that images did not make it successfully to a secure server.) The Project Administrator or Data Manager can manage this process at their discretion. Buttons are available to purge images in the resource cache, removing the images captured offline and freeing up disk storage. If there are images that have not been posted by OCHRE, a strong warning will be given before they are allowed to be cleared. (This is permitted in the event that the images were managed independently by the Data Manager; e.g. in the case where Internet connectivity does not support mass uploading of high-resolution images.)

Backing up Offline Images

Since images are such valuable data, if there will be a significant delay in posting images to a secure server, or if there is a perilous ride for the laptop back to base camp on the back of a donkey, you should consider backing up your offline session to an external drive.

Before closing your offline session, use one of the Backup options on the Project menu. This creates a copy of all the files needed to Restore your offline session on another computer, if necessary.

See also Running OCHRE Offline for other instructions related to Offline usage.