CN106355592A - Educational toy suite and its circuit elements and electric wires identifying method thereof - Google Patents

Educational toy suite and its circuit elements and electric wires identifying method thereof Download PDF

Info

Publication number
CN106355592A
CN106355592A CN201610698013.XA CN201610698013A CN106355592A CN 106355592 A CN106355592 A CN 106355592A CN 201610698013 A CN201610698013 A CN 201610698013A CN 106355592 A CN106355592 A CN 106355592A
Authority
CN
China
Prior art keywords
circuit components
electric wire
color
image
priori
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.)
Granted
Application number
CN201610698013.XA
Other languages
Chinese (zh)
Other versions
CN106355592B (en
Inventor
范旭
程潇
杜鹏
暴满粟
孙贤军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai brocade Technology Group Co.,Ltd.
Original Assignee
Shanghai Putao Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Putao Technology Co Ltd filed Critical Shanghai Putao Technology Co Ltd
Priority to CN201610698013.XA priority Critical patent/CN106355592B/en
Priority to PCT/CN2016/105741 priority patent/WO2018032631A1/en
Publication of CN106355592A publication Critical patent/CN106355592A/en
Application granted granted Critical
Publication of CN106355592B publication Critical patent/CN106355592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the field of computer vision detection treatment technology, provides a kind of educational toy suite and its circuit elements and electric wires identifying method thereof. The toy suite comprises a base plate, circuit components and wires, wherein the base plant is placed on the plane, circuit components and wires are placed on the bottom plate. The method is characterized by comprising the steps of placing the circuit components and the electric wire on the game base plate, installing the game program inside the tablet computer, collecting the images of the circuit components and the electric wire placed on the bottom plate through a camera of the tablet computer; further identifying the circuit components and wires based on the predefined color, the outline information and the color coding information. The children connect the circuit components with the wires and determine whether the connection of the circuit is correct, thus enhancing their imagination, increasing the fun of games, letting the children learn the basic circuit knowledge and cultivating their interest.

Description

A kind of Educational toy external member and its recognition methodss of component and electric wire
Technical field
The present invention relates to Computer Vision Detection processing technology field, particularly to a kind of Educational toy external member and its circuit Element and the recognition methodss of electric wire.
Background technology
Now many interesting children education game application or children's game are had on panel computer, but often simply allow little Friend points at picture, interactive shortcoming on screen, look at screen for a long time and easily eyes is damaged, and lacks physics The education of knowledge, thinking of logic culture shortcoming;And when some interactive strong traditional game toys have had been detached from instantly The development in generation, the demand in form cannot meet child's study, playing, also it is not easy to the interactive communication of child and the head of a family.
In order to solve the above problems, computer vision and technical field of image processing successfully develop a kind of Educational toy External member, comprising: support, helmet detector and base plate, installs games, by the photographic head of panel computer in panel computer Collection is positioned over the image of the base plate in plane.Although above-mentioned Educational toy external member solves the interaction of game in panel computer Property shortcoming problem, but form is still single, simply simple interaction, physical knowledge embedded be not it is impossible to child From little culture electricity knowledge, also cannot accomplish from little culture child to the understanding of electricity and interest.
Therefore, Computer Vision Detection processing technology field is badly in need of a kind of Educational toy external member and its component and electric wire Recognition methodss, be by circuit components and electric wire be positioned over game base plate on, in panel computer install games, pass through The photographic head collection of panel computer is positioned over circuit components and electric wire image on base plate, then is based on predefined color, wheel Wide information, color-coded information, identification circuit element and electric wire, circuit components are connected by child with electric wire, judge to connect Whether good circuit is correct, strengthens the imaginative power of child, and increase game is interesting, makes child may learn tandem circuit and knows Know, the interest of culture child.
Content of the invention
The present invention is in order to solve the above problems, there is provided the identification of a kind of Educational toy external member and its component and electric wire Method, technical scheme is as follows:
A kind of Educational toy external member, comprising: base plate, circuit components and electric wire base plate are positioned in plane, circuit elements device Part and electric wire are positioned on base plate.
Preferably, in a kind of above-mentioned Educational toy external member, base plate is the rectangle with fillet, at 4 angles of rectangle On be provided with collimation angle.
Preferably, in a kind of above-mentioned Educational toy external member, collimation angle is red circular arc line.
In a kind of Educational toy external member, the recognition methodss of component and electric wire, comprise the steps:
Step one, installs games in panel computer, then base plate is positioned in plane it is ensured that the one side of collimation angle Upward
Step 2, completes the connection of circuit components and electric wire on base plate, real by the post-positioned pick-up head of panel computer When gather coloured image, mobile panel computer is it is ensured that at least contain 3 collimation angle in the coloured image of post-positioned pick-up head collection;
Step 3, extracts effective identification region from the coloured image of step 2;
Step 4, the circuit components that detection is located in the effective identification region of coloured image;
Step 5, the electric wire that detection is located in the effective identification region of coloured image;
Step 6, judges whether circuit components are accurate with the connection of electric wire.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, in step 2 The coloured image of post-positioned pick-up head collection is ixy, ixy=f (x, y)=(rxy, gxy, bxy), wherein, (x, y) represents coloured image The position coordinateses of pixel, f (x, y) represents pixel value at pixel coordinate position for the image, rxyRepresent that image slices vegetarian refreshments exists The color-values of red channel, gxyRepresent the color-values in green channel for the image slices vegetarian refreshments, bxyRepresent image slices vegetarian refreshments blue logical The color-values in road.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, in step 3 Concretely comprising the following steps of effective identification region is extracted from coloured image:
A) according to priori, the coloured image of step 2 is partitioned into 4 pieces of calibration angular zones, according in hsv space Priori threshold value, 4 pieces of collimation angle area images are carried out binary conversion treatment, obtain 4 pieces of collimation angle binary map;
B) the 4 pieces of collimation angle binary map obtaining in scanning step a), obtain corresponding edge contour figure, further according to edge wheel Wide eccentricity and the priori of size, filter out irrational profile;
C) the remaining edge contour being obtained according to step b), calculates the boundary rectangle of 4 collimation angle, in identification process In, when having qualified collimation angle at least three footmarks, effective cog region that its boundary rectangle as calculates Domain.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, in step 4 The tool step of the circuit components that detection is located in color image recognition region is:
1, because the color of each circuit components shell is different, therefore passes through color distortion, be partitioned into each circuit elements Device, and extract the Internal periphery of each circuit components shell;
2, according to the Internal periphery of the circuit components shell extracting in step 1, calculate the position of each circuit components Put and deflection angle;
3, the deflection angle rotation circuit components and parts calculating according to step 2, then partitioning circuitry components and parts, compiled by color Code identifies the classification of circuit components.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, carry in step 1 Take the concretely comprising the following steps of Internal periphery of each circuit components shell:
A) because the color of circuit components is unfavorable for separated in rgb color space, illumination variation is also compared Sensitivity, so, by the region of interest extracting area image by rgb color space conversion to the hsv face laying particular emphasis on color representation The colour space, concrete conversion formula is:
V=max { c (r '), c (g '), c (b ') };
Wherein, h represents tone value, and s represents intensity value, and v represents brightness value, and max { c (r '), c (g '), c (b ') } represents In original image, pixel is in the pixel maximum of three passages of red, green, blue, min { c (r '), c (g '), c (b ') } table Show in original image the pixel minimum in three passages of red, green, blue for the pixel, and the span of h is located at 0- Between 360;
B) in hsv color space, color according to involved by the circuit components priori threshold value in hsv space, Coloured image is carried out binary conversion treatment, concrete formula is as follows:
In binary picture, (x, y) &b_s (during x, y) &b_v (x, y), as generates binary system figure to b (x, y)=b_h Picture;
Wherein, b (x, y) represents the binary pixel values of image slices vegetarian refreshments (x, y), and h (x, y), s (x, y), v (x, y) are respectively Represent tone value in hsv color space for image slices vegetarian refreshments (x, y), intensity value, brightness value;B_h (x, y), b_s (x, y), B_v (x, y) represents image slices vegetarian refreshments (x, y) respectively whether respectively in specified h, s, v region, if it is, value is 1, Otherwise, value is 0;hmin、hmaxRepresent that the priori of color tone in hsv color space of certain components and parts shell is minimum respectively And maximum;smin、smaxRepresent respectively color saturation in hsv color space of certain components and parts shell priori minimum and Maximum;vmin、vmaxRepresent the priori minimum and maximum of color brightness in hsv color space of certain components and parts shell respectively Value.
C) scan binary image, find out all edge contours;
Binary image can be regarded as the gray level image of only two values, and the edge of image refers to gray scale in gray level image Change more violent part, the intensity of variation of gray value using neighbor between graded carry out quantificational expression, gradient is The two dimensional equivalent formula of single order two dimension derivative, concrete calculating process is:
First, calculate the difference of neighbor, concrete formula is:
gx=f [i, j+1]-f [i, j]
gy=f [i, j]-f [i+1, j]
Wherein, gxRepresent neighbor difference in the x direction, gyRepresent neighbor difference in y-direction, f [i, j + 1] represent the pixel value that image arranges in the i-th row jth+1, f [i, j] represents the pixel value that image arranges in the i-th row jth;F [i+1, j] Represent the pixel value that image arranges in i+1 row jth;
Further, calculate the gradient between neighbor, concrete formula is:
Wherein, g (x, y) represents the Grad on (x, y) point of image,Represent pixel value derivation in the x direction,Represent pixel value derivation in y-direction;
Further, calculate the gradient magnitude of marginal point, the gradient magnitude set of all marginal points is the edge extracting Profile;
Further, calculating nonstatic electric fan and the method for remaining circuit components and parts ear is according to circuit components ear The priori of piece contour shape, size and eccentricity, filters irrational profile, thus obtaining 2 ears of circuit components Piece position;
Because the ear of static electric fan is possible to be covered some or all of by flabellum it is therefore desirable to carry out face to step b) Color is split, and is partitioned into blue binary map and green binary map;
Further, blue binary map is scanned, is known by the priori of the contour shape of flabellum, eccentricity, size Knowing, determining whether there is the presence of flabellum, if it has, then judging this circuit components as fan;Otherwise, leap to step 2;
Further, after judging this circuit components as fan, the computational methods for the ear of static fan are as follows: right Step 1 Green binary map carries out clustering processing, green point close together is polymerized to a class, by of a sort point set number Amount, the size of point set minimum outsourcing rectangle, eccentricity, the priori of point set position, filter to the point set being polymerized to a class, If being only left two class point sets after filtering then it is assumed that the position of current flabellum has covered the ear of electric components with having greater probability Piece, then the central point position of circuit components ear is calculated by the center position of two class point sets and the profile information of components and parts Put.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, step 2 calculates The concretely comprising the following steps of the position of each circuit components and deflection angle:
According to ear location, the center position of the circuit components calculating, existed with the ear ensureing circuit components Horizontal direction is standard, calculates the anglec of rotation of circuit components.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, know in step 3 Do not go out concretely comprising the following steps of circuit components classification:
Firstly, it is necessary to be that all circuit components arrange a kind of coding rule in advance, each circuit components is made to have only One coding;Because circuit components quantity to be identified is limited, therefore chooses red, yellow, blue, the green four kinds colors easily distinguished and make For coding characteristic color;During the printing without permission of circuit components is concentrated mainly on, in, lower in three places, when these three places A certain colored pixels exceed colored pixels threshold value then it is assumed that this color is the color in this region;
According to circuit components color of shell, upper in, neutralization lower in print color without permission, red be designated as 1, Huang is designated as 2, Lan Ji For 3, green be designated as 4, be no designated as 0, ignore current color and be also denoted as 0,11 circuit components can be encoded, according to circuit Components and parts encode, you can unique type determining current detection circuit components;
Filter out the circuit components not meeting coding, by remaining circuit components type, circuit components central point, The anglec of rotation passes to upper layer software (applications) together;
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, colored pixels Threshold value is 30% of each palace lattice area in nine grids.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, in step 5 Detection is located at the concretely comprising the following steps of electric wire in the effective identification region of coloured image:
Step 1), it is partitioned into electric wire, extracts skeleton by color distortion;
Step 2), by the skeleton extracting, calculate end points and the bifurcation point of electric wire.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, step 1) in It is partitioned into electric wire, extracts concretely comprising the following steps of skeleton by color distortion:
First, in effective identification region hsv space of step 3, color according to the electric wire priori in hsv space Threshold value, image binaryzation is processed, and obtains electric wire binary image;
Further, electric wire binary image is scanned, by the priori filter of the shape of electric wire profile, size Except the profile not meeting electric wire feature, remaining profile is filled with, obtains the binary picture of a new live wire;
Further, skeleton refinement is carried out to the binary picture of above-mentioned live wire, obtain the skeleton of electric wire.
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, step 2) in By the skeleton extracting, calculate the end points of electric wire and concretely comprising the following steps of bifurcation point: by step 1) in the electric wire bone that obtains Bone, and the end points of electric wire, the priori of bifurcation point feature, find the end points in electric wire skeleton and bifurcation point, if there are point Trouble point, by electric wire skeleton from bifurcation point separately, is divided into multiple line segments, without bifurcation point, origin wire skeleton is exactly a line Section, all of line segment and line segment end points type in skeleton is supplied to upper layer software (applications).
Preferably, in the recognition methodss of component and electric wire in a kind of above-mentioned Educational toy external member, in step 6 Judge whether circuit components and the connection of electric wire accurately concretely comprise the following steps: the circuit that step 4 is identified by upper layer software (applications) The electric wire that components and parts and step 5 identify links together, and the circuit diagram then realizing storage with upper layer software (applications) is compared, If consistent with circuit diagram then it is assumed that circuit connects accurately.
Beneficial effects of the present invention:
1st, the present invention is cleverly by Appliance computer vision pattern recognition technique and hsv color space, binary conversion treatment, figure As cutting technique combines use, can interpolate that out type and the electric wire of circuit components, and can interpolate that out circuit even Whether accurately to connect, there is fast operation, accurate positioning, hardware is united well with software engineering, game interaction sets Meter is ingenious;Attractive in appearance simple, judge more quick, strengthen the imaginative power of child, increase game is interesting, so that child is may learn Tandem circuit knowledge, the interest of culture child.
2nd, detection algorithm of the present invention more science, maturation, by the color conversion of image, image convolution, image cutting, skeleton Refinement scheduling algorithm combines use, can quickly judge type and the electric wire of circuit components.
3rd, calculating speed of the present invention is fast;Every time detection and localization takes in 200ms, provides smooth use body for player Test.
4th, stable performance of the present invention, is installed on the situation in Educational toy external member in different illumination, to different panel computers Under, carry out collecting test for 3,000 width pictures, false recognition rate and loss are below 0.2%.
Brief description
To describe the present invention with reference to the accompanying drawings and detailed description in detail:
Fig. 1 is a kind of structural representation of present invention Educational toy external member.
Fig. 2 is the flow chart of the recognition methodss of component and electric wire in a kind of present invention Educational toy external member.
Fig. 3 is the form of the physical circuit components and parts coding of step 3 in step 4 in a kind of present invention Educational toy external member Figure.
Wherein, the corresponding relation between the reference in Fig. 1-3 and component names is:
Base plate 1, circuit components 2, electric wire 3.
Specific embodiment
In order that measure, creation characteristic, reached purpose and effect that the technology of the present invention is realized are easy to understand, below will In conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described it is clear that Described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the enforcement in the present invention Example, the every other embodiment that those of ordinary skill in the art are obtained under the premise of not making creative work, broadly fall into The scope of protection of the invention.
Fig. 1 is a kind of structural representation of present invention Educational toy external member.
As shown in figure 1, the recognition methodss of a kind of toy external member and its component and electric wire, base plate 1, circuit components 2 With electric wire 3, base plate 1 is positioned in plane, and circuit components 2 and electric wire 3 are positioned on base plate 3.
In the present embodiment, base plate is the rectangle with fillet, is provided with collimation angle on 4 angles of rectangle;Preferably, school Quasi- angle is red circular arc line.
Fig. 2 is the flow chart of the recognition methodss of component and electric wire in a kind of present invention Educational toy external member.
As shown in Fig. 2 in a kind of Educational toy external member component and electric wire recognition methodss, comprise the steps:
Step one, installs games in panel computer, then base plate is positioned in plane it is ensured that the one side of collimation angle Upward;
Step 2, completes the connection of circuit components and electric wire on base plate, real by the post-positioned pick-up head of panel computer When gather coloured image, mobile panel computer it is ensured that at least containing 3 collimation angle in the coloured image of post-positioned pick-up head collection, Concretely comprise the following steps:
The coloured image of post-positioned pick-up head collection is ixy, ixy=f (x, y)=(rxy,gxy,bxy), wherein, (x, y) represents The position coordinateses of color image pixel point, f (x, y) represents pixel value at pixel coordinate position for the image, rxyRepresent image Pixel is in the color-values of red channel, gxyRepresent the color-values in green channel for the image slices vegetarian refreshments, bxyRepresent image slices vegetarian refreshments Color-values in blue channel;
Step 3, extracts effective identification region from the coloured image of step 2, concretely comprises the following steps:
A) according to priori, the coloured image of step 2 is partitioned into 4 pieces of calibration angular zones, according in hsv space Priori threshold value, 4 pieces of collimation angle area images are carried out binary conversion treatment, obtain 4 pieces of collimation angle binary map;
B) the 4 pieces of collimation angle binary map obtaining in scanning step a), obtain corresponding edge contour figure, further according to edge wheel Wide eccentricity and the priori of size, filter out irrational profile;
C) the remaining edge contour being obtained according to step b), calculates the boundary rectangle of 4 collimation angle, in identification process In, when having qualified collimation angle at least three footmarks, effective cog region that its boundary rectangle as calculates Domain;
Step 4, the circuit components that detection is located in the effective identification region of coloured image, concretely comprise the following steps:
1, because the color of each circuit components shell is different, therefore passes through color distortion, be partitioned into each circuit elements Device, and extract the Internal periphery of each circuit components shell, concretely comprise the following steps:
A) because the color of circuit components is unfavorable for separated in rgb color space, illumination variation is also compared Sensitivity, so, by the region of interest extracting area image by rgb color space conversion to the hsv face laying particular emphasis on color representation The colour space, concrete conversion formula is:
V=max { c (r '), c (g '), c (b ') };
Wherein, h represents tone value, and s represents intensity value, and v represents brightness value, and max { c (r '), c (g '), c (b ') } represents In original image, pixel is in the pixel maximum of three passages of red, green, blue, min { c (r '), c (g '), c (b ') } table Show in original image the pixel minimum in three passages of red, green, blue for the pixel, and the span of h is located at 0- Between 360;
B) in hsv color space, color according to involved by the shell of the circuit components priori in hsv space Threshold value, coloured image is carried out binary conversion treatment, and concrete formula is as follows:
In binary picture, (x, y) &b_s (during x, y) &b_v (x, y), as generates binary system figure to b (x, y)=b_h Picture;
Wherein, b (x, y) represents the binary pixel values of image slices vegetarian refreshments (x, y), and h (x, y), s (x, y), v (x, y) are respectively Represent tone value in hsv color space for image slices vegetarian refreshments (x, y), intensity value, brightness value;B_h (x, y), b_s (x, y), B_v (x, y) represents image slices vegetarian refreshments (x, y) respectively whether respectively in specified h, s, v region, if it is, value is 1, Otherwise, value is 0;hmin、hmaxRepresent that the priori of color tone in hsv color space of certain components and parts shell is minimum respectively And maximum;smin、smaxRepresent respectively color saturation in hsv color space of certain components and parts shell priori minimum and Maximum;vmin、vmaxRepresent the priori minimum and maximum of color brightness in hsv color space of certain components and parts shell respectively Value;
C) scan binary image, find out all edge contours;
Binary image can be regarded as only two worth gray level images, and the edge of image refers to gray scale in gray level image Change more violent part, the intensity of variation of gray value using neighbor between graded carry out quantificational expression, gradient is The two dimensional equivalent formula of single order two dimension derivative, concrete calculating process is:
First, calculate the difference of neighbor, concrete formula is:
gx=f [i, j+1]-f [i, j]
gy=f [i, j]-f [i+1, j]
Wherein, gxRepresent neighbor difference in the x direction, gyRepresent neighbor difference in y-direction, f [i, j + 1] represent the pixel value that image arranges in the i-th row jth+1, f [i, j] represents the pixel value that image arranges in the i-th row jth;F [i+1, j] Represent the pixel value that image arranges in i+1 row jth,
Further, calculate the gradient between neighbor, concrete formula is:
Wherein, g (x, y) represents the Grad on (x, y) point of image,Represent pixel value derivation in the x direction,Represent pixel value derivation in y-direction;
Further, calculate the gradient magnitude of marginal point, the gradient magnitude set of all marginal points is the edge extracting Profile;
Further, calculating nonstatic electric fan and the method for remaining circuit components and parts ear is according to circuit components ear The priori of piece contour shape, size and eccentricity, filters irrational profile, thus obtaining 2 ears of circuit components Piece position;
Because the ear of static electric fan is possible to be covered some or all of by flabellum it is therefore desirable to carry out face to step b) Color is split, and is partitioned into blue binary map and green binary map;
Further, blue binary map is scanned, is known by the priori of the contour shape of flabellum, eccentricity, size Knowing, determining whether there is the presence of flabellum, if it has, then judging this circuit components as fan;Otherwise, leap to step 2;
Further, after judging this circuit components as fan, the computational methods for the ear of static fan are as follows: right Step 1 Green binary map carries out clustering processing, green point close together is polymerized to a class, by of a sort point set number Amount, the size of point set minimum outsourcing rectangle, eccentricity, the priori of point set position, filter to the point set being polymerized to a class, If being only left two class point sets after filtering then it is assumed that the position of current flabellum has covered the ear of electric components with having greater probability Piece, then the central point position of circuit components ear is calculated by the center position of two class point sets and the profile information of components and parts Put;
2, according to the profile of the circuit components extracting in step 1, calculate the position and partially of each circuit components Gyration, concretely comprises the following steps:
According to ear location, the center position of the circuit components calculating, existed with the ear ensureing circuit components Horizontal direction is standard, calculates the anglec of rotation of circuit components.According to the ear location of the circuit components calculating, Center position, with ensure circuit components ear in the horizontal direction as standard, calculate the anglec of rotation of circuit components Degree;
3, the deflection angle rotation circuit components and parts calculating according to step 2, then partitioning circuitry components and parts, compiled by color Code identifies the classification of circuit components, concretely comprises the following steps:
Firstly, it is necessary to be that all circuit components arrange a kind of coding rule in advance, each circuit components is made to have only One coding;Because circuit components quantity to be identified is limited, therefore chooses red, yellow, blue, the green four kinds colors easily distinguished and make For coding characteristic color;During the printing without permission of circuit components is concentrated mainly on, in, lower in three places, when these three places A certain color pixel values exceed priori threshold value then it is assumed that this color is the color in this region;
According to circuit components color of shell, upper in, neutralization lower in print color without permission, red be designated as 1, Huang is designated as 2, Lan Ji For 3, green be designated as 4, be no designated as 0, ignore current color and be also denoted as 0,11 circuit components can be encoded, according to circuit Components and parts encode, you can unique type determining current detection circuit components;
Filter out the circuit components not meeting coding, by remaining circuit components type, circuit components central point, The anglec of rotation passes to upper layer software (applications) together, and physical circuit components and parts coding is as shown in Figure 3;
Step 5, the electric wire that detection is located in the effective identification region of coloured image, concretely comprise the following steps:
Step 1), it is partitioned into electric wire, extracts skeleton by color distortion, concretely comprise the following steps:
First, in effective identification region hsv space of step 3, color according to the electric wire priori in hsv space Threshold value, image binaryzation is processed, and obtains electric wire binary image;
Further, electric wire binary image is scanned, by the priori filter of the shape of electric wire profile, size Except the profile not meeting electric wire feature, remaining profile is filled with, obtains the binary picture of a new live wire;
Further, skeleton refinement is carried out to the binary picture of above-mentioned live wire, obtain the skeleton of electric wire;
Step 2), by the skeleton extracting, calculate end points and the bifurcation point of electric wire, concretely comprise the following steps: by step 1) In the electric wire skeleton that obtains, and the end points of electric wire, the priori of bifurcation point feature, find end points in electric wire skeleton and point Trouble point, if there are bifurcation point, by electric wire skeleton from bifurcation point separately, is divided into multiple line segments, without bifurcation point, origin wire bone Bone is exactly a line segment, and all of line segment and line segment end points type in skeleton is supplied to upper layer software (applications);
Step 6, judges that whether circuit components are accurate with the connection of electric wire, concretely comprise the following steps:
The step 4 circuit components identifying and the electric wire that step 5 identifies are linked together by upper layer software (applications), then The circuit diagram realizing storage with upper layer software (applications) is compared, if consistent with circuit diagram then it is assumed that circuit connect accurate.
In the present embodiment, colored pixels threshold value is 30% of each palace lattice area in nine grids.
The present invention is cleverly by Appliance computer vision pattern recognition technique and hsv color space, binary conversion treatment, image Cutting technique combines use, can interpolate that out type and the electric wire of circuit components, and can interpolate that out that circuit connects Whether accurately, there is fast operation, accurate positioning, hardware is united well with software engineering, game interaction designs Ingenious;Attractive in appearance simple, judge more quick, strengthen the imaginative power of child, increase game is interesting, makes child may learn base Plinth electric circuit knowledge, the interest of culture child.
Detection algorithm of the present invention more science, maturation, will be thin to the color conversion of image, image convolution, image cutting, skeleton Change scheduling algorithm to combine use, can quickly judge type and the electric wire of circuit components.
Calculating speed of the present invention is fast;Every time detection and localization takes in 200ms, provides smooth use body for player Test.
Stable performance of the present invention, in the case of different illumination, different panel computers being installed in Educational toy external member, Carry out collecting test for 3,000 width pictures, false recognition rate and loss are below 0.2%.
Ultimate principle, principal character and the advantages of the present invention of the present invention have been shown and described above.The technology of the industry , it should be appreciated that the present invention is not restricted to the described embodiments, the simply explanation described in above-described embodiment and description is originally for personnel Invention principle, without departing from the spirit and scope of the present invention the present invention also have various changes and modifications, these change Change and improvement both falls within scope of the claimed invention.Claimed scope by appending claims and its Equivalent defines.

Claims (10)

1. a kind of Educational toy external member is it is characterised in that include: base plate, circuit components and electric wire, described base plate is positioned over flat On face, described circuit components and electric wire are positioned on base plate.
2. a kind of Educational toy external member according to claim 1 is it is characterised in that described base plate is the square with fillet Shape, is provided with collimation angle on 4 angles of described rectangle;Described collimation angle is red circular arc line.
3. in a kind of Educational toy external member the recognition methodss of component and electric wire it is characterised in that comprising the steps:
Step one, installs games in panel computer, then base plate is positioned in plane it is ensured that the one of collimation angle faces On;
Step 2, completes the connection of circuit components and electric wire on base plate, is adopted in real time by the post-positioned pick-up head of panel computer Collection coloured image, mobile panel computer is it is ensured that at least contain 3 collimation angle, specifically in the coloured image of post-positioned pick-up head collection Step is:
The coloured image of post-positioned pick-up head collection is ixy, ixy=f (x, y)=(rxy, gxy, bxy), wherein, (x, y) represents cromogram As the position coordinateses of pixel, f (x, y) represents pixel value at pixel coordinate position for the image, rxyRepresent image slices vegetarian refreshments In the color-values of red channel, gxyRepresent the color-values in green channel for the image slices vegetarian refreshments, bxyRepresent image slices vegetarian refreshments in blueness The color-values of passage.
Step 3, extracts effective identification region from the coloured image of described step 2;
Step 4, the circuit components that detection is located in the effective identification region of coloured image;
Step 5, the electric wire that detection is located in the effective identification region of coloured image;
Step 6, judges whether circuit components are accurate with the connection of electric wire.
4. in a kind of Educational toy external member according to claim 3 component and electric wire recognition methodss, its feature exists In extracting concretely comprising the following steps of effective identification region in described step 3 from coloured image:
A) according to priori, the coloured image of step 2 is partitioned into 4 pieces of calibration angular zones, according to the elder generation in hsv space Test threshold value, 4 pieces of collimation angle area images are carried out binary conversion treatment, obtain 4 pieces of collimation angle binary map;
B) the 4 pieces of collimation angle binary map obtaining in scanning step a), obtain corresponding edge contour figure, further according to edge contour Eccentricity and the priori of size, filter out irrational profile;
C) the remaining edge contour being obtained according to step b), calculates the boundary rectangle of 4 collimation angle, in identification process, when When having qualified collimation angle at least three footmarks, effective identification region that its boundary rectangle as calculates.
5. in a kind of Educational toy external member according to claim 3 component and electric wire recognition methodss, its feature exists In in described step 4, the tool step of the circuit components that detection is located in color image recognition region is:
1, because the color of each components and parts shell is different, therefore passes through color distortion, be partitioned into each circuit components, and carry Take the Internal periphery of each circuit components shell;
2, according to the Internal periphery of the circuit components shell extracting in step 1, calculate each circuit components position and Deflection angle;
3, the deflection angle rotation circuit components and parts calculating according to step 2, then partitioning circuitry components and parts, known by color coding Do not go out the classification of circuit components.
6. in a kind of Educational toy external member according to claim 5 component and electric wire recognition methodss, its feature exists In extracting concretely comprising the following steps of each circuit components profile in described step 1:
A) because circuit components color be unfavorable in rgb color space separated, also more sensitive to illumination variation, So, the region of interest extracting area image is empty to the hsv color laying particular emphasis on color representation by rgb color space conversion Between, concrete conversion formula is:
V=max { c (r '), c (g '), c (b ') };
Wherein, h represents tone value, and s represents intensity value, and v represents brightness value, and max { c (r '), c (g '), c (b ') } represents former In beginning image, in the pixel maximum of three passages of red, green, blue, min { c (r '), c (g '), c (b ') } represents and exists for pixel In original image, pixel is in the pixel minimum of three passages of red, green, blue, and the span of h be located at 0-360 it Between;
B) in hsv color space, color according to involved by the shell of the circuit components priori threshold in hsv space Value, coloured image is carried out binary conversion treatment, concrete formula is as follows:
In binary picture, (x, y) &b_s (during x, y) &b_v (x, y), as generates binary picture to b (x, y)=b_h;
Wherein, b (x, y) represents the binary pixel values of image slices vegetarian refreshments (x, y), and h (x, y), s (x, y), v (x, y) represent respectively Tone value in hsv color space for image slices vegetarian refreshments (x, y), intensity value, brightness value;B_h (x, y), b_s (x, y), b_v (x, y) represents image slices vegetarian refreshments (x, y) respectively whether respectively in specified h, s, v region, if it is, value is 1, no Then, value is 0;hmin、hmaxRepresent respectively color tone in hsv color space of certain components and parts shell priori minimum and Maximum;smin、smaxRepresent that the priori of color saturation in hsv color space of certain components and parts shell is minimum and the most respectively Big value;vmin、vmaxRepresent the priori minimum and maximum of color brightness in hsv color space of certain components and parts shell respectively Value;
C) scan binary image, find out all edge contours;
Binary image can be regarded as the gray level image of only two values, and the edge of image refers to grey scale change in gray level image Relatively more violent part, the intensity of variation of gray value using neighbor between graded carry out quantificational expression, gradient is single order The two dimensional equivalent formula of two-dimentional derivative, concrete calculating process is:
First, calculate the difference of neighbor, concrete formula is:
gx=f [i, j+1]-f [i, j]
gy=f [i, j]-f [i+1, j]
Wherein, gxRepresent neighbor difference in the x direction, gyRepresent neighbor difference in y-direction, f [i, j+1] Represent the pixel value that image arranges in the i-th row jth+1, f [i, j] represents the pixel value that image arranges in the i-th row jth;F [i+1, j] table The pixel value that diagram picture arranges in i+1 row jth,
Further, calculate the gradient between neighbor, concrete formula is:
Wherein, g (x, y) represents the Grad on (x, y) point of image,Represent pixel value derivation in the x direction,Table Show pixel value derivation in y-direction;
Further, calculate the gradient magnitude of marginal point, the gradient magnitude set of all marginal points is the edge contour extracting;
Further, calculating nonstatic electric fan and the method for remaining circuit components and parts ear is according to circuit components ear wheel The priori of profile shape, size and eccentricity, filters irrational profile, thus obtain 2 ears of circuit components Position;
Some or all of divide it is therefore desirable to color is carried out to step b) because the ear of static electric fan is possible to be covered by flabellum Cut, be partitioned into blue binary map and green binary map;
Further, blue binary map is scanned, by the contour shape of flabellum, eccentricity, size priori, sentence The fixed presence whether having flabellum, if it has, then judge this circuit components as fan;Otherwise, leap to step 2;
Further, after judging this circuit components as fan, the computational methods for the ear of static fan are as follows: to step 1 Green binary map carries out clustering processing, green point close together is polymerized to a class, by of a sort point set quantity, point The size of the minimum outsourcing rectangle of collection, eccentricity, the priori of point set position, filter to the point set being polymerized to a class, if Only it is left two class point sets then it is assumed that the position of current flabellum has covered the ear of electric components with having greater probability after filtration, The center position of circuit components ear is then calculated by the center position of two class point sets and the profile information of components and parts.
7. in a kind of Educational toy external member according to claim 6 component and electric wire recognition methodss, its feature exists Calculate the position of each circuit components and concretely comprising the following steps of deflection angle in, described step 2:
According to ear location, the center position of the circuit components calculating, to ensure the ear of circuit components in level Direction is standard, calculates the anglec of rotation of circuit components.
8. in a kind of Educational toy external member according to claim 5 component and electric wire recognition methodss, its feature exists In identifying concretely comprising the following steps of circuit components classification in described step 3:
Firstly, it is necessary to be that all circuit components arrange a kind of coding rule in advance, each circuit components is made to have uniquely Coding;Because circuit components quantity to be identified is limited, therefore choose red, yellow, blue, the green four kinds colors easily distinguished as volume Code feature;During the printing without permission of circuit components is concentrated mainly on, in, lower in three places, a certain when these three places The pixel value of color exceedes priori threshold value then it is assumed that this color is the color in this region.
According to circuit components color of shell, upper in, neutralization lower in print color without permission, red be designated as 1, Huang is designated as 2, and indigo plant is designated as 3, Green be designated as 4, be no designated as 0, ignore current color and be also denoted as 0,11 circuit components can be encoded, according to circuit elements device Part encodes, you can unique type determining current detection circuit components;
Filter out the circuit components not meeting coding, by remaining circuit components type, circuit components central point, rotation Angle passes to upper layer software (applications) together.
9. in a kind of Educational toy external member according to claim 4 component and electric wire recognition methodss, its feature exists In detection in described step 5 is located at the concretely comprising the following steps of electric wire in the effective identification region of coloured image:
Step 1), it is partitioned into electric wire, extracts skeleton by color distortion, concretely comprise the following steps:
First, in effective identification region hsv space of described step 3, color according to the electric wire priori in hsv space Threshold value, image binaryzation is processed, and obtains electric wire binary image;
Further, electric wire binary image is scanned, is filtered not by the priori of the shape of electric wire profile, size Meet the profile of electric wire feature, remaining profile is filled with, obtain the binary picture of a new live wire;
Further, skeleton refinement is carried out to the binary picture of above-mentioned live wire, obtain the skeleton of electric wire.
Step 2), by the skeleton extracting, calculate end points and the bifurcation point of electric wire, concretely comprise the following steps:
By step 1) in the electric wire skeleton that obtains, and the end points of electric wire, the priori of bifurcation point feature, find electric wire bone End points in bone and bifurcation point, if there are bifurcation point, by electric wire skeleton from bifurcation point separately, are divided into multiple line segments, without Bifurcation point, origin wire skeleton is exactly a line segment, and all of line segment and line segment end points are supplied in the type in skeleton Layer software.
10. according to Claim 8, in a kind of Educational toy external member described in 9 component and electric wire recognition methodss, its feature It is, in described step 6, judges whether circuit components and the connection of electric wire accurately concretely comprise the following steps: upper layer software (applications) will The electric wire that the circuit components that step 4 identifies and step 5 identify links together, and then realizes storage with upper layer software (applications) Circuit diagram be compared, if consistent with circuit diagram then it is assumed that circuit connects accurately.
CN201610698013.XA 2016-08-19 2016-08-19 Educational toy set, circuit element thereof and wire identification method Active CN106355592B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610698013.XA CN106355592B (en) 2016-08-19 2016-08-19 Educational toy set, circuit element thereof and wire identification method
PCT/CN2016/105741 WO2018032631A1 (en) 2016-08-19 2016-11-14 Teaching toy kit and circuit element and electric wire identification method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610698013.XA CN106355592B (en) 2016-08-19 2016-08-19 Educational toy set, circuit element thereof and wire identification method

Publications (2)

Publication Number Publication Date
CN106355592A true CN106355592A (en) 2017-01-25
CN106355592B CN106355592B (en) 2020-06-16

Family

ID=57845107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610698013.XA Active CN106355592B (en) 2016-08-19 2016-08-19 Educational toy set, circuit element thereof and wire identification method

Country Status (2)

Country Link
CN (1) CN106355592B (en)
WO (1) WO2018032631A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951836A (en) * 2017-03-05 2017-07-14 北京工业大学 Crop cover degree extracting method based on priori threshold optimization convolutional neural networks
CN107526888A (en) * 2017-08-22 2017-12-29 珠海泓芯科技有限公司 The generation method and generating means of circuit topological structure
CN107590838A (en) * 2017-08-18 2018-01-16 陕西维视数字图像技术有限公司 A kind of metal surface colour vision detecting system
CN108271765A (en) * 2018-01-05 2018-07-13 湘潭大学 A kind of multi-functional pawl head monitoring environment robot and its plants identification method
CN114882520A (en) * 2022-07-08 2022-08-09 成都西交智汇大数据科技有限公司 Method, system and equipment for detecting circuit diagram and readable storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263608B (en) * 2019-01-25 2023-07-07 天津职业技术师范大学(中国职业培训指导教师进修中心) Automatic electronic component identification method based on image feature space variable threshold measurement
CN114973223B (en) * 2022-03-03 2024-11-05 上海精密计量测试研究所 Component number identification and mixed batch detection system based on image identification
CN114677586B (en) * 2022-03-15 2024-04-05 南京邮电大学 Automatic identification method for physical circuit experiment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2428833Y (en) * 2000-06-12 2001-05-02 南京玻璃纤维研究设计院 Display-screen picture calibration clamp
CN102049137A (en) * 2009-11-09 2011-05-11 季春香 Combined-block type electronic element
JP5045422B2 (en) * 2007-01-29 2012-10-10 富士ゼロックス株式会社 Photomino piece image generation method, photomino image generation method, photomino piece rendering program, photomino puzzle piece rendering program
CN204655822U (en) * 2015-02-27 2015-09-23 苏州雷泰医疗科技有限公司 A kind of compound quality assurance die body
CN105513086A (en) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 Educational toy suite and magic cube detecting and positioning method thereof on basis of shape matching
CN105498200A (en) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 Educational toy set and tangram color recognition method thereof
CN105719307A (en) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 Educational toy set and method for detecting placing shape and position of tangram
CN105852968A (en) * 2016-04-06 2016-08-17 黄斌 Trajectory tracking device for liver and gallbladder surgery

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8340420B2 (en) * 2009-10-05 2012-12-25 National Taiwan University Method for recognizing objects in images
CN104680519B (en) * 2015-02-06 2017-06-23 四川长虹电器股份有限公司 Seven-piece puzzle recognition methods based on profile and color
CN105194884A (en) * 2015-10-27 2015-12-30 上海葡萄纬度科技有限公司 Educational toy suite
CN205164140U (en) * 2015-10-27 2016-04-20 上海葡萄纬度科技有限公司 Education toy external member
CN105719318B (en) * 2016-01-26 2018-07-10 上海葡萄纬度科技有限公司 Magic square color identification method based on HSV in a kind of Educational toy external member

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2428833Y (en) * 2000-06-12 2001-05-02 南京玻璃纤维研究设计院 Display-screen picture calibration clamp
JP5045422B2 (en) * 2007-01-29 2012-10-10 富士ゼロックス株式会社 Photomino piece image generation method, photomino image generation method, photomino piece rendering program, photomino puzzle piece rendering program
CN102049137A (en) * 2009-11-09 2011-05-11 季春香 Combined-block type electronic element
CN204655822U (en) * 2015-02-27 2015-09-23 苏州雷泰医疗科技有限公司 A kind of compound quality assurance die body
CN105513086A (en) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 Educational toy suite and magic cube detecting and positioning method thereof on basis of shape matching
CN105498200A (en) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 Educational toy set and tangram color recognition method thereof
CN105719307A (en) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 Educational toy set and method for detecting placing shape and position of tangram
CN105852968A (en) * 2016-04-06 2016-08-17 黄斌 Trajectory tracking device for liver and gallbladder surgery

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI SIQIANG 等: "Image Segmentation Based on the Mean-Shift in the HSV Space", 《2007 CHINESE CONTROL CONFERENCE》 *
刘纯: "基于行为方式的交互式儿童玩具设计研究", 《万方学位论文》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951836A (en) * 2017-03-05 2017-07-14 北京工业大学 Crop cover degree extracting method based on priori threshold optimization convolutional neural networks
CN106951836B (en) * 2017-03-05 2019-12-13 北京工业大学 crop coverage extraction method based on prior threshold optimization convolutional neural network
CN107590838A (en) * 2017-08-18 2018-01-16 陕西维视数字图像技术有限公司 A kind of metal surface colour vision detecting system
CN107526888A (en) * 2017-08-22 2017-12-29 珠海泓芯科技有限公司 The generation method and generating means of circuit topological structure
CN107526888B (en) * 2017-08-22 2024-02-20 珠海泓芯科技有限公司 Method and device for generating circuit topology structure
CN108271765A (en) * 2018-01-05 2018-07-13 湘潭大学 A kind of multi-functional pawl head monitoring environment robot and its plants identification method
CN114882520A (en) * 2022-07-08 2022-08-09 成都西交智汇大数据科技有限公司 Method, system and equipment for detecting circuit diagram and readable storage medium

Also Published As

Publication number Publication date
WO2018032631A1 (en) 2018-02-22
CN106355592B (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN106355592A (en) Educational toy suite and its circuit elements and electric wires identifying method thereof
CN105719318B (en) Magic square color identification method based on HSV in a kind of Educational toy external member
CN104134234B (en) A kind of full automatic three-dimensional scene construction method based on single image
CN101673412B (en) Light template matching method of structured light three-dimensional vision system
CN106297492B (en) A kind of Educational toy external member and the method using color and outline identification programming module
CN105498253B (en) A kind of Educational toy external member and its positioning hole detection localization method
CN103914699A (en) Automatic lip gloss image enhancement method based on color space
CN106295460A (en) The detection method of people and equipment
CN108388905B (en) A kind of Illuminant estimation method based on convolutional neural networks and neighbourhood context
CN105513086B (en) A kind of Educational toy external member and its localization method is detected based on the matched magic square of shape
CN108257139A (en) RGB-D three-dimension object detection methods based on deep learning
CN106097833B (en) A kind of Educational toy external member and its digit recognition method
CN108256467B (en) Traffic sign detection method based on visual attention mechanism and geometric features
CN108592823A (en) A kind of coding/decoding method based on binocular vision color fringe coding
CN103035013A (en) Accurate moving shadow detection method based on multi-feature fusion
CN102881160B (en) Outdoor traffic sign identification method under low-illumination scene
CN109583345A (en) Roads recognition method, device, computer installation and computer readable storage medium
CN105498200A (en) Educational toy set and tangram color recognition method thereof
CN110379004A (en) The method that a kind of pair of oblique photograph achievement carries out terrain classification and singulation is extracted
CN104866859A (en) High-robustness visual graphical sign and identification method thereof
CN107506738A (en) Feature extracting method, image-recognizing method, device and electronic equipment
CN109191562A (en) Three-dimensional rebuilding method based on colored false random coding structure light
CN107154058A (en) A kind of method for guiding user to reduce magic square
CN106267843A (en) A kind of Educational toy external member and ocean mould recognition methods thereof
CN106407973A (en) Robust recognition method for AR code marked on cylinder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 3001, building 22, No. 500 Jiajian Road, Jiading District, Shanghai

Patentee after: Shanghai brocade Technology Group Co.,Ltd.

Address before: 201822 room 3001, building 22, No. 500 Jiajian highway, Jiading District, Shanghai

Patentee before: SHANGHAI PUTAO TECHNOLOGY Co.,Ltd.

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An educational toy kit and its identification method for circuit components and wires

Effective date of registration: 20230725

Granted publication date: 20200616

Pledgee: China Minsheng Banking Corp Shanghai branch

Pledgor: Shanghai brocade Technology Group Co.,Ltd.

Registration number: Y2023310000394