CN106296641A - A kind of vision-sensing method and vision sensor - Google Patents
A kind of vision-sensing method and vision sensor Download PDFInfo
- Publication number
- CN106296641A CN106296641A CN201510313260.9A CN201510313260A CN106296641A CN 106296641 A CN106296641 A CN 106296641A CN 201510313260 A CN201510313260 A CN 201510313260A CN 106296641 A CN106296641 A CN 106296641A
- Authority
- CN
- China
- Prior art keywords
- pixel value
- detected
- product
- resolution
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/001—Industrial image inspection using an image reference approach
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Abstract
The application provides a kind of vision-sensing method and vision sensor.Described method includes: gather the image of product to be detected according to predetermined period;The image of described product to be detected is contrasted with the standard picture prestored, obtains the image of described product to be detected and the similarity of described standard picture;When described similarity reaches preset first threshold value, export induced signal.A kind of vision-sensing method of the embodiment of the present application offer and vision sensor, image by compact camera taken at regular intervals product to be detected, and contrasted with being stored in standard picture therein by the image of this collection, thus judge that product to be detected is whether as required product.A kind of vision-sensing method of the embodiment of the present application offer and vision sensor are in actual applications, it is not necessary to generate and trigger signal, and design the easiest, facilitate common technical staff to use.
Description
Technical field
The application relates to field of sensing technologies, particularly to a kind of vision-sensing method and vision sensor.
Background technology
Sensing technology can pass through various kinds of sensors, obtains the information of various physical quantity, chemical quantity or Biomass.Get these
After information, required feature can be extracted from these information by the information processing technology in later stage, and extract based on these
Feature carries out identification, compares, classifies and the sequence of operations such as judgement.The development of sensing technology has promoted industrial quarters automatization journey
The raising of degree.
In various sensing technologies, visual sensing technology is due to advantages such as its suitability are wide, know-why is ripe the most progressively
It is applied in the product identification process of industrial quarters.On the product production line of industrial quarters, generally require identification arrival specific bit and put
On product be whether to produce required product.If the product needed for Sheng Chaning, then can carry out follow-up work flow;As
Fruit is not to produce required product, then need to continue waiting for the arrival of subsequent product.
The most conventional vision sensor can be divided into two kinds: one is photoelectric sensor, and one is classical vision sensor.Fig. 1
For the operation principle schematic diagram of photoelectric sensor in prior art.As it is shown in figure 1, described photoelectric sensor by laser instrument, optical fiber,
Photodetector and signal processing unit composition.Laser instrument can launching fiber voluntarily, product to be detected is formed reflection light,
And this reflection light is carried out follow-up signal processing, such that it is able to judge whether product to be detected has arrived at appointment position.But
This sensor is when detecting product, and once product has a small amount of inclination, then can cause being greatly lowered of reflected optical power, thus
Cause sensing to make mistakes, use and inconvenience.
Classical vision sensor of the prior art can obtain triggering signal beforehand through signals collecting.Obtaining triggering signal
By camera lens, product to be detected is shot afterwards, then the image after shooting can be carried out computing, thus judge to detection
Whether product is required product.But the complexity of this sensor design is at a relatively high, and need through specialty training
Can normally use, much inconvenience can be brought the most in use.
It should be noted that introduction to technical background above is intended merely to the convenient technical scheme to the application and carries out clear, complete
Illustrate, and facilitate the understanding of those skilled in the art to illustrate.Can not be merely because these schemes be in the background technology of the application
Part is set forth and thinks that technique scheme is known to those skilled in the art.
Summary of the invention
The purpose of the embodiment of the present application is to provide a kind of vision-sensing method and vision sensor, with easily to product to be detected
Detect.
A kind of vision-sensing method and vision sensor that the embodiment of the present application provides are achieved in that
A kind of vision-sensing method, described method includes:
The image of product to be detected is gathered according to predetermined period;
The image of described product to be detected is contrasted with the standard picture prestored, obtains image and the institute of described product to be detected
State the similarity of standard picture;
When described similarity reaches preset first threshold value, export induced signal.
Preferably, the described image by described product to be detected contrasts with the standard picture prestored, and obtains described product to be detected
The image of product specifically includes with the similarity of described standard picture:
The resolution of described product image to be detected is set to the resolution identical with the resolution of described standard picture;
Extract the first pixel value vector of the product image to be detected after resolution is set;
Second pixel value vector of vectorial for described first pixel value and described standard picture is contrasted, obtain the first pixel value to
The similarity that amount is vectorial with the second pixel value.
Preferably, the first pixel value vector of the product image to be detected after described extraction arranges resolution specifically includes:
Extraction arranges the rgb value of each pixel in the product image to be detected after resolution;
The rgb value extracted is sorted according to preset order, constitutes and described first of product image to be detected after resolution is set
Pixel value vector.
Preferably, the first pixel value vector of the product image to be detected after described extraction arranges resolution specifically includes:
Extraction arranges the gray value of each pixel in the product image to be detected after resolution;
The gray value extracted is sorted according to preset order, constitutes described the first picture that product image to be detected after resolution is set
Element value vector.
Preferably, described the second pixel value vector by vectorial for described first pixel value and described standard picture contrasts, and obtains
First pixel value vector specifically includes with the similarity of the second pixel value vector:
Contrast described first pixel value vector and the pixel value of corresponding position in the second pixel value vector one by one, when two pixel values
Difference when being not higher than predetermined threshold value, it is determined that two pixel values are identical;
Record the number that the first pixel value vector is identical with pixel value in the second pixel value vector;
Calculate the identical number of described pixel value and account for the rate of specific gravity of all pixel value numbers.
Preferably, before the described image gathering product to be detected according to predetermined period, described method also includes:
Adjust the shooting brightness of the middle-size and small-size camera of vision sensor.
A kind of vision sensor, including compact camera, signal processing unit and signal output unit, it is characterised in that described
Compact camera is used for gathering the image of product to be detected according to predetermined period;
Described signal processing unit is used for contrasting the image of described product to be detected with the standard picture prestored, and obtains described
The image of product to be detected and the similarity of described standard picture;
Described signal output unit is used for when described similarity reaches preset first threshold value, exports induced signal.
Preferably, described signal processing unit specifically includes:
Resolution arranges module, is used for being set to and the resolution of described standard picture the resolution of described product image to be detected
Identical resolution;
Pixel value vector extraction module, is used for extracting the first pixel value vector of the product image to be detected after arranging resolution;
Similarity acquisition module, right for the second pixel value vector of vectorial for described first pixel value and described standard picture is carried out
Ratio, obtains the similarity of the first pixel value vector and the second pixel value vector.
Preferably, described pixel value vector extraction module specifically includes:
Rgb value extraction module, is used for extracting the rgb value of each pixel in the product image to be detected after arranging resolution;
Pixel value vector first constitutes module, is used for sorting the rgb value extracted according to preset order, constitutes described setting and divide
First pixel value vector of the product image to be detected after resolution.
Preferably, described pixel value vector extraction module specifically includes:
Gray value extraction module, is used for extracting the gray value of each pixel in the product image to be detected after arranging resolution;
Pixel value vector second constitutes module, and the gray value being used for extracting sorts according to preset order, constitutes and described arranges resolution
First pixel value vector of the product image to be detected after rate.
A kind of vision-sensing method of the embodiment of the present application offer and vision sensor, by compact camera taken at regular intervals product to be detected
The image of product, and the image of this collection is contrasted with being stored in standard picture therein, thus whether judge product to be detected
For required product.A kind of vision-sensing method of the embodiment of the present application offer and vision sensor are in actual applications, it is not necessary to raw
Become and trigger signal, and design the easiest, facilitate common technical staff to use.
Accompanying drawing explanation
Fig. 1 is the operation principle schematic diagram of photoelectric sensor in prior art;
The flow chart of a kind of vision-sensing method that Fig. 2 provides for the embodiment of the present application;
The functional block diagram of a kind of vision sensor that Fig. 3 provides for the embodiment of the present application.
Detailed description of the invention
For the technical scheme making those skilled in the art be more fully understood that in the application, below in conjunction with in the embodiment of the present application
Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only
It is some embodiments of the present application rather than whole embodiments.Based on the embodiment in the application, ordinary skill people
All other embodiments that member is obtained under not making creative work premise, all should belong to the scope of the application protection.
The flow chart of a kind of vision-sensing method that Fig. 2 provides for the embodiment of the present application.Although flow process being described below include with specific
Multiple operations that order occurs, but it should be clearly understood that these processes can include more or less of operation, these operations
Can sequentially perform or executed in parallel (such as using parallel processor or multi-thread environment).As in figure 2 it is shown, described method is permissible
Including:
S1: gather the image of product to be detected according to predetermined period.
When the vision sensor using the application to provide, first can be fixed by this vision sensor, direction alignment is to be detected
Product.Then can pre-set a collection period, and gather the image of product to be detected according to the default cycle.Specifically,
The embodiment of the present application can utilize the compact camera on the application vision sensor to shoot product to be detected with the cycle of 5 seconds/time
Image.Image after shooting can be stored in the internal memory of vision sensor.In the application one preferred embodiment, in shooting
Before the image of product to be detected, it is also possible to adjust the shooting brightness of described compact camera, such that it is able to acquisition quality is preferably treated
The image of detection product.
S2: contrasted with the standard picture prestored by the image of described product to be detected, obtains the image of described product to be detected
Similarity with described standard picture.
In the embodiment of the present application, the standard picture of product to be detected can be stored in described vision sensor.This standard picture
Can be stored in the internal storage of described vision sensor with the form of BMP.When described vision sensor collects to be detected
After the image of product, this image can be contrasted with described standard picture.In the application one embodiment, under can passing through
State three steps and realize the image of described product to be detected and the contrast of the standard picture prestored:
S201: the resolution of described product image to be detected is set to the resolution identical with the resolution of described standard picture.
Processing for the ease of follow-up contrast, first the resolution of described product image to be detected can be arranged by the embodiment of the present application
For the resolution identical with the resolution of described standard picture.Specifically, the resolution of described standard picture can be the most in advance
Set, it is also possible to being to obtain after vision sensor reads described standard picture, this is not limited by the application.Vision passes
After sensor collects the image of described product to be detected, can be according to the resolution of described standard picture to described product figure to be detected
The resolution of picture resets.The image processing software specifically can being internally integrated by vision sensor or and visual sensing
PaintShop in the PC that device is connected resets the resolution of described product image to be detected, treats described in ensureing
Detection product image has identical resolution with described standard picture.
S202: extract the first pixel value vector of the product image to be detected after resolution is set.
One width colour picture embodies after being typically made up of multiple pixels.Such as, on display, the picture of display, is to pass through display
Display function after each light-emitting component energising that can show different color on screen, finally makes on screen numerous such
The optical element reduction that combines demonstrates picture.When the picture that indicator screen shows is original resolution, on indicator screen
Each pixel on each element correspondence picture of the picture of display.
After each light-emitting component above-mentioned energising, the color of display, depends on the rgb value of respective pixel in picture.RGB
Color mode is a kind of color standard of industrial quarters, is by red (Red, R), green (Green, G), blue (Blue, B) three
The change of Color Channel and their superpositions each other obtain color miscellaneous, RGB be i.e. represent red, green,
The color of blue three passages, also becomes three primary colors.This color mode almost include human eyesight can all colours of perception,
It is to use one of the widest color system at present.In conventional a kind of RGB standard, amount 0-255 of each color of R, G, B
Between 1 decimal number represent (corresponding binary number 00000000~11111111).Another webpage is commonly used
In RGB standard, the rgb value of a pixel is identified, such as the form of #000000 by the hexadecimal number of 6.This
Skilled person is readily apparent that, 1 decimal number mark between amount 0-255 of each color of rgb color of a pixel
Know, can be converted to represent by the hexadecimal number of 6, i.e. exist in different representation and there is one-to-one relationship.
On the whole, this pixel is obtained after the redness (R) of the corresponding number in these standards, green (G) and blue (B) mixing
Final Show Color.
And then, extract the rgb value of each pixel in described picture, and the rgb value extracted is sorted according to a definite sequence, example
As sorted according to pixel number, such that it is able to constitute the pixel value vector of this picture.
Such as, certain width colour picture has the pixel of 200*120 (also referred to as resolution).The RGB of each pixel identifies as follows:
RGB(m,n)=Ra, Gb, Bc
Wherein, m, n represent the row and column in picture residing for a certain pixel respectively;The span of m is 1 to 200, and n takes
Value scope is 1 to 120.Ra, Gb, BcFor any integer in 0-255.
Or, RGB(m,n)=#OPQRST
Wherein, the span of m is 1 to 200, and the span of n is 1 to 120, and O, P, Q, R, S, T are 0-F
Arbitrary 16 system values.
Extract the eigenvalue of each pixel, will the above-mentioned rgb value of each pixel extract.Such as, in this picture
(m, n) individual pixel, extract its rgb value, the most above-mentioned (Ra, Gb, Bc) or #OPQRST.
The eigenvalue that pixel each in this picture extracts is arranged in order and may be constructed pixel value vector.Such as, arrangement
The pixel value vector such as the numerical value of a series of arrangements of following form of rear composition:
(RGB(1,1), RGB(1,2)..., RGB(1,120), RGB(2,1), RGB(2,2)..., RGB(2,120)..., RGB(200,1),
RGB(200,2)... RGB(200,120)) formula 1
Above-mentioned formula 1 is the pixel value vector of this picture.
The embodiment of the present application can by said method extract the first pixel value that the product image to be detected after resolution is set to
Amount.
It addition, for black and white picture, the picture that a width gray scale shows can also embody after being made up of multiple pixels.So,
On display, the gray scale color of display after the energising of each light-emitting component, depends on the rgb value of respective pixel in picture.At this moment,
The rgb value of this kind of gray-scale pixels has certain rule.In conventional a kind of standard, R, G, B value of gray value is equal.
So, utilize this standard, generally gray scale can be divided into 256 grades, represent the color depth at black white image midpoint.Can also
Otherwise represent gray value, such as, represented by the data of 1byte.At this moment, the data of this 1byte each
On value and rgb value there is certain corresponding relation.So, extract the gray value of each pixel in described picture, and will
The gray value extracted sorts according to pixel number order, it is also possible to obtain the feature value vector of shape such as formula 1.
Gray value has certain corresponding relation with colored RGB.Utilize this corresponding relation, colored RGB can be converted to
Corresponding gray value.Several method that by RGB tristimulus values be converted to corresponding grey scale value be set forth below:
(1) floating-point arithmetic: Gray=R*0.3+G*0.59+B*0.11
(2) integer method: Gray=(R*30+G*59+B*11)/100
(3) displacement method: Gray=(R*77+G*151+B*28) > > 8;
(4) mean value method: Gray=(R+G+B)/3;
(5) green: Gray=G is only taken;
Owing to the span of gray value is significantly less than the span of RGB, and after using gray value replacement RGB to reduce
Continuous computation complexity, and can guarantee that the recognition effect reaching essentially identical.So, in the application one preferred embodiment, can
To substitute colored rgb value with the gray value of pixel, first of the product image to be detected after resolution is set can be formed equally
Pixel value vector.
S203: the second pixel value vector of vectorial for described first pixel value and described standard picture is contrasted, obtains the first picture
The similarity that element value vector is vectorial with the second pixel value.
Second pixel value vector of the described standard picture in the embodiment of the present application is equally according to the method in step S202
Extract, and the second pixel value vector after extraction can be saved in the internal storage of vision sensor, and with described
Standard picture forms relation one to one.Needing exist for explanation, the pixel value in described second pixel value vector can be deposited
Formed with rgb value and forming two kinds of forms with gray value, and according to the form of pixel value in described first pixel value vector
Correspondingly call.If the pixel value in the i.e. first pixel value vector is formed with rgb value, then contrasting
Time, the second pixel value vector that can be formed with rgb value with respective calls;If the pixel value in the first pixel value vector be with
Gray value is formed, then when contrasting, the second pixel value vector that can be formed with gray value with respective calls.
Specifically, the embodiment of the present application, when contrasting, can contrast the first pixel value vector and the second pixel value vector one by one
The pixel value of middle corresponding position.Such as, image to be detected is 200*120 with the resolution of standard picture, and is
Colour picture, the first pixel value vector can be expressed as:
(RGB(1,1), RGB(1,2)..., RGB(1,120), RGB(2,1), RGB(2,2)..., RGB(2,120)..., RGB(200,1),
RGB(200,2)... RGB(200,120)),
Second pixel value vector can be expressed as:
(rgb(1,1), rgb(1,2)..., rgb(1,120), rgb(2,1), rgb(2,2)..., rgb(2,120)..., rgb(200,1), rgb(200,2)... rgb(200,120))。
So when contrasting, can be by RGB(1,1)With rgb(1,1)Contrast, by RGB(1,2)With rgb(1,2)Contrast ...,
By RGB(200,120)With rgb(200,120)Contrast.When the threshold value that the difference of two pixel values of corresponding position is not higher than preset
Time, then it is assumed that two pixel values are identical.The first pixel value vector may finally be recorded identical with pixel value in the second pixel value vector
Number, and calculate the identical number of pixel value and account for the rate of specific gravity of all pixel value numbers.This rate of specific gravity can represent described
The similarity that one pixel value vector is vectorial with the second pixel value.
S3: when described similarity reaches preset first threshold value, exports induced signal.
In the embodiment of the present application, first threshold can be pre-set, and judge described product to be detected by this first threshold
Whether it is required product.Specifically, described first threshold can be set to 60% by the embodiment of the present application, when described similarity
When reaching 60%, just can be exported induced signal by the signal output unit in vision sensor, described induced signal can be GPIO
Signal.When vision sensor output induced signal, this induced signal can be with switched-on light emitting diodes so that light emitting diode is sent out
Light, represents product to be detected and is required product.When described similarity is not reaching to preset first threshold value, visual sensing
Device does not the most export induced signal, and described light emitting diode just will not be luminous, represent product to be detected be not required product or
Required product does not also arrive specified location.
The embodiment of the present application also provides for a kind of vision sensor.The merit of a kind of vision sensor that Fig. 3 provides for the embodiment of the present application
Can module map.As it is shown on figure 3, described vision sensor includes compact camera 100, signal processing unit 200 and signal are defeated
Go out unit 300, wherein:
Described compact camera 100 is used for gathering the image of product to be detected according to predetermined period;
Described signal processing unit 200 is used for contrasting the image of described product to be detected with the standard picture prestored, and obtains
The image of described product to be detected and the similarity of described standard picture;
Described signal output unit 300 is used for when described similarity reaches preset first threshold value, exports induced signal.
Specifically, described compact camera 100 can be arranged on the front end of described vision sensor, described signal processing unit 200
Can be integrated in described vision sensor as a functional module or be arranged at small-sized with described as an application program
In the PC that camera 100 is connected, this is not limited by the application.Described signal output unit 300 can be with light-emitting diodes
Pipe circuit is connected, and when signal output unit 300 exports induced signal, described light emitting diode is the most luminous, represents to be detected
Product is required product.When described signal output unit 300 does not exports induced signal, described light emitting diode just will not
Luminescence, represents product to be detected and is not required product or required product does not also arrive specified location.
In the application one preferred embodiment, described signal processing unit 200 specifically may include that
Resolution arranges module 201, be used for being set to the resolution of described product image to be detected with described standard picture point
The resolution that resolution is identical;
Pixel value vector extraction module 202, is used for extracting the first pixel value vector of the product image to be detected after arranging resolution;
Similarity acquisition module 203, is used for entering the second pixel value vector of vectorial for described first pixel value and described standard picture
Row contrast, obtains the similarity of the first pixel value vector and the second pixel value vector.
In another preferred embodiment of the application, described pixel value vector extraction module 202 specifically includes:
Rgb value extraction module 2021, is used for extracting the RGB of each pixel in the product image to be detected after arranging resolution
Value;
Pixel value vector first constitutes module 2022, is used for sorting the rgb value extracted according to preset order, sets described in composition
Put the first pixel value vector of the product image to be detected after resolution.
In another preferred embodiment of the application, by the rule preset, rgb value can be converted into gray value, thus reduce
Follow-up contrast complexity.Specifically, in another preferred embodiment of the application, described pixel value vector extraction module 202
Specifically include:
Gray value extraction module 2023, is used for extracting the gray scale of each pixel in the product image to be detected after arranging resolution
Value;
Pixel value vector second constitutes module 2024, is used for sorting the gray value extracted according to preset order, constitutes described setting
First pixel value vector of the product image to be detected after resolution.
In another embodiment of the application, described similarity acquisition module 203 specifically may include that
Pixel value determination module 2031, is used for contrasting described first pixel value vector and correspondence position in the second pixel value vector one by one
The pixel value at place, when the difference of two pixel values is not higher than predetermined threshold value, it is determined that two pixel values are identical;
Pixel value logging modle 2032, is used for recording the first pixel value vector identical with pixel value in the second pixel value vector individual
Number;
Rate of specific gravity computing module 2033, is used for calculating the identical number of described pixel value and accounts for the rate of specific gravity of all pixel value numbers.
Wherein, described rate of specific gravity i.e. can represent the similarity of the first pixel value vector and the second pixel value vector.
A kind of vision-sensing method of the embodiment of the present application offer and vision sensor, by compact camera taken at regular intervals product to be detected
The image of product, and the image of this collection is contrasted with being stored in standard picture therein, thus whether judge product to be detected
For required product.A kind of vision-sensing method of the embodiment of the present application offer and vision sensor are in actual applications, it is not necessary to raw
Become and trigger signal, and design the easiest, facilitate common technical staff to use.
In the nineties in 20th century, can clearly distinguish for the improvement of a technology is that the improvement on hardware is (such as, to two
The improvement of the circuit structures such as pole pipe, transistor, switch) or software on improvement (for the improvement of method flow).But,
Along with the development of technology, the improvement of current a lot of method flows can be considered as directly improving of hardware circuit.Design
Personnel nearly all obtain corresponding hardware circuit by being programmed in hardware circuit by the method flow of improvement.Therefore, no
Can say that the improvement of a method flow cannot realize by hardware entities module.Such as, PLD
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, device programming is determined by its logic function by user.By designer
Member's programming voluntarily comes a digital display circuit " integrated " on a piece of PLD, without chip maker please designing and make
Make special IC chip 2.And, nowadays, replacing and manually make IC chip, this programming changes the most mostly
Realize with " logic compiler (logic compiler) " software, software compiler phase used when it is write with program development
Similar, and the most handy specific programming language of source code before compiling is write, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL the most not only has one, but have many kinds, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、
Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware
Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description
Language) etc., that commonly use most is VHDL (Very-High-Speed Integrated Circuit Hardware
Description Language) and Verilog2.Those skilled in the art also it should also be apparent that, it is only necessary to by method flow with above-mentioned
Several hardware description languages are slightly made programming in logic and are programmed in integrated circuit, it is possible to be readily available and realize this logical method stream
The hardware circuit of journey.
Controller can be implemented in any suitable manner, such as, controller can take such as microprocessor or processor and
Storage can by this (micro-) processor perform computer readable program code (such as software or firmware) computer-readable medium,
Gate, switch, special IC (Application Specific Integrated Circuit, ASIC), FPGA
Controller and the form of embedding microcontroller, the example of controller includes but not limited to following microcontroller: ARC 625D, Atmel
AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, Memory Controller can also quilt
It is embodied as a part for the control logic of memorizer.
It is also known in the art that in addition to realizing controller in pure computer readable program code mode, the most permissible
Make controller with gate, switch, special IC, FPGA control by method step carries out programming in logic
The form of device processed and embedding microcontroller etc. realizes identical function.The most this controller is considered a kind of Hardware Subdivision
Part, and the structure in hardware component can also be considered as to include in it for the device realizing various function.Or even, may be used
To be considered as the device being used for realizing various function being not only the software module of implementation method but also can be the knot in hardware component
Structure.
System, device, module or the unit that above-described embodiment illustrates, specifically can be realized by computer chip or entity, or
Realized by the product with certain function.
For convenience of description, it is divided into various unit to be respectively described with function when describing apparatus above.Certainly, the application is being implemented
Time the function of each unit can be realized in same or multiple softwares and/or hardware.
As seen through the above description of the embodiments, those skilled in the art it can be understood that to the application can be by soft
Part adds the mode of required general hardware platform and realizes.Based on such understanding, the technical scheme of the application is the most in other words
The part contributing prior art can embody with the form of software product, and this computer software product can be stored in
In storage medium, such as ROM/RAM, magnetic disc, CD etc., use so that a computer equipment is (permissible including some instructions
It is personal computer, server, or the network equipment etc.) perform each embodiment of the application or some part institute of embodiment
The method stated.
Each embodiment in this specification all uses the mode gone forward one by one to describe, and between each embodiment, identical similar part is mutual
Seeing, what each embodiment stressed is the difference with other embodiments.Especially for system embodiment
Speech, owing to it is substantially similar to embodiment of the method, so describe is fairly simple, relevant part sees the part of embodiment of the method
Illustrate.
The application can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer, server
Computer, handheld device or portable set, laptop device, multicomputer system, system based on microprocessor, top set
Box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer, include any of the above system or equipment
Distributed computing environment etc..
The application can be described in the general context of computer executable instructions, such as program module.
Usually, program module include perform particular task or realize the routine of particular abstract data type, program, object, assembly,
Data structure etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environment, by passing through
Communication network and connected remote processing devices performs task.In a distributed computing environment, program module may be located at bag
Include storage device in interior local and remote computer-readable storage medium.
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application have many deformation and a change and
Without departing from spirit herein, it is desirable to appended claim includes that these deformation and change are without deviating from spirit herein.
Claims (10)
1. a vision-sensing method, it is characterised in that described method includes:
The image of product to be detected is gathered according to predetermined period;
The image of described product to be detected is contrasted with the standard picture prestored, obtains image and the institute of described product to be detected
State the similarity of standard picture;
When described similarity reaches preset first threshold value, export induced signal.
2. a kind of vision-sensing method as claimed in claim 1, it is characterised in that the described figure by described product to be detected
As contrasting with the standard picture prestored, the similarity of the image and described standard picture that obtain described product to be detected is specifically wrapped
Include:
The resolution of described product image to be detected is set to the resolution identical with the resolution of described standard picture;
Extract the first pixel value vector of the product image to be detected after resolution is set;
Second pixel value vector of vectorial for described first pixel value and described standard picture is contrasted, obtain the first pixel value to
The similarity that amount is vectorial with the second pixel value.
3. vision-sensing method as claimed in claim 2 a kind of, it is characterised in that described extraction resolution is set after treat
First pixel value vector of detection product image specifically includes:
Extraction arranges the rgb value of each pixel in the product image to be detected after resolution;
The rgb value extracted is sorted according to preset order, constitutes and described first of product image to be detected after resolution is set
Pixel value vector.
4. vision-sensing method as claimed in claim 2 a kind of, it is characterised in that described extraction resolution is set after treat
First pixel value vector of detection product image specifically includes:
Extraction arranges the gray value of each pixel in the product image to be detected after resolution;
The gray value extracted is sorted according to preset order, constitutes described the first picture that product image to be detected after resolution is set
Element value vector.
5. a kind of vision-sensing method as claimed in claim 2, it is characterised in that described by described first pixel value vector
Contrast with the second pixel value vector of described standard picture, obtain the first pixel value vector similar to the second pixel value vector
Degree specifically includes:
Contrast described first pixel value vector and the pixel value of corresponding position in the second pixel value vector one by one, when two pixel values
Difference when being not higher than predetermined threshold value, it is determined that two pixel values are identical;
Record the number that the first pixel value vector is identical with pixel value in the second pixel value vector;
Calculate the identical number of described pixel value and account for the rate of specific gravity of all pixel value numbers.
6. a kind of vision-sensing method as claimed in claim 1, it is characterised in that treat according to predetermined period collection described
Before the image of detection product, described method also includes:
Adjust the shooting brightness of the middle-size and small-size camera of vision sensor.
7. a vision sensor, including compact camera, signal processing unit and signal output unit, it is characterised in that
Described compact camera is used for gathering the image of product to be detected according to predetermined period;
Described signal processing unit is used for contrasting the image of described product to be detected with the standard picture prestored, and obtains described
The image of product to be detected and the similarity of described standard picture;
Described signal output unit is used for when described similarity reaches preset first threshold value, exports induced signal.
8. a kind of vision sensor as claimed in claim 7, it is characterised in that described signal processing unit specifically includes:
Resolution arranges module, is used for being set to and the resolution of described standard picture the resolution of described product image to be detected
Identical resolution;
Pixel value vector extraction module, is used for extracting the first pixel value vector of the product image to be detected after arranging resolution;
Similarity acquisition module, right for the second pixel value vector of vectorial for described first pixel value and described standard picture is carried out
Ratio, obtains the similarity of the first pixel value vector and the second pixel value vector.
9. a kind of vision sensor as claimed in claim 8, it is characterised in that described pixel value vector extraction module is concrete
Including:
Rgb value extraction module, is used for extracting the rgb value of each pixel in the product image to be detected after arranging resolution;
Pixel value vector first constitutes module, is used for sorting the rgb value extracted according to preset order, constitutes described setting and divide
First pixel value vector of the product image to be detected after resolution.
10. a kind of vision sensor as claimed in claim 8, it is characterised in that described pixel value vector extraction module is concrete
Including:
Gray value extraction module, is used for extracting the gray value of each pixel in the product image to be detected after arranging resolution;
Pixel value vector second constitutes module, and the gray value being used for extracting sorts according to preset order, constitutes and described arranges resolution
First pixel value vector of the product image to be detected after rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510313260.9A CN106296641A (en) | 2015-06-10 | 2015-06-10 | A kind of vision-sensing method and vision sensor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510313260.9A CN106296641A (en) | 2015-06-10 | 2015-06-10 | A kind of vision-sensing method and vision sensor |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106296641A true CN106296641A (en) | 2017-01-04 |
Family
ID=57659830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510313260.9A Pending CN106296641A (en) | 2015-06-10 | 2015-06-10 | A kind of vision-sensing method and vision sensor |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106296641A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113080190A (en) * | 2021-05-17 | 2021-07-09 | 河北联兴佳垚农业科技有限公司 | Chicory root low-temperature storage system based on temperature self-regulation |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101556250A (en) * | 2008-04-11 | 2009-10-14 | 郭上鲲 | System and method thereof for checking product quality |
CN101666616A (en) * | 2008-09-01 | 2010-03-10 | 比亚迪股份有限公司 | Appearance detecting method |
CN102005054A (en) * | 2010-11-24 | 2011-04-06 | 中国电子科技集团公司第二十八研究所 | Real-time infrared image target tracking method |
CN102305793A (en) * | 2011-05-11 | 2012-01-04 | 苏州天准精密技术有限公司 | Method and equipment for detecting appearance quality of product |
CN103090804A (en) * | 2013-01-15 | 2013-05-08 | 中国计量学院 | Automatic detection system and detection method of finished product magnet ring image |
CN103150558A (en) * | 2013-02-26 | 2013-06-12 | 北京航空航天大学 | Machine vision-based display terminal operation response matching detection method |
WO2015099249A1 (en) * | 2013-12-27 | 2015-07-02 | 삼성전자 주식회사 | Apparatus and method for determining lesion similarity of medical image |
-
2015
- 2015-06-10 CN CN201510313260.9A patent/CN106296641A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101556250A (en) * | 2008-04-11 | 2009-10-14 | 郭上鲲 | System and method thereof for checking product quality |
CN101666616A (en) * | 2008-09-01 | 2010-03-10 | 比亚迪股份有限公司 | Appearance detecting method |
CN102005054A (en) * | 2010-11-24 | 2011-04-06 | 中国电子科技集团公司第二十八研究所 | Real-time infrared image target tracking method |
CN102305793A (en) * | 2011-05-11 | 2012-01-04 | 苏州天准精密技术有限公司 | Method and equipment for detecting appearance quality of product |
CN103090804A (en) * | 2013-01-15 | 2013-05-08 | 中国计量学院 | Automatic detection system and detection method of finished product magnet ring image |
CN103150558A (en) * | 2013-02-26 | 2013-06-12 | 北京航空航天大学 | Machine vision-based display terminal operation response matching detection method |
WO2015099249A1 (en) * | 2013-12-27 | 2015-07-02 | 삼성전자 주식회사 | Apparatus and method for determining lesion similarity of medical image |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113080190A (en) * | 2021-05-17 | 2021-07-09 | 河北联兴佳垚农业科技有限公司 | Chicory root low-temperature storage system based on temperature self-regulation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2538584B1 (en) | Information Transmission System, and Information Transmission Method | |
CN101477631B (en) | Method, equipment for extracting target from image and human-machine interaction system | |
US6774909B1 (en) | Method and apparatus for transforming color image into monochromatic image | |
CN105701476A (en) | Machine vision-based automatic identification system and method for production line products | |
JP5294096B2 (en) | Information transmission system, light receiving device, information transmission method, and program | |
CN110458826B (en) | Ambient brightness detection method and device | |
CN109461186A (en) | Image processing method, device, computer readable storage medium and electronic equipment | |
JP5713061B2 (en) | Information transmitting apparatus, information transmitting method, and program | |
CN101937505B (en) | Target detection method and equipment and used image acquisition device thereof | |
JP2019054449A (en) | Image processing method, image processing system, and image processing program | |
CN106954022A (en) | Image processing method, device and terminal | |
CN106296641A (en) | A kind of vision-sensing method and vision sensor | |
US8526717B2 (en) | Rich color transition curve tracking method | |
CN112270303A (en) | Image recognition method and device and electronic equipment | |
Kanade et al. | Development of machine vision based system for classification of Guava fruits on the basis of CIE1931 chromaticity coordinates | |
CN201440274U (en) | Target detection equipment and image acquisition device used by same | |
CN101118183A (en) | Colors automatic recognizing system | |
CN116523853A (en) | Chip detection system and method based on deep learning | |
Xing et al. | Smoke image segmentation based on color model | |
CN109040598A (en) | Image processing method, device, computer readable storage medium and electronic equipment | |
CN108985308A (en) | The system and method for electric energy meter presentation quality is quickly analyzed based on data mining algorithm | |
CN113269195A (en) | Reading table image character recognition method and device and readable storage medium | |
Haska et al. | Image signal processing, analysis and detection for robotic system | |
Taherian et al. | Design and implementation of digital image processing techniques in pulse-domain | |
KR20120124782A (en) | Apparatus and method for processing digital image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170104 |