You are on page 1of 10

一、视觉软件基本操作

在桌面双击图标(如图 1 所示),打开视觉软件(如图 2 所示)。不同版本程序有所不同,


此 SOP 仅以 0320 版为例。
Basic operation of vision software
Double-click the icon on the desktop (as shown in Figure 1) to open the vision
software (as shown in Figure 2). Different versions of the program are
different, this SOP only uses the 0320 version as an example

图 1 视觉软件图标 - Vision Software Icon

图 2 视觉软件界面 - Visual software interface


软件界面从上到下、从左到右依次是标题栏、菜单栏、功能界面、按钮和状态栏。
点击菜单栏中不同菜单,就可以进入不同的界面:登录界面、调试界面、数据界面和图像
界面。
在菜单栏中的登录菜单中,可以修改用户权限,切换运行模式,修改密码。在登录时,如
果密码输入错误,则会降为管理员权限。
The software interface is the title bar, menu bar, function interface, buttons
and status bar from top to bottom and left to right.
Click different menus in the menu bar to enter different interfaces: login
interface, debugging interface, data interface and image interface.
In the login menu in the menu bar, you can modify user permissions, switch
operating modes, and modify passwords. When logging in, if the password is
entered incorrectly, it will be downgraded to administrator privileges.
图 3 登录界面 - login interface
在状态栏中,可以查看当前用户权限、运行模式、产品型号、设备状态,切换产品。
软件默认为管理员权限,可以启动程序、切换型号、查看数据和图像,如果需要在软件启
动后停止或切换型号,则需要工程师权限。除此以外,工程师权限还可以进行图像调试。
视觉界面有 3 行窗口,分别为上相机视觉、左下相机视觉和右下相机视觉。
在正常生产情况下,打开视觉软件,选择好产品型号后,点击启动按钮就可以和 labview
程序通讯进行生产。
In the status bar, you can view the current user permissions, operating mode,
product model, device status, and switch products.
The software defaults to administrator authority, which can start programs,
switch models, view data and images. If you need to stop or switch models after
the software is started, you need engineer authority. In addition, the engineer
authority can also perform image debugging.
The visual interface has 3 rows of windows, which are top camera vision, bottom
left camera vision, and bottom right camera vision.
Under normal production conditions, open the vision software, select the
product model, and click the start button to communicate with the labview
program for production.
二、菜单说明
点击通讯菜单,打开通讯测试界面(如图 4 所示)。我们可以输入参数,点击“序列号”
按钮,就会在按钮下方的文本框中显示通讯内容,点击发送按钮与 labview 软件进行通讯
测试。
Menu description
Click the communication menu to open the communication test interface (as shown
in Figure 4). We can enter the parameters, click the "Serial Number" button,
the communication content will be displayed in the text box below the button,
and click the send button to conduct a communication test with the labview
software.
图 4 通讯界面 ommunication interface
点击数据菜单,打开数据界面(如图 5 所示)。我们可以在 log 列表框中查看站位状态。
在 cam 和 data 列表框中可以查看与 labview 通讯日志。格式如下:
{"trig":{"Name":" 拍 照 名 称 ","Param":" 功 能 ","StartOrStop":" 拍 照 启 动 还 是 停
止"},"PointName":"点位名称","X":点位 X 值,"Y":点位 Y 值,"Z":点位 Z 值,"U":点位 U
值,"O":点位 O 值,other 其他}
Click the data menu to open the data interface (as shown in Figure 5). We can
check the station status in the log list box. You can view the communication
log with labview in the cam and data list boxes. The format is as follows:
{"trig":{"Name":"Picture name","Param":"Function","StartOrStop":"Start or stop
taking a picture"},"PointName":"Point name","X":Point Position X value, "Y":
Point Y value, "Z": Point Z value, "U": Point U value, "O": Point O value,
other}
Leftccd:像素值 X,像素值 Y,脉冲值 X,脉冲值 Y
Leftccd:角度
Left ccd: pixel value X, pixel value Y, pulse value X, pulse value Y
Left ccd: angle

图 5 通讯界面 Communication interface


鼠标右击“clear”,可以清除列表框中的所有内容。
视觉界面(如图 6 所示)有 3 行窗口,分别显示上相机视觉、左下相机视觉和右下相机视
觉。在列表框中显示视觉处理的一些基本信息,如图像采集是否成功、图像处理是否成功
图像采集时间和图像处理时间。在下拉列表中选择处理算法,点击“测试”按钮即可对图
像进行测试。点击“config”按钮,弹出视觉参数配置,可以修改曝光和 mark 点偏移参数,
修改完成后点击“确定”按钮退出。
Right-click "clear" to clear all the contents in the list box.
The visual interface (as shown in Figure 6) has 3 rows of windows, which
respectively display the upper camera vision, the lower left camera vision, and
the lower right camera vision. Some basic information of visual processing is
displayed in the list box, such as whether image acquisition is successful,
whether image processing is successful, image acquisition time, and image
processing time. Select the processing algorithm in the drop-down list and
click the "Test" button to test the image. Click the "config" button to pop up
the visual parameter configuration, you can modify the exposure and mark point
offset parameters, after the modification is complete, click the "OK" button to
exit

图 6 视觉界面 Visual interface


“调试”菜单由“相机调试”、“站位调试”和“参数配置”三部分组成。
我们可以在“参数配置窗口”(如图 7 所示)中修改程序中开放的参数。修改完成后,首
先要“保存文件”,然后“试用参数”。
The "Debug" menu consists of three parts: "Camera debugging", "Station
debugging" and "Parameter configuration".
We can modify the parameters opened in the program in the "parameter
configuration window" (as shown in Figure 7). After the modification is
completed, first "save the file" and then "try the parameters".
图 7 参数配置窗口 Parameter configuration window
“站位调试”可以在站位调试器(如图 8 所示)中启用与禁用站位。修改寄存器参数。
"Station debugging" can enable and disable stations in the station debugger (as
shown in Figure 8). Modify the register parameters.

图 8 站位寄存器 Station register


“相机视觉”(如图 9 所示)由图像选择控件组、功能选择控件组、工具控件组和图像界
面组成。
在图像选择控件组中既可以加载图片,选择路径加载图片;也下拉列表中选择相机单帧采
集或连续采集。停止连续采集需点击停止采集按钮。
在功能选择控件组中的拉下列表中选择图像算法,点击“测试”按钮进行测试。如果勾选
“更新后自动测试”,则在图像重新采集后,不需要点击测试按钮即可自动测试。
工具控件组中常用的是模板匹配、直线查找、圆查找和查找二维码。在使用工具空间组中
的工具时先要加载图片。
"Camera Vision" (as shown in Figure 9) consists of an image selection control
group, a function selection control group, a tool control group and an image
interface.
In the image selection control group, you can load pictures and select the path
to load pictures; you can also select single-frame capture or continuous
capture from the drop-down list. To stop continuous collection, click the stop
collection button.
Select the image algorithm from the drop-down list in the function selection
control group, and click the "Test" button to test. If you check "Automatically
test after update", after the image is re-acquired, you do not need to click
the test button to automatically test.
Commonly used in the tool control group are template matching, line search,
circle search and QR code search. When using the tools in the tool space group,
you must first load the image.

图 9 相机视觉 Camera vision


点击“模板匹配”按钮,弹出模板匹配界面(如图 10 所示)。模板匹配界面由“一般参
数”、“模板区域”、“模板信息”和“高级参数”组成。对比度是最白与最黑亮度单位
的相除值。因此白色越亮、黑色越暗,对比度就越高。最小组件尺寸表示模板的最小尺寸
模板区域中,rect 绘制轴平行矩形,rect2 绘制旋转矩形,circle 画圆。下拉列表选择绘
制图形的逻辑关系,第一次绘制图形默认与(and)。制作模板前,首先要“保存当前图片
为模板图片”。在模板区域中选择工具按钮画出搜索图形,鼠标右击确认所画的搜索图形
在一般参数控件组中修改参数,点击“显示模板”得到模板。如果模板合适,点击“保存
模板”按钮保存模板。如果模板不好,则可以点击“清除所有”按钮,刷新图像,重新制
作模板。模板制作完成后回到视觉界面,在下拉列表中选择图像算法,点击“重新初始
化”按钮,进行初始化。回到模板匹配界面,点击“匹配当前图片”按钮,就可以看到模
板匹配分数。
Click the "Template Matching" button, and the template matching interface will
pop up (as shown in Figure 10). The template matching interface consists of
"general parameters", "template area", "template information" and "advanced
parameters". Contrast is the division of the whitest and darkest brightness
units. Therefore, the brighter the white and the darker the black, the higher
the contrast. The minimum component size represents the minimum size of the
template. In the template area, rect draws an axis-parallel rectangle, rect2
draws a rotated rectangle, and circle draws a circle. The drop-down list
selects the logical relationship of drawing graphics, and the default is and
(and) when the graphics are drawn for the first time. Before making a template,
you must first "save the current picture as a template picture". Select the
tool button in the template area to draw the search graph, and right-click to
confirm the search graph drawn. Modify the parameters in the general parameter
control group, and click "Display Template" to get the template. If the
template is suitable, click the "Save Template" button to save the template. If
the template is not good, you can click the "Clear All" button to refresh the
image and recreate the template. After the template is made, return to the
visual interface, select the image algorithm in the drop-down list, and click
the "re-initialize" button to initialize. Back to the template matching
interface, click the "match current picture" button to see the template
matching score.

图 10 模板匹配 Template matching


点击“直线查找”按钮,得到直线查找界面(如图 11 所示),由搜索矩形参数和直线参数
组成。阈值即图像分割基准,基于阈值可以完成图像的二值化。平滑系数是关于指数平滑
法的一个系数,图像背景复杂可选较大的平滑系数,反之,可选较小的平滑系数。极性
positive 表示从黑到白,negative 表示从白到黑。搜索点选取 first 表示第一条边,last
表示最后一条边。勾选“显示找到的点”,则显示点和查找到的直线,反之仅显示找到的
直线。“选择拍照步骤”,“画搜索矩形”或“读取搜索矩形”,修改直线参数后,“显
示直线”。如直线合适,则“保存搜索矩形”,“保存当前算法”。如果抓边出错,可以
“读取搜索矩形”、“读取直线算法”查看抓边出错原因,修改搜索矩形或抓边参数。
Click the "Line Search" button to get the line search interface (as shown in
Figure 11), which consists of search rectangle parameters and line parameters.
Threshold is the benchmark for image segmentation. Based on the threshold,
image binarization can be completed. The smoothing coefficient is a coefficient
related to the exponential smoothing method. If the background of the image is
complex, a larger smoothing coefficient can be selected, otherwise, a smaller
smoothing coefficient can be selected. Positive polarity means from black to
white, negative means from white to black. The search point selection first
represents the first edge, and last represents the last edge. Check "Show found
points", the points and the found lines will be displayed, otherwise, only the
found lines will be displayed. "Select the photographing step", "Draw the
search rectangle" or "Read the search rectangle", after modifying the straight-
line parameters, "Display straight line". If the straight line is suitable,
then "Save the search rectangle" and "Save the current algorithm". If there is
an error in edge-grabbing, you can view the cause of the edge-grabbing error in
"Read Search Rectangle" and "Read Straight Line Algorithm", and modify the
search rectangle or edge-grabbing parameters.

图 11 直线查找 - line search


“圆查找”(如图 12 所示)和“直线查找”类似。不同点在于画搜索矩形变成双圆环。
"Circle search" (as shown in Figure 12) is similar to "Straight line search".
The difference is that drawing a search rectangle becomes a double circle.
图 12 圆查找 Circle search
到目前为止,“查找二维码”主要用于画 ROI 框。“画搜索矩形”,右击确认,“保存搜
索矩形”。当然,在“直线查找”中也可以画 ROI 框,方法类似。
So far, "Find QR Code" is mainly used to draw ROI box. "Draw search rectangle",
right click to confirm, "Save search rectangle". Of course, you can also draw
an ROI box in the "straight line search", the method is similar.
图 13 查找二维码 Find the QR code

You might also like