Machine vision travel time detection method and system

文档序号:1963262 发布日期:2021-12-14 浏览:16次 中文

阅读说明:本技术 一种机器视觉走时检测方法及系统 (Machine vision travel time detection method and system ) 是由 罗立恒 彭翔 刘晓利 鲍贤勇 荆江波 于 2021-09-16 设计创作,主要内容包括:本发明提出了一种机器视觉走时检测方法及系统。所述机器视觉走时检测方法,包括以下步骤:步骤S1、获取待测手表正面的深度图;步骤S2、根据待测手表正面的深度图,识别得到手表指针的轮廓;步骤S3、根据手表指针的轮廓获取手表指针的取向,从而得到手表指示时间。本发明的机器视觉走时检测方法及系统根据手表指针和表盘深度不同的特点,实现指针的识别,从而确保对手表走时检测的准确性。(The invention provides a machine vision travel time detection method and system. The machine vision travel time detection method comprises the following steps: s1, acquiring a depth map of the front of the watch to be tested; step S2, identifying and obtaining the outline of the watch pointer according to the depth map of the front of the watch to be tested; and step S3, acquiring the orientation of the watch hands according to the outline of the watch hands, thereby obtaining the indicated time of the watch. The machine vision travel time detection method and the machine vision travel time detection system realize the identification of the pointer according to the characteristics of different depths of the pointer and the dial plate of the watch, thereby ensuring the accuracy of travel time detection of the watch.)

1. A machine vision travel time detection method is characterized by comprising the following steps:

s1, acquiring a depth map of the front of the watch to be tested;

step S2, identifying and obtaining the outline of the watch pointer according to the depth map of the front of the watch to be tested;

and step S3, acquiring the orientation of the watch hands according to the outline of the watch hands, thereby obtaining the indicated time of the watch.

2. The machine-vision travel-time detection method of claim 1, wherein step S1 includes:

s1.1, shooting a light field image of the front side of the watch to be tested by using a light field camera;

and S1.2, calculating to obtain a depth map of the front surface of the watch to be tested through a depth algorithm according to the light field image of the front surface of the watch to be tested.

3. The machine-vision travel-time detection method of claim 2, characterized in that the depth algorithm employs a multi-field-angle algorithm.

4. The machine vision travel time detection method of claim 1, wherein in step S3, a reference orientation position is preset, an angle between the outline of the watch hand and the reference orientation position is detected, and the orientation of the watch hand and the corresponding indicated time are obtained according to the detected angle.

5. A machine vision travel time detection system, comprising:

the depth map acquisition module (100) is used for acquiring a depth map of the front surface of the watch to be measured;

the pointer identification module (200) is used for identifying and obtaining the outline of the watch pointer according to the depth map of the front of the watch to be tested;

a reading module (300) for acquiring the orientation of the hands of the watch according to the profile of the hands of the watch, so as to obtain the indicated time of the watch.

6. The machine vision travel time detection system of claim 5, wherein the depth map acquisition module (100) comprises:

the light field camera (110) is used for shooting a light field image of the front surface of the watch to be tested;

and the depth map calculation module (120) is used for calculating the depth map of the front surface of the watch to be tested through a depth algorithm according to the light field image of the front surface of the watch to be tested.

7. The machine-vision travel-time detection system of claim 6, wherein the depth algorithm employs a multi-field-angle algorithm.

8. The machine vision travel time detection system of claim 5, characterized in that the reading module (300) is configured to preset a reference orientation position, detect an angle between the outline of the hands of the watch and the reference orientation position, and obtain the orientation of the hands of the watch and the corresponding indicated time according to the detected angle.

Technical Field

The invention relates to the technical field of travel time detection, in particular to a machine vision travel time detection method and system.

Background

In order to automatically detect the travel time accuracy of a mechanical watch, a machine vision travel time detection system can be adopted at present, and the system acquires the positions of an hour hand, a minute hand and a second hand through a traditional camera and then obtains the positions through computer processing, and calculates the time through an angle.

With the above technology, there are the following technical disadvantages:

1) due to the fact that the texture of part of the dial plate is complex, the images collected by the traditional camera are easy to identify errors, and the texture of the dial plate is identified as a pointer;

2) when the color of the pointer is overlapped with that of part of the dial plate, the machine vision travel time detection system is easily affected by the color and cannot identify the pointer;

3) the recognition success rate is low;

4) the meter money compatibility is low, and different meter money needs to be identified under different light sources;

5) in order to improve the identification success rate, the existing machine vision travel time detection system generally carries out 15 exposures on each watch, identifies 15 photos at an interval of 1 second each time, and corrects actual travel time by taking more time in 15 identification results through post-processing. The method solves the error caused by single identification error of partial watches, but still does not solve the problem of error identification caused by the influence of the dial grain on the pointer identification.

Disclosure of Invention

The invention provides a machine vision travel time detection method and a machine vision travel time detection system aiming at the technical problems.

The invention provides the following technical scheme:

the invention provides a machine vision travel time detection method, which comprises the following steps:

s1, acquiring a depth map of the front of the watch to be tested;

step S2, identifying and obtaining the outline of the watch pointer according to the depth map of the front of the watch to be tested;

and step S3, acquiring the orientation of the watch hands according to the outline of the watch hands, thereby obtaining the indicated time of the watch.

In the above machine vision travel time detection method of the present invention, step S1 includes:

s1.1, shooting a light field image of the front side of the watch to be tested by using a light field camera;

and S1.2, calculating to obtain a depth map of the front surface of the watch to be tested through a depth algorithm according to the light field image of the front surface of the watch to be tested.

In the machine vision travel time detection method, the depth algorithm adopts a multi-field-angle algorithm.

In the machine vision travel time detection method of the present invention, in step S3, a reference orientation position is preset, an included angle between the outline of the watch hand and the reference orientation position is detected, and then the orientation of the watch hand and the time indicated by the orientation are obtained according to the detected included angle.

The invention also provides a machine vision travel time detection system, which comprises:

the depth map acquisition module is used for acquiring a depth map of the front surface of the watch to be tested;

the pointer identification module is used for identifying and obtaining the outline of the watch pointer according to the depth map of the front side of the watch to be tested;

and the reading module is used for acquiring the orientation of the watch hands according to the outline of the watch hands so as to obtain the indicated time of the watch.

In the machine vision travel time detection system of the present invention, the depth map acquisition module includes:

the light field camera is used for shooting a light field image on the front side of the watch to be tested;

and the depth map calculation module is used for calculating to obtain the depth map of the front surface of the watch to be tested through a depth algorithm according to the light field image of the front surface of the watch to be tested.

In the machine vision travel time detection system, the depth algorithm adopts a multi-field-angle algorithm.

In the machine vision travel time detection system, the reading module is used for presetting a reference orientation position, detecting an included angle between the outline of the watch pointer and the reference orientation position, and then acquiring the orientation of the watch pointer and the corresponding indicated time according to the detected included angle.

According to the machine vision travel time detection method and system, the traditional camera is replaced by the light field camera, and the pointer is recognized according to the characteristics of different depths of the pointer and the dial plate of the watch, so that the accuracy of travel time detection of the watch is ensured.

Drawings

The invention is further described below with reference to the accompanying drawings:

FIG. 1 shows a schematic block diagram of a machine vision travel time detection system in accordance with a preferred embodiment of the present invention;

FIG. 2 shows a block diagram of functional modules of the machine vision travel time detection system shown in FIG. 1.

Detailed Description

The technical problem to be solved by the invention is as follows: aiming at a watch with a complex dial texture and the same dial color and pointer color, the conventional machine vision travel time detection system is difficult to or even incapable of identifying the pointer of the watch, so that travel time detection of the watch cannot be performed. The invention proposes the idea about the technical problem that: the light field camera is adopted to replace a traditional camera, and the pointer is identified according to the characteristics of different depths of the pointer and the dial plate of the watch, so that the accuracy of travel time detection of the watch is ensured.

In order to make the technical solutions, technical objects, and technical effects of the present invention clearer so as to enable those skilled in the art to understand and implement the present invention, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.

As shown in fig. 1, fig. 1 is a schematic structural diagram of a machine vision travel time detection system according to a preferred embodiment of the present invention. Based on the machine vision travel time detection system, the invention provides a machine vision travel time detection method, which comprises the following steps:

s1, acquiring a depth map of the front of the watch to be tested;

in 3D computer graphics and computer vision, a depth map is an image or image channel that contains information about the distance of the surface of scene objects from a viewpoint for simulated 3D shapes or reconstructing them.

Specifically, step S1 includes:

s1.1, shooting a light field image of the front side of the watch to be tested by using a light field camera;

s1.2, calculating to obtain a depth map of the front surface of the watch to be tested through a depth algorithm according to the light field image of the front surface of the watch to be tested;

here, the body of a light field camera is almost the same as that of a general digital camera, but the internal structure is largely different. In general, a camera captures light through a main lens and focuses the light on a film or a photoreceptor behind the lens, and the sum of all the light forms a small spot on a photograph to display an image. In the light field camera, a microscope array with 225 micro lenses is set between the main lens and the photoreceptor, and each small lens array receives the light from the main lens and transmits the light to the photoreceptor to separate out focused light and convert the light data for recording in digital mode. The built-in software of the camera operates the 'expanded light field', tracks the falling point of each ray on the images at different distances, and can take perfect photos after digital refocusing.

Moreover, the light field camera is contrary to the tradition, the aperture size and the depth of field of the lens are reduced, the extra light is controlled by the small mirror array, the depth of field of each image is revealed, then the tiny secondary images are projected onto the photoreceptor, the dim light rings around all the focused images become clear, the conditions of increasing luminosity, reducing the photographing time and graining brought by the large aperture of the traditional camera are kept, and the depth of field and the image definition are not sacrificed.

For computing a depth map from a light field image, there may be the following method:

1. and (4) obtaining a depth map according to the sub-aperture image matching under different viewing angles by using a multi-field angle method.

2. And calculating the depth value corresponding to the clearest picture according to the gradient or texture difference of each pixel point at different depths by using a refocusing method to obtain a depth map.

In this embodiment, the light field camera records light field information of the watch to be tested, the light field signal is processed by the computer, and the depth map of the watch to be tested can be obtained by calculating the change rate of each obtained picture under all the micro lenses (multi-field-angle algorithm).

The depth map displays different colors according to different depths of parts of various parts of the watch, and is irrelevant to the color of an original object. And identifying the position of the pointer through the depth map, and calculating the travel time.

Step S2, identifying and obtaining the outline of the watch pointer according to the depth map of the front of the watch to be tested;

here, since the watch hands and the dial are located at different heights, the depths of the hands and the dial are different. By this, the watch hand and the dial can be distinguished.

In this embodiment, the watch hands include a second hand, an hour hand, and a minute hand, which may be distinguished based on their respective lengths and/or depth of field. In other embodiments, the watch hands may not include a second hand.

And step S3, acquiring the orientation of the watch hands according to the outline of the watch hands, thereby obtaining the indicated time of the watch.

In this step, a reference orientation position, for example, an orientation position in the 12 o 'clock direction, may be preset, an angle between the outline of the watch hand and the reference orientation position (for example, the orientation position in the 12 o' clock direction) may be detected, and the orientation of the watch hand and the corresponding indicated time may be obtained according to the detected angle.

As shown in FIG. 2, FIG. 2 illustrates a block diagram of functional modules of the machine vision travel time detection system shown in FIG. 1. The invention provides a machine vision travel time detection system, which comprises:

the depth map acquiring module 100 is used for acquiring a depth map of the front surface of the watch to be tested;

in 3D computer graphics and computer vision, a depth map is an image or image channel that contains information about the distance of the surface of scene objects from a viewpoint for simulated 3D shapes or reconstructing them.

Specifically, the depth map acquisition module 100 includes:

a light field camera 110 for shooting a light field image of the front of the watch to be tested;

the depth map calculation module 120 is configured to calculate a depth map of the front surface of the watch to be tested through a depth algorithm according to the light field image of the front surface of the watch to be tested;

here, the body of a light field camera is almost the same as that of a general digital camera, but the internal structure is largely different. In general, a camera captures light through a main lens and focuses the light on a film or a photoreceptor behind the lens, and the sum of all the light forms a small spot on a photograph to display an image. In the light field camera, a microscope array with 225 micro lenses is set between the main lens and the photoreceptor, and each small lens array receives the light from the main lens and transmits the light to the photoreceptor to separate out focused light and convert the light data for recording in digital mode. The built-in software of the camera operates the 'expanded light field', tracks the falling point of each ray on the images at different distances, and can take perfect photos after digital refocusing.

Moreover, the light field camera is contrary to the tradition, the aperture size and the depth of field of the lens are reduced, the extra light is controlled by the small mirror array, the depth of field of each image is revealed, then the tiny secondary images are projected onto the photoreceptor, the dim light rings around all the focused images become clear, the conditions of increasing luminosity, reducing the photographing time and graining brought by the large aperture of the traditional camera are kept, and the depth of field and the image definition are not sacrificed.

For computing a depth map from a light field image, there may be the following method:

1. and (4) obtaining a depth map according to the sub-aperture image matching under different viewing angles by using a multi-field angle method.

2. And calculating the depth value corresponding to the clearest picture according to the gradient or texture difference of each pixel point at different depths by using a refocusing method to obtain a depth map.

In this embodiment, the light field camera records light field information of the watch to be tested, the light field signal is processed by the computer, and the depth map of the watch to be tested can be obtained by calculating the change rate of each obtained picture under all the micro lenses (multi-field-angle algorithm).

The depth map displays different colors according to different depths of parts of various parts of the watch, and is irrelevant to the color of an original object. And identifying the position of the pointer through the depth map, and calculating the travel time.

The pointer identification module 200 is used for identifying and obtaining the outline of the watch pointer according to the depth map of the front surface of the watch to be tested;

here, since the watch hands and the dial are located at different heights, the depths of the hands and the dial are different. By this, the watch hand and the dial can be distinguished.

In this embodiment, the watch hands include a second hand, an hour hand, and a minute hand, which may be distinguished based on their respective lengths and/or depth of field. In other embodiments, the watch hands may not include a second hand.

A reading module 300 for obtaining the orientation of the hands of the watch according to the profile of the hands of the watch, so as to obtain the indicated time of the watch.

Here, the reading module 300 may preset a reference orientation position, for example, a 12 o 'clock orientation position, and then detect an angle between the hands of the watch and the reference orientation position (for example, the 12 o' clock orientation position), so as to obtain the orientation of the hands of the watch and the corresponding indicated time.

While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于FPGA的IRIG-B直流码解码及对时自动切换方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!