WO2018032626A1 - 一种教育玩具套件及其数字识别方法 - Google Patents

一种教育玩具套件及其数字识别方法 Download PDF

Info

Publication number
WO2018032626A1
WO2018032626A1 PCT/CN2016/105733 CN2016105733W WO2018032626A1 WO 2018032626 A1 WO2018032626 A1 WO 2018032626A1 CN 2016105733 W CN2016105733 W CN 2016105733W WO 2018032626 A1 WO2018032626 A1 WO 2018032626A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
groove
digital
color
bottom pad
Prior art date
Application number
PCT/CN2016/105733
Other languages
English (en)
French (fr)
Inventor
杜鹏
范旭
孙贤军
程潇
巢建树
暴满粟
Original Assignee
上海葡萄纬度科技有限公司
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 上海葡萄纬度科技有限公司 filed Critical 上海葡萄纬度科技有限公司
Publication of WO2018032626A1 publication Critical patent/WO2018032626A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B19/00Teaching not covered by other main groups of this subclass
    • G09B19/22Games, e.g. card games

Definitions

  • the invention relates to the technical field of computer vision detection and processing, in particular to an educational toy kit and a digital identification method thereof.
  • an educational toy kit has been successfully developed in the field of computer vision and image processing technology, including: a bracket, a helmet detector, a bottom pad, a game program installed in a tablet computer, and a plane is captured by a tablet computer. The image of the bottom pad.
  • the educational toy kit mentioned above solves the problem of lack of interaction of the game in the tablet computer, the placement position of the bottom pad may be deviated, resulting in the camera not being able to capture a complete image, the image is easy to collect errors, and the analysis result is inaccurate. Appearance.
  • the present invention provides an educational toy kit and a digital identification method thereof, and the technical solutions are as follows:
  • An educational toy kit comprising: a bracket, a helmet detector, a bottom pad, and the helmet detector is mounted on the bracket, the bottom pad has a first control groove and a second control groove, the first control groove and the first The second control groove is used to place the control button, and there are 9 digital grooves under the digital groove for placing 1-9 digital cards with multiple colors; the bottom of the bracket has a protrusion, and the top has a first groove and a Two grooves, the first groove is for placing a tablet computer, and the tablet computer collects bottom pad information; the helmet detector is installed in the second groove;
  • the helmet detector further includes a body, a third groove, two segments and a convex mirror, and the third groove is located in the body for holding different types of tablets, and holding the tablet screen in the third groove
  • the end of the convex mirror is provided with a convex mirror
  • the other end of the convex mirror is mounted on the edge of the helmet detector
  • the convex mirror is at an acute angle with the horizontal plane
  • the third groove holds the end of the tablet screen higher than the camera position of the tablet
  • the segments are located on the two edges of the convex mirror to hold the convex mirror and hold the tablet.
  • an educational toy kit has a control button color purple and a digital card color red, green and blue.
  • a digital identification method for an educational toy kit comprising the following steps:
  • Step 1 Install the game program on the tablet, and then place the bottom pad on the plane.
  • the bottom end of the tablet is installed in the first groove, and the helmet detector is installed on the top of the tablet through the second groove, and then Placing a digital card in a digital recess;
  • Step 2 After the fixed installation, the color image is collected in real time through the front camera of the tablet computer;
  • step three the number, color and position of the digital card in the image are detected.
  • step three are:
  • Step 1) for the color image I xy in the second step, detecting the position and angle of the bottom pad, and extracting the bottom pad area image from the color image I xy ;
  • Step 2) re-extracting the bottom pad image obtained in step 1), extracting the digital groove area for digital recognition, and extracting the control groove area for control groove state recognition.
  • the specific steps of extracting the bottom pad area image from the color image I xy in step 1) are:
  • step b) Converting the image of the underlying region of interest in step b) to a grayscale image:
  • Gray(x,y) 0.2989 ⁇ R xy +0.5870 ⁇ G xy +0.1140 ⁇ B xy
  • Gray(x, y) represents a grayscale image
  • the edge of the image refers to the part of the gray image where the gray level changes sharply.
  • the degree of change of the gray value is quantitatively represented by the gradient change between adjacent pixels.
  • the gradient is the two-dimensional equivalent of the first-order two-dimensional derivative.
  • G x represents the difference of adjacent pixels in the x direction
  • G y represents the difference of adjacent pixels in the y direction
  • f[i, j+1] represents the pixel value of the image in the i th row and j+1th column.
  • f[i,j] represents the pixel value of the image in the i-th row and the j-th column
  • f[i+1,j] represents the pixel value of the image in the i-th row and the j-th column
  • G(x, y) represents the gradient value of the image at the (x, y) point
  • the gradient magnitude of the edge point is calculated, and the gradient magnitude set of all the edge points is the extracted edge contour;
  • the edge detection algorithm is used to extract the edge amplitude set of the edge point, which is the edge contour of the bottom pad.
  • the edge extraction algorithm includes Sobel operator, Roberts operator, Prewitt operator and Canny operator. The specific formula is:
  • step d expanding the edge contour of the bottom pad obtained in step d), that is, extracting a rectangular large rectangular outline from the edge contour of the bottom pad;
  • step f) Calculating the positional area and the rotation angle of the bottom pad for the rectangular profile found in step e), and extracting the color pad area position from the positive view image of step a) according to the calculated positional area.
  • the digital groove area is extracted in step 2) for digital identification, and the specific steps of extracting the control groove area for controlling the groove state are:
  • Step g extracting characters in the control groove and the digital groove according to prior knowledge of the positions of the first control groove, the second control groove and the digital groove on the bottom pad;
  • Step h) judging whether the control button is placed in the control groove according to the number of purple pixels in the control groove, and determining the color of the character on the digital card according to the number of red, green and blue pixel values in the digital groove, if the number The red, green, and blue colors in the groove have the largest number of other color pixels, indicating that no digital card is placed in the digital groove;
  • Step i) converting the extracted characters into grayscale images, and then using the OTSU Otsu algorithm for threshold segmentation to obtain binarized images of characters;
  • Step j) extracting a significant outline of the character from the binarized image of step i);
  • Step k) filtering out the interference profile in the salient profile of step j) according to the area and center point information to obtain an effective contour of the character;
  • Step l calculating a minimum circumscribed quadrilateral of the effective contour according to the effective contour of the character in step k), and then extracting a corresponding binary image region from the binarized character image of the character of step i) according to the position of the quadrilateral;
  • Step m) dividing the binary image region obtained in step 1) into four squares, calculating a white pixel ratio in the binary image region, and concatenating into a one-row and four-column feature vector;
  • Step o) separately calculating the Pearson Correlation Coefficient of the feature vector in step m) and the standard printed body number 1-9 feature vector. If any Pearson correlation coefficient is greater than 0.85, the binary map region is considered to be the number.
  • the specific Pearson correlation coefficient is calculated as:
  • r represents the Pearson correlation coefficient
  • X variable represents the printed standard pixel ratio
  • Y variable represents the pixel ratio of the detected number
  • E represents the mathematical expected value
  • the game interaction design of the invention is ingenious; the appearance is simple, the judgment is faster, and the fun and the intuitiveness are enhanced at the same time.
  • the detection algorithm of the invention is more scientific and mature, and combines image transformation, perspective transformation, color conversion, Pearson correlation coefficient and other image algorithms to quickly determine the number placed.
  • the calculation speed of the invention is fast; each positioning detection takes about 90ms, providing a smooth experience for the player.
  • the performance of the invention is stable. When different tablet computers are installed in the educational toy kit, the collection and test are performed on 3,000 pictures, and the false recognition rate and the missed detection rate are below 0.2%.
  • Figure 1 is a schematic view showing the structure of an educational toy kit of the present invention.
  • FIG. 2 is a schematic view showing the structure of a helmet detector in an educational toy kit of the present invention.
  • FIG. 3 is a flow chart of a digital identification method of an educational toy kit of the present invention.
  • the second control groove 302 is a digital groove 303.
  • a digital identification method for an educational toy kit includes the following steps:
  • Step 1 Install the game program on the tablet, and then place the bottom pad on the plane.
  • the bottom end of the tablet is installed in the first groove, and the helmet detector is installed on the top of the tablet through the second groove, and then Placing a digital card in a digital recess;
  • Step 2 After the fixed installation, the color image is collected in real time through the front camera of the tablet computer;
  • step three the number, color and position of the digital card in the image are detected.
  • Step 1) for the color image I xy in the second step, detecting the position and angle of the bottom pad, and extracting the image of the bottom pad area from the color image I xy , the specific steps are as follows:
  • step b) Converting the image of the underlying region of interest in step b) to a grayscale image:
  • Gray(x,y) 0.2989 ⁇ R xy +0.5870 ⁇ G xy +0.1140 ⁇ B xy
  • Gray(x, y) represents a grayscale image
  • the edge of the image refers to the part of the gray image where the gray level changes sharply.
  • the degree of change of the gray value is quantitatively represented by the gradient change between adjacent pixels.
  • the gradient is the two-dimensional equivalent of the first-order two-dimensional derivative.
  • G x represents the difference of adjacent pixels in the x direction
  • G y represents the difference of adjacent pixels in the y direction
  • f[i, j+1] represents the pixel value of the image in the i th row and j+1th column.
  • f[i,j] represents the pixel value of the image in the i-th row and the j-th column
  • f[i+1,j] represents the pixel value of the image in the i-th row and the j-th column
  • G(x, y) represents the gradient value of the image at the (x, y) point
  • the gradient magnitude of the edge point is calculated, and the gradient magnitude set of all the edge points is the extracted edge contour;
  • the edge detection algorithm is used to extract the edge amplitude set of the edge point, which is the edge contour of the bottom pad.
  • the edge extraction algorithm includes Sobel operator, Roberts operator, Prewitt operator and Canny operator. The specific formula is:
  • step d expanding the edge contour of the bottom pad obtained in step d), that is, extracting a rectangular large rectangular outline from the edge contour of the bottom pad;
  • the card is placed incorrectly; if a large rectangular outline is detected, calculate whether the angle between the long side of the rectangular outline and the bottom edge of the image (wide axis) is within a predefined range (such as positive or negative) 10 degrees), also think that the card is placed incorrectly, feedback UI game interface to make corresponding reminders.
  • a predefined range such as positive or negative
  • Step 2) re-extracting the bottom pad image obtained in step 1), extracting the digital groove area for digital recognition, and extracting the control groove area for controlling the state of the groove.
  • Step g extracting characters in the control groove and the digital groove according to prior knowledge of the positions of the first control groove, the second control groove and the digital groove on the bottom pad;
  • Step h) judging whether the control button is placed in the control groove according to the number of purple pixels in the control groove, and determining the color of the character on the digital card according to the number of red, green and blue pixel values in the digital groove, if the number The red, green, and blue colors in the groove have the largest number of other color pixels, indicating that no digital card is placed in the digital groove;
  • Step i) converting the extracted characters into grayscale images, and then using the OTSU Otsu algorithm for threshold segmentation to obtain binarized images of characters;
  • Step j) extracting a significant outline of the character from the binarized image of step i);
  • Step k) filtering out the interference profile in the salient profile of step j) according to the area and center point information to obtain an effective contour of the character;
  • Step l calculating a minimum circumscribed quadrilateral of the effective contour according to the effective contour of the character in step k), and then extracting a corresponding binary image region from the binarized character image of the character of step i) according to the position of the quadrilateral;
  • Step m) dividing the binary image region obtained in step 1) into four squares, calculating a white pixel ratio in the binary image region, and concatenating into a one-row and four-column feature vector;
  • Step o) separately calculating the Pearson Correlation Coefficient of the feature vector in step m) and the standard printed body number 1-9 feature vector. If any Pearson correlation coefficient is greater than 0.85, the binary map region is considered to be the number.
  • the specific Pearson correlation coefficient is calculated as:
  • r represents the Pearson correlation coefficient
  • X variable represents the printed standard pixel ratio
  • Y variable represents the pixel ratio of the detected number
  • E represents the mathematical expected value
  • This table is a standard factor for 0 to 9 typographical fonts. It should be calculated in conjunction with the four-square grid coefficient of the current image we detected, and the Pearson correlation coefficient between them to determine whether their correlation is large enough.
  • the detected four pixel values Y are the upper left white pixel ratio 0.801, the upper right white pixel ratio 0.723, the lower left white pixel ratio 0.512, and the lower right white pixel ratio 0.540; the calculated P5 ⁇ 0.92 using the Pearson correlation coefficient is significantly larger than A Pearson correlation coefficient of 0.85, while the remaining numbers are less than 0.85, appears to be uncorrelated with the remaining numbers, so the number detected is considered to be 5.
  • Figure 1 is a schematic view showing the structure of an educational toy kit of the present invention.
  • FIG. 2 is a schematic view showing the structure of a helmet detector in an educational toy kit of the present invention.
  • a digital identification method for an educational toy kit includes a bracket 1, a helmet detector 2 and a bottom pad 3, and the helmet detector 2 is mounted on the bracket 1; the bottom pad 3 has a first upper portion The control groove 301 and the second control groove 302, the first control groove 301 and the second control groove 302 are used for placing control buttons, and there are 9 digital grooves 303 under the digital groove 303 for placing 1-9 digital card of color; bracket 1 with top a first groove 102 for placing a tablet computer, the tablet computer collecting bottom pad information; a helmet detector 2 mounted in the second groove 103; the helmet detector 2 further comprising The body 201, the third groove 202, the two segments 203 and the convex mirror 204, and the third groove 202 is located in the body 201 for clamping different types of tablet computers, and holding the tablet in the third groove 202 A convex mirror 204 is disposed at an end of the computer screen, and the other end of the convex mirror 204 is mounted on the edge of the helmet detector 2,
  • the color of the control button is purple
  • the color of the digital card is red, green, and blue.
  • FIG. 3 is a flow chart of a digital identification method of an educational toy kit of the present invention.
  • a digital identification method for an educational toy kit includes the following steps:
  • Step 1 Install the game program on the tablet, and then place the bottom pad on the plane.
  • the bottom end of the tablet is installed in the first groove, and the helmet detector is installed on the top of the tablet through the second groove, and then Placing a digital card in a digital recess;
  • Step 2 After the fixed installation, the color image is collected in real time through the front camera of the tablet computer;
  • step three the number, color and position of the digital card in the image are detected.
  • Step 1) for the color image I xy in the second step, detecting the position and angle of the bottom pad, and extracting the image of the bottom pad area from the color image I xy , the specific steps are as follows:
  • step b) Converting the image of the underlying region of interest in step b) to a grayscale image:
  • Gray(x,y) 0.2989 ⁇ R xy +0.5870 ⁇ G xy +0.1140 ⁇ B xy
  • Gray(x, y) represents a grayscale image
  • the edge of the image refers to the part of the gray image where the gray level changes sharply.
  • the degree of change of the gray value is quantitatively represented by the gradient change between adjacent pixels.
  • the gradient is the two-dimensional equivalent of the first-order two-dimensional derivative.
  • G x represents the difference of adjacent pixels in the x direction
  • G y represents the difference of adjacent pixels in the y direction
  • f[i, j+1] represents the pixel value of the image in the i th row and j+1th column.
  • f[i,j] represents the pixel value of the image in the i-th row and the j-th column
  • f[i+1,j] represents the pixel value of the image in the i-th row and the j-th column
  • G(x, y) represents the gradient value of the image at the (x, y) point
  • the gradient magnitude of the edge point is calculated, and the gradient magnitude set of all the edge points is the extracted edge contour;
  • the edge detection algorithm is used to extract the edge amplitude set of the edge point, which is the edge contour of the bottom pad.
  • the edge extraction algorithm includes Sobel operator, Roberts operator, Prewitt operator and Canny operator. The specific formula is:
  • step d expanding the edge contour of the bottom pad obtained in step d), that is, extracting a rectangular large rectangular outline from the edge contour of the bottom pad;
  • the card is placed incorrectly; if a large rectangular outline is detected, calculate whether the angle between the long side of the rectangular outline and the bottom edge of the image (wide axis) is within a predefined range (such as positive or negative) 10 degrees), also think that the card is placed incorrectly, feedback UI game interface to make corresponding reminders.
  • a predefined range such as positive or negative
  • Step 2) re-extracting the bottom pad image obtained in step 1), extracting the digital groove area for digital recognition, and extracting the control groove area for controlling the state of the groove.
  • Step g extracting characters in the control groove and the digital groove according to prior knowledge of the positions of the first control groove, the second control groove and the digital groove on the bottom pad;
  • Step h) judging whether the control button is placed in the control groove according to the number of purple pixels in the control groove, and determining the color of the character on the digital card according to the number of red, green and blue pixel values in the digital groove, if the number The red, green, and blue colors in the groove have the largest number of other color pixels, indicating that no digital card is placed in the digital groove;
  • Step i) converting the extracted characters into grayscale images, and then using the OTSU Otsu algorithm for threshold segmentation to obtain binarized images of characters;
  • Step j) extracting a significant outline of the character from the binarized image of step i);
  • Step k) filtering out the interference profile in the salient profile of step j) according to the area and center point information to obtain an effective contour of the character;
  • Step l calculating a minimum circumscribed quadrilateral of the effective contour according to the effective contour of the character in step k), and then extracting a corresponding binary image region from the binarized character image of the character of step i) according to the position of the quadrilateral;
  • Step m) dividing the binary image region obtained in step 1) into four squares, calculating a white pixel ratio in the binary image region, and concatenating into a one-row and four-column feature vector;
  • Step o) separately calculating the Pearson Correlation Coefficient of the feature vector in step m) and the standard printed body number 1-9 feature vector. If any Pearson correlation coefficient is greater than 0.85, the binary map region is considered to be the number.
  • the specific Pearson correlation coefficient is calculated as:
  • r represents the Pearson correlation coefficient
  • X variable represents the printed standard pixel ratio
  • Y variable represents the pixel ratio of the detected number
  • E represents the mathematical expected value
  • This table is a standard factor for 0 to 9 typographical fonts. It should be calculated in conjunction with the four-square grid coefficient of the current image we detected, and the Pearson correlation coefficient between them to determine whether their correlation is large enough.
  • the detected four pixel values Y are the upper left white pixel ratio 0.801, the upper right white pixel ratio 0.723, the lower left white pixel ratio 0.512, and the lower right white pixel ratio 0.540; the calculated P5 ⁇ 0.92 using the Pearson correlation coefficient is significantly larger than A Pearson correlation coefficient of 0.85, while the remaining numbers are less than 0.85, appears to be uncorrelated with the remaining numbers, so the number detected is considered to be 5.
  • the game interaction design of the invention is ingenious; the appearance is simple, the judgment is faster, and the fun and the intuitiveness are enhanced at the same time.
  • the detection algorithm of the invention is more scientific and mature, and combines image transformation, perspective transformation, color conversion, Pearson correlation coefficient and other image algorithms, and can quickly determine the number placed.
  • the calculation speed of the invention is fast; each positioning detection takes about 90ms, which provides a smooth experience for the player.
  • the performance of the invention is stable. When different tablet computers are installed in the educational toy kit, the collection and test are performed on 3,000 pictures, and the false recognition rate and the missed detection rate are below 0.2%.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Educational Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

一种教育玩具套件及数字识别方法,包括支架(1)、头盔探测器(2)和底垫(3),底垫(3)上方具有2个控制凹槽(301,302),用于放置控制按键,下方具有数字凹槽(303),用于放置多种颜色的1‑9数字卡片;头盔探测器(2)安装于支架(1)上;头盔探测器(2)还包括本体(201)、第三凹槽(202)、2个扇形块(203)和凸面镜(204),并且第三凹槽(202)位于本体(201)内,在第三凹槽(202)夹持平板电脑屏幕的端点处设置有凸面镜(204),凸面镜(204)的另一端安装于头盔探测器(2)边缘上,凸面镜(204)与水平面夹角成锐角, 2个扇形块(203)位于凸面镜(204)的2个边缘上。教育玩具套件和数字识别方法基于底垫轮廓信息,快速校正底垫位置,判定底垫下方的凹槽内放置的数字卡片摆放是否正确,增强趣味性、互动性,以及图像采集、分析结果的准确率。

Description

一种教育玩具套件及其数字识别方法 技术领域
本发明涉及计算机视觉检测处理技术领域,特别涉及一种教育玩具套件及其数字识别方法。
背景技术
现在平板电脑上有许多有趣的幼教游戏应用程序或者儿童游戏,但往往只是让小朋友在屏幕上指指画画,互动性欠缺,长时间看着屏幕容易对眼睛造成伤害;而当下一些互动性强的传统性游戏玩具已经脱离了时代的发展,形式上无法满足孩子学习、玩耍的需求,也不便于孩子和家长的互动沟通。
为了解决上述问题,计算机视觉与图像处理技术领域成功地开发了一种教育玩具套件,包括:支架、头盔探测器,底垫,在平板电脑内安装游戏程序,通过平板电脑的摄像头采集放置于平面上的底垫的图像。
技术问题
上述的教育玩具套件虽然解决了平板电脑中游戏的互动性欠缺的问题,但是底垫的摆放位置会出现偏差,导致摄像头不能采集到完整的图像,图像容易采集出错,分析结果不准确等问题的出现。
因此,计算机视觉与图像处理技术领域急需一种教育玩具套件及其数字的识别方法,能够基于底垫轮廓信息,快速校正底垫位置,利用相关性信息识别数字卡片的数字,颜色和位置信息,增强游戏的趣味性、以及互动性,提高图像采集以及分析结果的准确率。
技术解决方案
本发明为了解决上述问题,提供了一种教育玩具套件及其数字识别方法,技术方案如下:
一种教育玩具套件,包括:支架、头盔探测器,底垫,并且头盔探测器安装于支架上,底垫,上方具有第一控制凹槽和第二控制凹槽,第一控制凹槽和第二控制凹槽用于放置控制按键,下方具有9个数字凹槽,数字凹槽内用于放置具有多种颜色的1-9数字卡片;支架底部具有凸起,顶部具有第一凹槽和第二凹槽,第一凹槽用于放置平板电脑,平板电脑采集底垫信息;头盔探测器安装于第二凹槽内;
头盔探测器,还包括本体、第三凹槽、2个扇形块和凸面镜,并且第三凹槽位于本体内,用于夹持不同型号的平板电脑,在第三凹槽夹持平板电脑屏幕的端点处设置有凸面镜,凸面镜的另一端安装于头盔探测器边缘上,凸面镜与水平面夹角成锐角,第三凹槽夹持平板电脑屏幕的端点高于平板电脑的摄像头位置,2个扇形块位于凸面镜的2个边缘上,用于固定凸面镜和夹持平板电脑。
优选的,一种教育玩具套件,控制按键的颜色为紫色,数字卡片的颜色为红色、绿色和蓝色。
一种教育玩具套件的数字识别方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,再将底垫放置于平面上,平板电脑的底端安装于第一凹槽内,通过第二凹槽将头盔探测器安装于平板电脑的顶端,再将数字卡片放置于数字凹槽内;
步骤二,固定安装好后,通过平板电脑的前置摄像头实时采集彩色图像;
步骤三,检测图像中数字卡片的数字、颜色和位置。
优选的,在上述的一种教育玩具套件的数字识别方法中,步骤二中前置摄像头采集的彩色图像为Ixy,Ixy=f(x,y)=(Rxy,Gxy,Bxy),其中,(x,y)表示彩色图像像素点的位置坐标,f(x,y)表示图像在像素点坐标位置处的像素值,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值。
优选的,在上述的一种教育玩具套件的数字识别方法中,步骤三的具体步骤为:
步骤1),针对步骤二中的彩色图像Ixy,检测底垫的位置和角度,从彩色图像Ixy中提取底垫区域图像;
步骤2),对步骤1)中得到的底垫图像进行再次提取,提取出数字凹槽区域做数字识别,提取出控制凹槽区域做控制凹槽状态识别。
优选的,在上述的一种教育玩具套件的数字识别方法中,步骤1)中从彩色图像Ixy中提取底垫区域图像的具体步骤为:
a)采用透视变换原理,将彩色图像Ixy转换成由上而下俯视的正视角图像;
b)根据先验知识,在正视角图像中提取出底垫感兴趣区域图像,即数字卡片放置的有效识别区域;
c)将步骤b)中的底垫感兴趣区域图像转换为灰度图像:
Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
其中,Gray(x,y)表示灰度图像;
d)采用边缘检测算法检测图像中的强边缘;
图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
首先,计算相邻像素的差分,具体公式为:
Gx=f[i,j+1]-f[i,j]
Gy=f[i,j]-f[i+1,j]
其中,Gx表示相邻像素在x方向上的差分,Gy表示相邻像素在y方向上的差分,f[i,j+1]表示图像在第i行第j+1列的像素值,f[i,j]表示图像在第i行第j列的像素值;f[i+1,j]表示图像在第i+1行第j列的像素值,
进一步地,计算相邻像素间的梯度,具体公式为:
Figure PCTCN2016105733-appb-000001
其中,G(x,y)表示图像在(x,y)点上梯度值,
Figure PCTCN2016105733-appb-000002
表示像素值在x方向上求导,
Figure PCTCN2016105733-appb-000003
表示像素值在y方向上求导;
进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
由于待检测的底垫目标,在转换为灰度图后,底垫与平面背景存在色差,而不同颜色反差较大,因此可以将反差很大的底垫的轮廓视为当前图像的边缘,进而采用边缘检测算法提取出边缘点的梯度幅值集合,即为底垫的边缘轮廓;边缘提取算法包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
Figure PCTCN2016105733-appb-000004
其中,|G(x,y)|表示边缘点的梯度幅值;
e)对步骤d)中得出的底垫边缘轮廓进行膨胀处理,即从底垫边缘轮廓中提取出长方形的大块类矩形轮廓;
f)针对步骤e)中找到的矩形轮廓计算出底垫的位置区域和旋转角度,依据计算出的位置区域从步骤a)正视角图像中提取出彩色底垫区域位置。
优选的,在上述的一种教育玩具套件的数字识别方法中,步骤2)中提取出数字凹槽区域做数字识别,提取出控制凹槽区域做控制凹槽状态识别的具体步骤为:
步骤g)依据底垫上第一控制凹槽、第二控制凹槽和数字凹槽位置的先验知识提取出控制凹槽和数字凹槽内字符;
步骤h)根据控制凹槽内紫色像素的多少进行判断控制凹槽内是否放置了控制按键,根据数字凹槽里面红色、绿色、蓝色像素值的多少进行判断数字卡片上字符的颜色,如果数字凹槽里面的红、绿、蓝三种外的其它颜色像素值最多,则表明数字凹槽内没有放置任何数字卡片;
步骤i)将提取出来的字符转换成灰度图像,然后再采用OTSU大津算法进行阈值分割得到字符的二值化图像;
步骤j)从步骤i)的二值化图像中提取出字符的显著性轮廓;
步骤k)根据面积、中心点信息,过滤掉步骤j)的显著性轮廓中的干扰轮廓,得到字符的有效轮廓;
步骤l)根据步骤k)中字符的有效轮廓,计算有效轮廓的最小外接四边形,然后根据该四边形的位置从步骤i)字符的二值化字符图像内提取出相对应的二值图区域;
步骤m)将步骤l)中得到的二值图区域划分为四宫格,计算出该二值图区域内的白色像素比例,串联成一个1行4列的特征向量;
步骤o)分别计算步骤m)中特征向量与标准印刷体数字1-9特征向量的皮尔逊相关系数Pearson Correlation Coefficient,如果任一皮尔逊相关系数大于0.85,则认为二值图区域为该数字,具体的皮尔逊相关系数计算公式为:
Figure PCTCN2016105733-appb-000005
其中,r表示皮尔逊相关系数,X变量表示印刷体标准像素比例,Y变量表示检测到的数字的像素比例,E表示数学期望值。
有益效果
1、本发明游戏交互设计巧妙;美观简单,判断更加快速,同时增强了趣味性和直观性。
2、本发明检测算法更加科学、成熟,将图像的透视变换、透视变换、色彩转换、皮尔逊相关系数等图像算法相结合使用,能够快速的判断出摆放的数字。
3、本发明计算速度快;每次定位检测耗时在90ms左右,为玩家提供流畅的使用体验。
4、本发明性能稳定,在对不同平板电脑安装于教育玩具套件内的情况下,针对3千幅图片进行了采集测试,误识别率和漏检率在0.2%以下。
附图说明
下面结合附图和具体实施方式来详细说明本发明:
图1是本发明一种教育玩具套件的结构示意图。
图2是本发明一种教育玩具套件中头盔探测器的结构示意图。
图3是本发明一种教育玩具套件的数字识别方法的流程图。
其中,图1-3中的附图标记与部件名称之间的对应关系为:
支架1,第一凹槽102,第二凹槽103,头盔探测器2,本体201,第三凹槽202,2个扇形块203,反光镜204,底垫3,第一控制凹槽301,第二控制凹槽302,数字凹槽303。
本发明的最佳实施方式
如图3所示,一种教育玩具套件的数字识别方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,再将底垫放置于平面上,平板电脑的底端安装于第一凹槽内,通过第二凹槽将头盔探测器安装于平板电脑的顶端,再将数字卡片放置于数字凹槽内;
步骤二,固定安装好后,通过平板电脑的前置摄像头实时采集彩色图像;
前置摄像头采集的彩色图像为Ixy,Ixy=f(x,y)=(Rxy,Gxy,Bxy),其中,(x,y)表示彩色图像像素点的位置坐标,f(x,y)表示图像在像素点坐标位置处的像素值,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值;
步骤三,检测图像中数字卡片的数字、颜色和位置。
步骤1),针对步骤二中的彩色图像Ixy,检测底垫的位置和角度,从彩色图像Ixy中提取底垫区域图像,具体步骤为:
a)采用透视变换原理,将彩色图像Ixy转换成由上而下俯视的正视角图像;
b)根据先验知识,在正视角图像中提取出底垫感兴趣区域图像,即数字卡片放置的有效识别区域;
c)将步骤b)中的底垫感兴趣区域图像转换为灰度图像:
Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
其中,Gray(x,y)表示灰度图像;
d)采用边缘检测算法检测图像中的强边缘;
图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
首先,计算相邻像素的差分,具体公式为:
Gx=f[i,j+1]-f[i,j]
Gy=f[i,j]-f[i+1,j]
其中,Gx表示相邻像素在x方向上的差分,Gy表示相邻像素在y方向上的差分,f[i,j+1]表示图像在第i行第j+1列的像素值,f[i,j]表示图像在第i行第j列的像素值;f[i+1,j]表示图像在第i+1行第j列的像素值,
进一步地,计算相邻像素间的梯度,具体公式为:
Figure PCTCN2016105733-appb-000006
其中,G(x,y)表示图像在(x,y)点上梯度值,
Figure PCTCN2016105733-appb-000007
表示像素值在x方向上求导,
Figure PCTCN2016105733-appb-000008
表示像素值在y方向上求导;
进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
由于待检测的底垫目标,在转换为灰度图后,底垫与平面背景存在色差,而不同颜色反差较大,因此可以将反差很大的底垫的轮廓视为当前图像的边缘,进而采用边缘检测算法提取出边缘点的梯度幅值集合,即为底垫的边缘轮廓;边缘提取算法包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
Figure PCTCN2016105733-appb-000009
其中,|G(x,y)|表示边缘点的梯度幅值;
e)对步骤d)中得出的底垫边缘轮廓进行膨胀处理,即从底垫边缘轮廓中提取出长方形的大块类矩形轮廓;
如果没有检测出来矩形长方形,则卡片摆放不正确;如果检测出了大块矩形轮廓,则计算矩形轮廓长边与图像底边(宽轴)的角度是不是在预定义范围内(比如正负10度),也认为卡片摆放不正确,反馈UI游戏界面来进行相应提醒。
f)针对步骤e)中找到的矩形轮廓计算出底垫的位置区域和旋转角度,依据计算出的位置区域从步骤a)正视角图像中提取出彩色底垫区域位置;
步骤2),对步骤1)中得到的底垫图像进行再次提取,提取出数字凹槽区域做数字识别,提取出控制凹槽区域做控制凹槽状态识别,具体步骤为:
步骤g)依据底垫上第一控制凹槽、第二控制凹槽和数字凹槽位置的先验知识提取出控制凹槽和数字凹槽内字符;
步骤h)根据控制凹槽内紫色像素的多少进行判断控制凹槽内是否放置了控制按键,根据数字凹槽里面红色、绿色、蓝色像素值的多少进行判断数字卡片上字符的颜色,如果数字凹槽里面的红、绿、蓝三种外的其它颜色像素值最多,则表明数字凹槽内没有放置任何数字卡片;
步骤i)将提取出来的字符转换成灰度图像,然后再采用OTSU大津算法进行阈值分割得到字符的二值化图像;
步骤j)从步骤i)的二值化图像中提取出字符的显著性轮廓;
步骤k)根据面积、中心点信息,过滤掉步骤j)的显著性轮廓中的干扰轮廓,得到字符的有效轮廓;
步骤l)根据步骤k)中字符的有效轮廓,计算有效轮廓的最小外接四边形,然后根据该四边形的位置从步骤i)字符的二值化字符图像内提取出相对应的二值图区域;
步骤m)将步骤l)中得到的二值图区域划分为四宫格,计算出该二值图区域内的白色像素比例,串联成一个1行4列的特征向量;
步骤o)分别计算步骤m)中特征向量与标准印刷体数字1-9特征向量的皮尔逊相关系数Pearson Correlation Coefficient,如果任一皮尔逊相关系数大于0.85,则认为二值图区域为该数字,具体的皮尔逊相关系数计算公式为:
Figure PCTCN2016105733-appb-000010
其中,r表示皮尔逊相关系数,X变量表示印刷体标准像素比例,Y变量表示检测到的数字的像素比例,E表示数学期望值。
印刷体字符的标准像比例X如下表所示:
Figure PCTCN2016105733-appb-000011
此表格是0~9印刷字体的标准系数,应该与我们检测出来的当前图像的四宫格系数联系起来一起计算,它们之间的皮尔逊相关系数,从而判断它们的相关性是不是够大。例如:检测出的四个像素值Y分别为左上白色像素比例0.801,右上白色像素比例0.723,左下白色像素比例0.512,右下白色像素比例0.540;利用皮尔逊相关系数计算所得r5≈0.92,明显大于0.85,而其余数字都小于0.85的皮尔逊相关系数,则表现为与其余数字不相关,所以认为检测出来的数字为5。
本发明的实施方式
为了使本发明技术实现的措施、创作特征、达成目的与功效易于明白了解,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例1:
图1是本发明一种教育玩具套件的结构示意图。
图2是本发明一种教育玩具套件中头盔探测器的结构示意图。
如图1-2所示,一种教育玩具套件的数字识别方法,包括支架1、头盔探测器2和底垫3,并且头盔探测器2安装于支架1上;底垫3,上方具有第一控制凹槽301和第二控制凹槽302,第一控制凹槽301和第二控制凹槽302用于放置控制按键,下方具有9个数字凹槽303,数字凹槽303内用于放置具有多种颜色的1-9数字卡片;支架1,顶部具有 第一凹槽102和第二凹槽103,第一凹槽102用于放置平板电脑,平板电脑采集底垫信息;头盔探测器2,安装于第二凹槽103内;头盔探测器2还包括:本体201、第三凹槽202、2个扇形块203和凸面镜204,并且第三凹槽202位于本体201内,用于夹持不同型号的平板电脑,在第三凹槽202夹持平板电脑屏幕的端点处设置有凸面镜204,凸面镜204的另一端安装于头盔探测器2边缘上,凸面镜204与水平面夹角成锐角,第三凹槽202夹持平板电脑屏幕的端点高于平板电脑的摄像头位置,2个扇形块203位于凸面镜204的2个边缘上,用于固定凸面镜204和夹持平板电脑。
本实施例中,控制按键的颜色为紫色,数字卡片的颜色为红色、绿色和蓝色。
图3是本发明一种教育玩具套件的数字识别方法的流程图。
如图3所示,一种教育玩具套件的数字识别方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,再将底垫放置于平面上,平板电脑的底端安装于第一凹槽内,通过第二凹槽将头盔探测器安装于平板电脑的顶端,再将数字卡片放置于数字凹槽内;
步骤二,固定安装好后,通过平板电脑的前置摄像头实时采集彩色图像;
前置摄像头采集的彩色图像为Ixy,Ixy=f(x,y)=(Rxy,Gxy,Bxy),其中,(x,y)表示彩色图像像素点的位置坐标,f(x,y)表示图像在像素点坐标位置处的像素值,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值;
步骤三,检测图像中数字卡片的数字、颜色和位置。
步骤1),针对步骤二中的彩色图像Ixy,检测底垫的位置和角度,从彩色图像Ixy中提取底垫区域图像,具体步骤为:
b)采用透视变换原理,将彩色图像Ixy转换成由上而下俯视的正视角图像;
b)根据先验知识,在正视角图像中提取出底垫感兴趣区域图像,即数字卡片放置的有效识别区域;
c)将步骤b)中的底垫感兴趣区域图像转换为灰度图像:
Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
其中,Gray(x,y)表示灰度图像;
d)采用边缘检测算法检测图像中的强边缘;
图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
首先,计算相邻像素的差分,具体公式为:
Gx=f[i,j+1]-f[i,j]
Gy=f[i,j]-f[i+1,j]
其中,Gx表示相邻像素在x方向上的差分,Gy表示相邻像素在y方向上的差分,f[i,j+1]表示图像在第i行第j+1列的像素值,f[i,j]表示图像在第i行第j列的像素值;f[i+1,j]表示图像在第i+1行第j列的像素值,
进一步地,计算相邻像素间的梯度,具体公式为:
Figure PCTCN2016105733-appb-000012
其中,G(x,y)表示图像在(x,y)点上梯度值,
Figure PCTCN2016105733-appb-000013
表示像素值在x方向上求导,
Figure PCTCN2016105733-appb-000014
表示像素值在y方向上求导;
进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
由于待检测的底垫目标,在转换为灰度图后,底垫与平面背景存在色差,而不同颜色反差较大,因此可以将反差很大的底垫的轮廓视为当前图像的边缘,进而采用边缘检测算法提取出边缘点的梯度幅值集合,即为底垫的边缘轮廓;边缘提取算法包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
Figure PCTCN2016105733-appb-000015
其中,|G(x,y)|表示边缘点的梯度幅值;
e)对步骤d)中得出的底垫边缘轮廓进行膨胀处理,即从底垫边缘轮廓中提取出长方形的大块类矩形轮廓;
如果没有检测出来矩形长方形,则卡片摆放不正确;如果检测出了大块矩形轮廓,则计算矩形轮廓长边与图像底边(宽轴)的角度是不是在预定义范围内(比如正负10度),也认为卡片摆放不正确,反馈UI游戏界面来进行相应提醒。
f)针对步骤e)中找到的矩形轮廓计算出底垫的位置区域和旋转角度,依据计算出的位置区域从步骤a)正视角图像中提取出彩色底垫区域位置;
步骤2),对步骤1)中得到的底垫图像进行再次提取,提取出数字凹槽区域做数字识别,提取出控制凹槽区域做控制凹槽状态识别,具体步骤为:
步骤g)依据底垫上第一控制凹槽、第二控制凹槽和数字凹槽位置的先验知识提取出控制凹槽和数字凹槽内字符;
步骤h)根据控制凹槽内紫色像素的多少进行判断控制凹槽内是否放置了控制按键,根据数字凹槽里面红色、绿色、蓝色像素值的多少进行判断数字卡片上字符的颜色,如果数字凹槽里面的红、绿、蓝三种外的其它颜色像素值最多,则表明数字凹槽内没有放置任何数字卡片;
步骤i)将提取出来的字符转换成灰度图像,然后再采用OTSU大津算法进行阈值分割得到字符的二值化图像;
步骤j)从步骤i)的二值化图像中提取出字符的显著性轮廓;
步骤k)根据面积、中心点信息,过滤掉步骤j)的显著性轮廓中的干扰轮廓,得到字符的有效轮廓;
步骤l)根据步骤k)中字符的有效轮廓,计算有效轮廓的最小外接四边形,然后根据该四边形的位置从步骤i)字符的二值化字符图像内提取出相对应的二值图区域;
步骤m)将步骤l)中得到的二值图区域划分为四宫格,计算出该二值图区域内的白色像素比例,串联成一个1行4列的特征向量;
步骤o)分别计算步骤m)中特征向量与标准印刷体数字1-9特征向量的皮尔逊相关系数Pearson Correlation Coefficient,如果任一皮尔逊相关系数大于0.85,则认为二值图区域为该数字,具体的皮尔逊相关系数计算公式为:
Figure PCTCN2016105733-appb-000016
其中,r表示皮尔逊相关系数,X变量表示印刷体标准像素比例,Y变量表示检测到的数字的像素比例,E表示数学期望值。
印刷体字符的标准像比例X如下表所示:
Figure PCTCN2016105733-appb-000017
Figure PCTCN2016105733-appb-000018
此表格是0~9印刷字体的标准系数,应该与我们检测出来的当前图像的四宫格系数联系起来一起计算,它们之间的皮尔逊相关系数,从而判断它们的相关性是不是够大。例如:检测出的四个像素值Y分别为左上白色像素比例0.801,右上白色像素比例0.723,左下白色像素比例0.512,右下白色像素比例0.540;利用皮尔逊相关系数计算所得r5≈0.92,明显大于0.85,而其余数字都小于0.85的皮尔逊相关系数,则表现为与其余数字不相关,所以认为检测出来的数字为5。
本发明游戏交互设计巧妙;美观简单,判断更加快速,同时增强了趣味性和直观性。
本发明检测算法更加科学、成熟,将图像的透视变换、透视变换、色彩转换、皮尔逊相关系数等图像算法相结合使用,能够快速的判断出摆放的数字。
本发明计算速度快;每次定位检测耗时在90ms左右,为玩家提供流畅的使用体验。
本发明性能稳定,在对不同平板电脑安装于教育玩具套件内的情况下,针对3千幅图片进行了采集测试,误识别率和漏检率在0.2%以下。
以上显示和描述了本发明的基本原理、主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等同物界定。
工业实用性
所属领域技术人员根据上文的记载容易得知,本发明技术方案适合在工业中制造并在生产、生活中使用,因此本发明具备工业实用性。

Claims (7)

  1. 一种教育玩具套件,其特征在于,包括:支架、头盔探测器和底垫,并且所述头盔探测器安装于支架上,所述底垫上方具有第一控制凹槽和第二控制凹槽,所述第一控制凹槽和第二控制凹槽用于放置控制按键,下方具有9个数字凹槽,所述数字凹槽内用于放置具有多种颜色的1-9数字卡片;所述支架底部具有凸起,顶部具有第一凹槽和第二凹槽,第一凹槽用于放置平板电脑,平板电脑采集底垫信息;头盔探测器安装于第二凹槽内;
    所述头盔探测器还包括:本体、第三凹槽、2个扇形块和凸面镜,并且所述第三凹槽位于本体内,用于夹持不同型号的平板电脑,在所述第三凹槽夹持平板电脑屏幕的端点处设置有凸面镜,所述凸面镜的另一端安装于头盔探测器边缘上,所述凸面镜与水平面夹角成锐角,所述第三凹槽夹持平板电脑屏幕的端点高于平板电脑的摄像头位置,2个所述扇形块位于凸面镜的2个边缘上,用于固定所述凸面镜和夹持平板电脑。
  2. 根据权利要求1所述的一种教育玩具套件,其特征在于,所述控制按键的颜色为紫色,数字卡片的颜色为红色、绿色和蓝色。
  3. 一种教育玩具套件的数字识别方法,其特征在于,包括如下步骤:
    步骤一,在平板电脑中安装游戏程序,再将底垫放置于平面上,平板电脑的底端安装于第一凹槽内,通过第二凹槽将头盔探测器安装于平板电脑的顶端,再将数字卡片放置于数字凹槽内
    步骤二,固定安装好后,通过平板电脑的前置摄像头实时采集彩色图像
    步骤三,检测图像中数字卡片的数字、颜色和位置。
  4. 根据权利要求3所述的一种教育玩具套件的数字识别方法,其特征在于,所述步骤二中前置摄像头采集的彩色图像为Ixy,Ixy=f(x,y)=(Rxy,Gxy,Bxy),其中,(x,y)表示彩色图像像素点的位置坐标,f(x,y)表示图像在像素点坐标位置处的像素值,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值。
  5. 根据权利要求3所述的一种教育玩具套件的数字识别方法,其特征在于,所述步骤三的具体步骤为:
    步骤1),针对所述步骤二中的彩色图像Ixy,检测底垫的位置和角度,从彩色图像Ixy中提取底垫区域图像;
    步骤2),对所述步骤1)中得到的底垫图像进行再次提取,提取出数字凹槽区域做数字识别,提取出控制凹槽区域做控制凹槽状态识别。
  6. 根据权利要求6所述的一种教育玩具套件的数字识别方法,其特征在于,所述步骤1)中从彩色图像Ixy中提取底垫区域图像的具体步骤为:
    a)采用透视变换原理,将彩色图像Ixy转换成由上而下俯视的正视角图像;
    b)根据先验知识,在正视角图像中提取出底垫感兴趣区域图像,即数字卡片放置的有效识别区域;
    c)将所述步骤b)中的底垫感兴趣区域图像转换为灰度图像:
    Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
    其中,Gray(x,y)表示灰度图像;
    d)采用边缘检测算法检测图像中的强边缘;
    图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
    首先,计算相邻像素的差分,具体公式为:
    Gx=f[i,j+1]-f[i,j]
    Gy=f[i,j]-f[i+1,j]
    其中,Gx表示相邻像素在x方向上的差分,Gy表示相邻像素在y方向上的差分,f[i,j+1]表示图像在第i行第j+1列的像素值,f[i,j]表示图像在第i行第j列的像素值;f[i+1,j]表示图像在第i+1行第j列的像素值,
    进一步地,计算相邻像素间的梯度,具体公式为:
    Figure PCTCN2016105733-appb-100001
    其中,G(x,y)表示图像在(x,y)点上梯度值,
    Figure PCTCN2016105733-appb-100002
    表示像素值在x方向上求导,
    Figure PCTCN2016105733-appb-100003
    表示像素值在y方向上求导;
    进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
    由于待检测的底垫目标,在转换为灰度图后,底垫与平面背景存在色差,而不同颜色反差较大,因此可以将反差很大的底垫的轮廓视为当前图像的边缘,进而采用边 缘检测算法提取出边缘点的梯度幅值集合,即为底垫的边缘轮廓;边缘提取算法包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
    Figure PCTCN2016105733-appb-100004
    其中,|G(x,y)|表示边缘点的梯度幅值;
    e)对所述步骤d)中得出的底垫边缘轮廓进行膨胀处理,即从底垫边缘轮廓中提取出长方形的大块类矩形轮廓;
    f)针对所述步骤e)中找到的矩形轮廓计算出底垫的位置区域和旋转角度,依据计算出的位置区域从步骤a)正视角图像中提取出彩色底垫区域位置。
  7. 根据权利要求6所述的一种教育玩具套件的数字识别方法,其特征在于,所述步骤2)中提取出数字凹槽区域做数字识别,提取出控制凹槽区域做控制凹槽状态识别的具体步骤为:
    步骤g)依据底垫上第一控制凹槽、第二控制凹槽和数字凹槽位置的先验知识提取出控制凹槽和数字凹槽内字符;
    步骤h)根据控制凹槽内紫色像素的多少进行判断控制凹槽内是否放置了控制按键,根据数字凹槽里面红色、绿色、蓝色像素值的多少进行判断数字卡片上字符的颜色,如果数字凹槽里面的红、绿、蓝三种外的其它颜色像素值最多,则表明数字凹槽内没有放置任何数字卡片;
    步骤i)将提取出来的字符转换成灰度图像,然后再采用OTSU大津算法进行阈值分割得到字符的二值化图像;
    步骤j)从所述步骤i)的二值化图像中提取出字符的显著性轮廓;
    步骤k)根据面积、中心点信息,过滤掉所述步骤j)的显著性轮廓中的干扰轮廓,得到字符的有效轮廓;
    步骤l)根据所述步骤k)中字符的有效轮廓,计算有效轮廓的最小外接四边形,然后根据该四边形的位置从步骤i)字符的二值化字符图像内提取出相对应的二值图区域;
    步骤m)将所述步骤l)中得到的二值图区域划分为四宫格,计算出该二值图区域内的白色像素比例,串联成一个1行4列的特征向量;
    步骤o)分别计算所述步骤m)中特征向量与标准印刷体数字1-9特征向量的皮尔逊相关系数Pearson Correlation Coefficient,如果任一皮尔逊相关系数大于0.85,则认为二值图区域为该数字,具体的皮尔逊相关系数计算公式为:
    Figure PCTCN2016105733-appb-100005
    其中,r表示皮尔逊相关系数,X变量表示印刷体标准像素比例,Y变量表示检测到的数字的像素比例,E表示数学期望值。
PCT/CN2016/105733 2016-08-19 2016-11-14 一种教育玩具套件及其数字识别方法 WO2018032626A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610695816.X 2016-08-19
CN201610695816.XA CN106097833B (zh) 2016-08-19 2016-08-19 一种教育玩具套件及其数字识别方法

Publications (1)

Publication Number Publication Date
WO2018032626A1 true WO2018032626A1 (zh) 2018-02-22

Family

ID=58069937

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/105733 WO2018032626A1 (zh) 2016-08-19 2016-11-14 一种教育玩具套件及其数字识别方法

Country Status (2)

Country Link
CN (1) CN106097833B (zh)
WO (1) WO2018032626A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116343253A (zh) * 2023-03-13 2023-06-27 苏州威视通智能科技有限公司 一种cad图纸长度单位与像素值比例的识别、获取与计算方法
CN117974644A (zh) * 2024-03-29 2024-05-03 山东中泰药业有限公司 一种胶囊药品质量视觉检测方法
CN117974644B (zh) * 2024-03-29 2024-06-11 山东中泰药业有限公司 一种胶囊药品质量视觉检测方法

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106097833B (zh) * 2016-08-19 2019-08-30 上海葡萄纬度科技有限公司 一种教育玩具套件及其数字识别方法
CN106327956B (zh) * 2016-08-19 2019-06-21 上海葡萄纬度科技有限公司 一种教育玩具套件及其涂色卡片识别方法
CN106710372A (zh) * 2017-01-11 2017-05-24 成都市极米科技有限公司 拼音卡片识别方法、装置以及终端设备
CN110223541A (zh) * 2018-03-03 2019-09-10 哈尔滨越泰科技发展有限公司 一种基于镜面折射图像识别方法的教育套件
CN110491211A (zh) * 2019-06-21 2019-11-22 苏州工艺美术职业技术学院 一种智能认知游戏转盘
CN112233133B (zh) * 2020-10-29 2023-04-14 上海电力大学 基于otsu和区域生长法的电厂高温管道缺陷检测与分割方法
CN113034530A (zh) * 2021-04-02 2021-06-25 广州绿怡信息科技有限公司 手机摆放检测方法及装置

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204469193U (zh) * 2015-02-02 2015-07-15 马建 多功能拼写板
CN104888469A (zh) * 2015-05-25 2015-09-09 卢军 基于图像识别的智能编程积木玩具及其实现方法
US9158389B1 (en) * 2012-10-15 2015-10-13 Tangible Play, Inc. Virtualization of tangible interface objects
CN105194884A (zh) * 2015-10-27 2015-12-30 上海葡萄纬度科技有限公司 教育玩具套件
CN205287569U (zh) * 2015-11-06 2016-06-08 江苏风雷文化传媒有限公司 一种基于增强现实的儿童拼图
CN105719307A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及检测七巧板摆放形状、位置的方法
CN105709434A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及其反光镜位置检测方法
CN106097833A (zh) * 2016-08-19 2016-11-09 上海葡萄纬度科技有限公司 一种教育玩具套件及其数字识别方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105498253B (zh) * 2016-01-26 2017-10-13 上海葡萄纬度科技有限公司 一种教育玩具套件及其定位孔检测定位方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9158389B1 (en) * 2012-10-15 2015-10-13 Tangible Play, Inc. Virtualization of tangible interface objects
CN204469193U (zh) * 2015-02-02 2015-07-15 马建 多功能拼写板
CN104888469A (zh) * 2015-05-25 2015-09-09 卢军 基于图像识别的智能编程积木玩具及其实现方法
CN105194884A (zh) * 2015-10-27 2015-12-30 上海葡萄纬度科技有限公司 教育玩具套件
CN205287569U (zh) * 2015-11-06 2016-06-08 江苏风雷文化传媒有限公司 一种基于增强现实的儿童拼图
CN105719307A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及检测七巧板摆放形状、位置的方法
CN105709434A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及其反光镜位置检测方法
CN106097833A (zh) * 2016-08-19 2016-11-09 上海葡萄纬度科技有限公司 一种教育玩具套件及其数字识别方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116343253A (zh) * 2023-03-13 2023-06-27 苏州威视通智能科技有限公司 一种cad图纸长度单位与像素值比例的识别、获取与计算方法
CN117974644A (zh) * 2024-03-29 2024-05-03 山东中泰药业有限公司 一种胶囊药品质量视觉检测方法
CN117974644B (zh) * 2024-03-29 2024-06-11 山东中泰药业有限公司 一种胶囊药品质量视觉检测方法

Also Published As

Publication number Publication date
CN106097833A (zh) 2016-11-09
CN106097833B (zh) 2019-08-30

Similar Documents

Publication Publication Date Title
WO2018032626A1 (zh) 一种教育玩具套件及其数字识别方法
WO2021138995A1 (zh) 一种棋盘格角点全自动检测方法
WO2017128604A1 (zh) 一种教育玩具套件及其基于形状匹配的魔方检测定位方法
CN105719318B (zh) 一种教育玩具套件中基于hsv的魔方颜色识别方法
WO2017128606A1 (zh) 一种教育玩具套件及其七巧板颜色识别方法
WO2018032630A1 (zh) 一种教育玩具套件及利用颜色和轮廓识别编程模块的方法
CN103218605B (zh) 一种基于积分投影与边缘检测的快速人眼定位方法
WO2017128602A1 (zh) 一种教育玩具套件及其定位孔检测定位方法
WO2017128607A1 (zh) 一种教育玩具套件及检测七巧板摆放形状、位置的方法
CN106355592B (zh) 一种教育玩具套件及其电路元件和电线的识别方法
CN107154058B (zh) 一种引导使用者还原魔方的方法
CN102096471B (zh) 一种基于机器视觉的人机交互方法
WO2017128603A1 (zh) 一种教育玩具套件及其反光镜位置检测方法
WO2018032627A1 (zh) 一种教育玩具套件及其海洋模具识别方法
US20080101693A1 (en) Video image based tracking system for identifying and tracking encoded color surface
WO2018170937A1 (zh) 遮蔽采集图像中异物的标记体、识别图像中异物标记体的方法以及书籍扫描方法
US20150146943A1 (en) Method of recognizing contactless fingerprint and electronic device for performing the same
CN106446894A (zh) 一种基于轮廓识别球型目标物位置的方法
CN110032932B (zh) 一种基于视频处理和决策树设定阈值的人体姿态识别方法
CN106127205A (zh) 一种适用于室内轨道机器人的数字仪表图像的识别方法
CN106384355A (zh) 一种投影交互系统中的自动标定方法
CN109726721A (zh) 一种基于卷积神经网络模型的象棋识别方法
CN103310193A (zh) 一种记录体操视频中运动员重要技术动作时刻的方法
WO2018032628A1 (zh) 一种教育玩具套件及其涂色卡片识别方法
CN110705465B (zh) 一种基于图像处理的手型分类方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16913381

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16913381

Country of ref document: EP

Kind code of ref document: A1