Jump to content
OMRON Forums

Editing CamDef file for Cropping Image


Recommended Posts

The same procedure is valid for AutoVISION and Visionscape.
 

Introduction

Camera Definition files (CamDef) can be edited to define, among other features, the image size acquired by the camera.
By editing the CamDef file, the image acquired by the camera is “cropped” – it is not “zoomed”.

 

Simple Example

Below you can see an image acquired by a Vision HAWK Smart Camera (1.2 MP, SXGA, 1280 x 960 default definitions), using the AutoVISION Software.

User-added image
If, for any reason, we don’t need to acquire the full image, we can edit the CamDef file and crop it.
Usually, this affects the cycle time, by reducing it.

 
  1. The first step is to defining the desired size of the image acquired by the camera.The image size defined must be equal or smaller than the camera sensor resolution (in this case, 1280 x 960). For example, we can crop the image by 208 (26*8) pixels on all sides. In other words, we would have the image size by 864 (1280 – 208*2) x 544 (960 – 208*2).
  2. The second step is editing the CamDef file, using any text editor for this purpose.CamDef files are located in the C:\Microscan\Vscape\Drivers\CamDefs directory (default path). There is a specific CamDef file for each camera (Smart Camera or GigE Camera, Mono or Color). The _visionhawk_4001_1280x960_CCD.cam is the Vision HAWK (1.2 MP, SXGA, 1280 x 960) CamDef file.
User-added image 
Note* Before editing the file, it is recommended to making a copy of the original CamDef file (for later recovering).

For this purpose, we can edit the Camera Name (?), the Stride (‚), Rows (ƒ), X Offset („), and Y Offset (…) fields.

User-added image

After the edition, save the file keeping its original filename.
Before you restart the AutoVISION Software, Close And Exit AvpBackplane (in the Windows Taskbar):

User-added image
After restarting the AutoVISION Software,  get the cropped image:

User-added image


 

Software Version

Any

Firmware Version

Any

Operating System

Any

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...