WO2017128604A1 - 一种教育玩具套件及其基于形状匹配的魔方检测定位方法 - Google Patents

一种教育玩具套件及其基于形状匹配的魔方检测定位方法 Download PDF

Info

Publication number
WO2017128604A1
WO2017128604A1 PCT/CN2016/086801 CN2016086801W WO2017128604A1 WO 2017128604 A1 WO2017128604 A1 WO 2017128604A1 CN 2016086801 W CN2016086801 W CN 2016086801W WO 2017128604 A1 WO2017128604 A1 WO 2017128604A1
Authority
WO
WIPO (PCT)
Prior art keywords
cube
image
color
shape
contour
Prior art date
Application number
PCT/CN2016/086801
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 WO2017128604A1 publication Critical patent/WO2017128604A1/zh

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F9/00Games not otherwise provided for
    • A63F9/06Patience; Other games for self-amusement
    • A63F9/08Puzzles provided with elements movable in relation, i.e. movably connected, to each other
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Definitions

  • the invention relates to the technical field of computer vision detection and processing, in particular to an educational toy kit and a method for detecting and positioning a cube based on shape matching.
  • an educational toy kit has been successfully developed in the field of computer vision recognition processing technology, including: a bracket, a helmet detector and a bottom plate, and the bracket is mounted on the bottom plate, and the helmet detector is mounted on the bracket; a first groove; the bottom of the bracket has a protrusion, the protrusion is installed in the first groove, the top has a second groove and a third groove, the second groove is for placing the tablet; the helmet detector is installed in the third Inside the groove.
  • the Rubik's cube is placed on the bottom plate, the game program is installed in the tablet computer, and the mosaic image of the Rubik's cube placed on the bottom plate is collected by the camera of the tablet computer to determine whether the Rubik's cube pattern is consistent with the stitching program required by the game program, and if the inconsistency is given the most Quick and easy splicing guide to enhance the fun of the game, children's hands-on ability and interactivity.
  • an educational toy kit and a cube matching detection method based on shape matching are urgently needed, which can quickly determine whether the position of the Rubik's cube is accurate, and improve the accuracy of image collection and analysis results.
  • the present invention provides an educational toy kit and a method for detecting and locating a cube based on shape matching, and the technical solution is as follows:
  • An educational toy kit comprising a bracket, a helmet detector and a bottom plate, wherein the bracket is mounted on the bottom plate, the helmet detector is mounted on the bracket, and a first groove is arranged above the bottom plate; the bottom of the bracket has a protrusion, and the protrusion is installed at the bottom One In the groove, the top has a second groove and a third groove, the second groove is for placing a tablet computer; the helmet detector is installed in the third groove; and the positioning hole is disposed on the third groove side On the longitudinal center axis of the wall.
  • a puzzle matching positioning method based on shape matching in an educational toy kit comprising the following steps:
  • Step 1 Install a game program in the tablet computer, and set a scan interface in the game program, and set a scan area ROI on the scan interface, and the scan interface includes a single-sided scan mode and a double-sided scan mode;
  • the scanning interface consists of a square grid.
  • the ROI of the region of interest is set according to the order of the selected cube. In the single-sided scanning mode, the ROI of the region of interest is the same as the one side of the cube; when using the duplex scanning mode, it is interested.
  • the regional ROI consists of two vertical faces, each of which contains the same square as the cube.
  • Step 2 the bottom end of the tablet is installed in the second recess, the helmet detector is mounted on the top of the tablet through the fourth recess, and the cube is placed on the bottom plate;
  • Step 3 After fixed installation, collect images through the front camera of the tablet;
  • Step 4 Each square of the Rubik's cube is composed of a bottom color and a color color block, and whether the shape of the rim of the Rubik's color color block in the image is elliptical;
  • step 5 it is determined whether the position of the cube on the bottom plate is accurate by the number of detected ellipse.
  • step three are:
  • I xy f(x, y);
  • f(x, y) (R xy , G xy , B xy );
  • R xy represents the color value of the image pixel in the red channel
  • G xy represents the color value of the image pixel in the green channel
  • B xy represents the color value of the image pixel in the blue channel.
  • step four are:
  • 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 at the (x, y) point of the image
  • 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 contour of the color patch with a large contrast can be regarded as the edge of the current image, and then the edge detection is adopted.
  • the method extracts the color patch contour; the conventional edge extraction algorithm includes Sobel operator, Roberts operator, Prewitt operator and Canny operator. The specific formula is:
  • step b) for the color patch edge contour obtained in step b), using the shape matching method of the shape context to perform target screening on the obtained binary contour, and calculating the shape distance of the shape contour and the cube color block;
  • C s represents the shape distance value of the standard elliptical shape contour and the Rubik's cube color patch
  • g(k) and h(k) represent a set of contour point sets of the standard ellipse and the shape to be tested, respectively
  • M represents a distance threshold
  • k represents The kth element point in the contour point set
  • K represents the number of elements contained in the contour point set
  • step 5 the specific steps in step 5 are:
  • the game interaction design of the invention is ingenious; by setting the ROI area of the game scanning interface to a multi-grid form, it is both beautiful and simple, and has the same shape as the Rubik's cube, and the judgment is faster, while retaining the fun and intuitiveness.
  • the detection algorithm of the invention is more scientific and mature, and the image algorithm of grayscale transformation, edge detection and shape matching is used in combination, which can quickly determine whether the position of the cube is accurate and facilitate the rapid adjustment of the position of the cube. Improve the accuracy of image acquisition and analysis results.
  • the calculation speed of the invention is fast; the color of the picture is reduced to reduce the memory of the picture, and the operation speed is increased, and the time of each positioning detection is about 30 ms, which provides a smooth use experience for the player.
  • FIG. 1 is a schematic structural view of an educational toy kit of the present invention.
  • FIG. 2 is a rear elevational view of the bracket of the educational toy kit of the present invention.
  • FIG. 3 is a perspective view of a bracket of an educational toy kit of the present invention.
  • FIG. 4 is a schematic structural view of a bottom plate of an educational toy kit of the present invention.
  • FIG. 5 is a flow chart of a method for correcting and positioning a cube based on shape matching in an educational toy kit.
  • Bracket 1 protrusion 101, second groove 102, third groove 103, dish-shaped chassis 104, circular top frame 105, open handle 106, helmet detector 2, bottom plate 3, first groove 301 .
  • FIG. 5 is a flow chart of a method for correcting and positioning a cube based on shape matching in an educational toy kit.
  • a puzzle matching positioning method based on shape matching in an educational toy kit includes the following steps:
  • Step 1 Install a game program in the tablet computer, and set a scan interface in the game program, and set a scan area ROI on the scan interface, and the scan interface includes a single-sided scan mode and a double-sided scan mode;
  • the scanning interface consists of a square grid.
  • the ROI of the region of interest is set according to the order of the selected cube. In the single-sided scanning mode, the ROI of the region of interest is the same as the one side of the cube; when using the duplex scanning mode, it is interested.
  • the regional ROI consists of two vertical planes, each of which contains the same square as the Rubik's cube; for example, the single-sided scanning mode corresponding to the third-order cube is nine squares, and the corresponding double-sided scanning mode is 18 squares; The single-sided scanning mode corresponding to the order cube is 16 squares, and the corresponding double-sided scanning mode is 32 squares;
  • Step 2 the bottom end of the tablet is installed in the second recess, the helmet detector is mounted on the top of the tablet through the fourth recess, and the cube is placed on the bottom plate;
  • Step 3 After fixed installation, collect images through the front camera of the tablet;
  • f(x, y) (R xy , G xy , B xy );
  • R xy represents the color value of the image pixel in the red channel
  • G xy represents the color value of the image pixel in the green channel
  • B xy represents the color value of the image pixel in the blue channel
  • Step 4 Each square of the Rubik's cube is composed of a bottom color and a color patch, and the shape of the rim of the Rubik's color patch in the image is oval.
  • the specific steps are as follows:
  • 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 at the (x, y) point of the image
  • 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 contour of the color patch with a large contrast can be regarded as the edge of the current image, and then the edge detection is adopted.
  • the method extracts the color patch contour; the conventional edge extraction algorithm includes Sobel operator, Roberts operator, Prewitt operator and Canny operator. The specific formula is:
  • step b) for the color patch edge contour obtained in step b), using the shape matching method of the shape context to perform target screening on the obtained binary contour, and calculating the shape distance of the shape contour and the cube color block;
  • C s represents the shape distance value of the standard elliptical shape contour and the Rubik's cube color patch
  • g(k) and h(k) represent a set of contour point sets of the standard ellipse and the shape to be tested, respectively
  • M represents a distance threshold
  • k represents The kth element point in the contour point set
  • K represents the number of elements contained in the contour point set
  • step 5 it is determined whether the position of the cube on the bottom plate is accurate by the number of detected ellipse.
  • the eight contour points in the standard ellipse are points in the set of g(k) points, respectively, and the cubes of the cube
  • the pentagon outline is the point of the two h(k) points, so the data in the table is substituted.
  • the Rubik's cube of the number of cubes of the Rubik's cube is calculated separately to determine whether it is an ellipse. If the number of the obtained elliptical color patches is the same as the number of cubes of the Rubik's cube, the position of the cube is considered to be correct.
  • FIG. 1 is a schematic structural view of an educational toy kit of the present invention.
  • FIG. 2 is a rear elevational view of the bracket of the educational toy kit of the present invention.
  • FIG. 3 is a perspective view of a bracket of an educational toy kit of the present invention.
  • FIG. 4 is a schematic structural view of a bottom plate of an educational toy kit of the present invention.
  • an educational toy kit includes a bracket 1, a helmet detector 2 and a bottom plate 3, and the bracket 1 is mounted on the bottom plate 3, and the helmet detector 2 is mounted on the bracket 1; the bottom plate 3 is disposed above There is a first groove 301; a bracket 1 having a protrusion 101 at the bottom, the protrusion 101 is mounted in the first groove 301, the top has a second groove 102 and a third groove 103, and the second groove 102 is used for placing a tablet computer; the helmet detector 2 is mounted in the third recess 103; and further includes: a positioning hole 104 disposed on a longitudinal central axis of the sidewall of the third recess 103.
  • FIG. 5 is a flow chart of a method for correcting and positioning a cube based on shape matching in an educational toy kit.
  • a puzzle matching positioning method based on shape matching in an educational toy kit includes the following steps:
  • Step 1 Install a game program in the tablet computer, and set a scan interface in the game program, and set a scan area ROI on the scan interface, and the scan interface includes a single-sided scan mode and a double-sided scan mode;
  • the scanning interface consists of a square grid.
  • the ROI of the region of interest is set according to the order of the selected cube. In the single-sided scanning mode, the ROI of the region of interest is the same as the one side of the cube; when using the duplex scanning mode, it is interested.
  • the regional ROI consists of two vertical planes, each of which contains the same square as the Rubik's cube; for example, the single-sided scanning mode corresponding to the third-order cube is nine squares, and the corresponding double-sided scanning mode is 18 squares; The single-sided scanning mode corresponding to the order cube is 16 squares, and the corresponding double-sided scanning mode is 32 squares;
  • Step 2 the bottom end of the tablet is installed in the second recess, the helmet detector is mounted on the top of the tablet through the fourth recess, and the cube is placed on the bottom plate;
  • Step 3 After fixed installation, collect images through the front camera of the tablet;
  • Step 4 Each square of the Rubik's cube is composed of a bottom color and a color color block, and whether the shape of the rim of the Rubik's color color block in the image is elliptical;
  • step 5 it is determined whether the position of the cube on the bottom plate is accurate by the number of detected ellipse.
  • FIG. 5 is a flow chart of a method for correcting and positioning a cube based on shape matching in an educational toy kit.
  • a puzzle matching positioning method based on shape matching in an educational toy kit includes the following steps:
  • Step 1 Install a game program in the tablet computer, and set a scan interface in the game program, and set a scan area ROI on the scan interface, and the scan interface includes a single-sided scan mode and a double-sided scan mode;
  • the scanning interface consists of a square grid.
  • the ROI of the region of interest is set according to the order of the selected cube. In the single-sided scanning mode, the ROI of the region of interest is the same as the one side of the cube; when using the duplex scanning mode, it is interested.
  • the regional ROI consists of two vertical planes, each of which contains the same square as the Rubik's cube; for example, the single-sided scanning mode corresponding to the third-order cube is nine squares, and the corresponding double-sided scanning mode is 18 squares; The single-sided scanning mode corresponding to the order cube is 16 squares, and the corresponding double-sided scanning mode is 32 squares;
  • Step 2 the bottom end of the tablet is installed in the second recess, the helmet detector is mounted on the top of the tablet through the fourth recess, and the cube is placed on the bottom plate;
  • Step 3 After fixed installation, collect images through the front camera of the tablet;
  • f(x, y) (R xy , G xy , B xy );
  • R xy represents the color value of the image pixel in the red channel
  • G xy represents the color value of the image pixel in the green channel
  • B xy represents the color value of the image pixel in the blue channel
  • Step 4 Each square of the Rubik's cube is composed of a bottom color and a color patch, and the shape of the rim of the Rubik's color patch in the image is oval.
  • the specific steps are as follows:
  • 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 at the (x, y) point of the image
  • 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 contour of the color patch with a large contrast can be regarded as the edge of the current image, and then the edge detection is adopted.
  • the method extracts the color patch contour; the conventional edge extraction algorithm includes Sobel operator, Roberts operator, Prewitt operator and Canny operator. The specific formula is:
  • step b) for the color patch edge contour obtained in step b), using the shape matching method of the shape context to perform target screening on the obtained binary contour, and calculating the shape distance of the shape contour and the cube color block;
  • C s represents the shape distance value of the standard elliptical shape contour and the Rubik's cube color patch
  • g(k) and h(k) represent a set of contour point sets of the standard ellipse and the shape to be tested, respectively
  • M represents a distance threshold
  • k represents The kth element point in the contour point set
  • K represents the number of elements contained in the contour point set
  • step 5 it is determined whether the position of the cube on the bottom plate is accurate by the number of detected ellipse.
  • the eight contour points in the standard ellipse are points in the set of g(k) points, respectively, and the cubes of the cube
  • the pentagon outline is the point of the two h(k) points, so the data in the table is substituted.
  • the Rubik's cube of the number of cubes of the Rubik's cube is calculated separately to determine whether it is an ellipse. If the number of the obtained elliptical color patches is the same as the number of cubes of the Rubik's cube, the position of the cube is considered to be correct.
  • the game interaction design of the invention is ingenious; by setting the ROI area of the game scanning interface to a multi-grid form, it is both beautiful and simple, and has the same shape as the Rubik's cube, and the judgment is faster, while retaining the fun and intuitiveness.
  • the detection algorithm of the invention is more scientific and mature, and combines the image gray-scale transformation, edge detection and shape matching image algorithm, can quickly determine whether the position of the cube is accurate, and facilitate the rapid adjustment of the position of the cube, and improve Image acquisition and the accuracy of the analysis results.
  • the calculation speed of the invention is fast; the memory of the picture is reduced by the color to the gray level, and the operation speed is increased, and the time of each positioning detection is about 30 ms, thereby providing the player with a smooth use experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

在计算机视觉检测处理技术领域提供了一种教育玩具套件及其基于形状匹配的魔方检测定位方法,包括支架(1)安装于底板(3)上,头盔探测器(2)安装于支架(1)上,底板(3)上设置有第一凹槽(301);支架(1)底部具有凸起(101),凸起(101)安装在第一凹槽(301)内,顶部具有第二、第三凹槽(102,103);头盔探测器(2)安装于第三凹槽(103)内;还包括定位孔(104),设置于第三凹槽(103)上,位于侧壁的纵向中心轴上。在平板电脑中安装游戏程序;将平板电脑安装于教育玩具套件上,将魔方放置于底板(3)上;通过平板电脑采集图像;检测图像中魔方彩色色块的轮缘形状;由检测出的椭圆数量判定魔方在底板(3)上的摆放位置是否准确。该魔方检测定位方法能够快速的判断出魔方的摆放位置是否准确,提高图像采集以及分析结果的准确率。

Description

一种教育玩具套件及其基于形状匹配的魔方检测定位方法 技术领域
本发明涉及计算机视觉检测处理技术领域,特别涉及一种教育玩具套件及其基于形状匹配的魔方检测定位方法。
背景技术
现在平板电脑上有许多有趣的幼教游戏应用程序或者儿童游戏,但往往只是让小朋友在屏幕上指指画画,互动性欠缺,长时间看着屏幕容易对眼睛造成伤害;而当下一些互动性强的传统性游戏玩具已经脱离了时代的发展,形式上无法满足孩子学习、玩耍的需求,也不便于孩子和家长的互动沟通。
为了解决上述问题,计算机视觉识别处理技术领域成功的开发了一种教育玩具套件,包括:支架、头盔探测器和底板,并且支架安装于底板上,头盔探测器安装于支架上;底板上方设置有第一凹槽;支架底部具有凸起,凸起安装在第一凹槽内,顶部具有第二凹槽和第三凹槽,第二凹槽用于放置平板电脑;头盔探测器安装于第三凹槽内。然后将魔方放置于底板上,在平板电脑内安装游戏程序,通过平板电脑的摄像头采集放置于底板上的魔方的拼接图像,判定魔方图案是否与游戏程序要求的拼接程序一致,如果不一致给出最快捷的下一步拼接指导,增强游戏的趣味性、儿童动手能力以及互动性。
技术问题
上述的教育玩具套件虽然解决了平板电脑中游戏的互动性欠缺的问题,但是由于底板很大,魔方的摆放位置常常出现偏差,导致摄像头不能采集到完整的图像,图像容易采集出错,分析结果不准确等问题的出现。
因此,计算机视觉检测处理技术领域急需一种教育玩具套件及其基于形状匹配的魔方检测定位方法,能够快速的判断出魔方的摆放位置是否准确,提高图像采集以及分析结果的准确率。
技术解决方案
本发明为了解决上述问题,提供了一种教育玩具套件及其基于形状匹配的魔方检测定位方法,技术方案如下:
一种教育玩具套件,包括支架、头盔探测器和底板,并且支架安装于底板上,头盔探测器安装于支架上,底板上方设置有第一凹槽;支架底部具有凸起,凸起安装在第一 凹槽内,顶部具有第二凹槽和第三凹槽,第二凹槽用于放置平板电脑;头盔探测器安装于第三凹槽内;还包括:定位孔,设置于第三凹槽侧壁的纵向中心轴上。
一种教育玩具套件中基于形状匹配的魔方检测定位方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,游戏程序中设置有扫描界面,在扫描界面上设置扫描感兴趣区域ROI,扫描界面包括单面扫描模式和双面扫描模式;
扫描界面由方形宫格组成,预先根据选择魔方的阶数,设置扫描感兴趣区域ROI;采用单面扫描模式时,感兴趣区域ROI与魔方的单面相同;采用双面扫描模式时,感兴趣区域ROI由2个垂直面组成,每个垂直面含有的宫格与魔方的单面相同;
步骤二,将平板电脑的底端安装于第二凹槽内,通过第四凹槽将头盔探测器安装于平板电脑的顶端,再将魔方放置于底板上;
步骤三,固定安装好后,通过平板电脑的前置摄像头采集图像;
步骤四,魔方的每个宫格由底面色和彩色色块组成,检测图像中魔方彩色色块的轮缘形状是否为椭圆形;
步骤五,由检测出的椭圆数量判定魔方在底板上的摆放位置是否准确。
优选的,在上述一种教育玩具套件中基于形状匹配的魔方检测定位方法中,步骤三的具体步骤为:
将平板电脑前置摄像头所获取图像定义为Ixy,Ixy=f(x,y);
其中,(x,y)表示图像像素点的位置坐标,f(x,y)表示图像的在(x,y)上的像素值;
由于摄像头采集的图像为彩色图片,因此f(x,y)=(Rxy,Gxy,Bxy);
其中,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值。
优选的,在上述一种教育玩具套件中基于形状匹配的魔方检测定位方法中,步骤四的具体步骤为:
a)把步骤三中采集得到的彩色图像转换为灰度图像,具体公式为:
Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
其中,Gray(x,y)表示灰度图像;
b)使用边缘检测算法提取色块轮廓;
图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
首先,计算相邻像素的差分,具体公式为:
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 PCTCN2016086801-appb-000001
其中,G(x,y)表示表示图像的在(x,y)点上梯度值,
Figure PCTCN2016086801-appb-000002
表示像素值在x方向上求导,
Figure PCTCN2016086801-appb-000003
表示像素值在y方向上求导;
进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
由于待检测的魔方目标,在转换为灰度图后,彩色色块和魔方底色反差较大,因此可以将反差很大的彩色色块的轮廓视为当前图像的边缘,进而采用边缘检测的方法提取色块轮廓;常规的边缘提取算法,包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
Figure PCTCN2016086801-appb-000004
其中,|G(x,y)|表示边缘点的梯度幅值;
c)对于步骤b)中得出的色块边缘轮廓,使用形状上下文的形状匹配的方法对于获得的二值轮廓进行目标筛选,计算形状轮廓与魔方色块的形状距离;
Figure PCTCN2016086801-appb-000005
Figure PCTCN2016086801-appb-000006
其中,Cs表示标准椭圆形状轮廓与魔方彩色色块的形状距离值,g(k)和h(k)分别代表标准椭圆和待测形状的一组轮廓点集,M表示距离阈值,k表示轮廓点集内第k个元素点,K表示轮廓点集内含有的元素个数;当Cs小于M时,则判定当前彩色色块轮廓形状为椭圆;当Cs大于等于M时,判定当前是彩色色块轮廓形状不为椭圆。
优选的,在上述一种教育玩具套件中基于形状匹配的魔方检测定位方法中,步骤五的具体步骤为:
计算步骤四中得到的椭圆形彩色色块的数量,单面扫描时,如果得到的椭圆形彩色色块数量与魔方单面宫格数量相同,则认为魔方位置摆放正确;双面扫描时如果得到的椭圆形彩色色块数量与魔方双面宫格数量相同,则认为魔方位置摆放正确;其它情况均认为魔方位置摆放错误。
有益效果
1、本发明游戏交互设计巧妙;通过将游戏扫描界面的ROI区域设置为多宫格形式,既美观简单,又与魔方的形状相同,判断更加快速,同时保留了趣味性和直观性。
2、本发明检测算法更加科学、成熟,将图像的灰度化转化、边缘检测、形状匹配的图像算法相结合使用,能够快速的判断出魔方的摆放位置是否准确,便于魔方位置的快速调节,提高图像采集以及分析结果的准确率。
3、本发明计算速度快;通过将彩色向灰度化降低图片的内存,提高运算速度,每次定位检测耗时在30ms左右,为玩家提供流畅的使用体验。
附图说明
下面结合附图和具体实施方式来详细说明本发明:
图1是本实用新型一种教育玩具套件的结构示意图。
图2是本实用新型一种教育玩具套件的支架的后视图。
图3是本实用新型一种教育玩具套件的支架的立体图。
图4是本实用新型一种教育玩具套件的底板的结构示意图。
图5是一种教育玩具套件中基于形状匹配的魔方检测定位方法的流程图。
其中,图1-5中的附图标记与部件名称之间的对应关系为:
支架1,凸起101,第二凹槽102,第三凹槽103,碟状底架104,圆形顶架105,露空提手106,头盔探测器2,底板3,第一凹槽301。
本发明的最佳实施方式
实施例2:
图5是一种教育玩具套件中基于形状匹配的魔方检测定位方法的流程图。
如图5所示,一种教育玩具套件中基于形状匹配的魔方检测定位方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,游戏程序中设置有扫描界面,在扫描界面上设置扫描感兴趣区域ROI,扫描界面包括单面扫描模式和双面扫描模式;
扫描界面由方形宫格组成,预先根据选择魔方的阶数,设置扫描感兴趣区域ROI;采用单面扫描模式时,感兴趣区域ROI与魔方的单面相同;采用双面扫描模式时,感兴趣区域ROI由2个垂直面组成,每个垂直面含有的宫格与魔方的单面相同;例如:三阶魔方对应的单面扫描模式为九宫格,对应的双面扫描模式为18宫格;四阶魔方对应的单面扫描模式为16宫格,对应的双面扫描模式为32宫格;
步骤二,将平板电脑的底端安装于第二凹槽内,通过第四凹槽将头盔探测器安装于平板电脑的顶端,再将魔方放置于底板上;
步骤三,固定安装好后,通过平板电脑的前置摄像头采集图像;
首先,将平板电脑前置摄像头所获取图像定义为Ixy,Ixy=f(x,y);
其中,(x,y)表示图像像素点的位置坐标,f(x,y)表示图像的在(x,y)上的像素值;
由于摄像头采集的图像为彩色图片,因此f(x,y)=(Rxy,Gxy,Bxy);
其中,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值;
步骤四,魔方的每个宫格由底面色和彩色色块组成,检测图像中魔方彩色色块的轮缘形状是否为椭圆形,具体步骤为:
a)把步骤三中采集得到的彩色图像转换为灰度图像,具体公式为:
Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
其中,Gray(x,y)表示灰度图像;
b)使用边缘检测算法提取色块轮廓;
图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
首先,计算相邻像素的差分,具体公式为:
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 PCTCN2016086801-appb-000007
其中,G(x,y)表示表示图像的在(x,y)点上梯度值,
Figure PCTCN2016086801-appb-000008
表示像素值在x方向上求导,
Figure PCTCN2016086801-appb-000009
表示像素值在y方向上求导;
进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
由于待检测的魔方目标,在转换为灰度图后,彩色色块和魔方底色反差较大,因此可以将反差很大的彩色色块的轮廓视为当前图像的边缘,进而采用边缘检测的方法提取色块轮廓;常规的边缘提取算法,包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
Figure PCTCN2016086801-appb-000010
其中,|G(x,y)|表示边缘点的梯度幅值;
c)对于步骤b)中得出的色块边缘轮廓,使用形状上下文的形状匹配的方法对于获得的二值轮廓进行目标筛选,计算形状轮廓与魔方色块的形状距离;
Figure PCTCN2016086801-appb-000011
Figure PCTCN2016086801-appb-000012
其中,Cs表示标准椭圆形状轮廓与魔方彩色色块的形状距离值,g(k)和h(k)分别代表标准椭圆和待测形状的一组轮廓点集,M表示距离阈值,k表示轮廓点集内第k个元素点,K表示轮廓点集内含有的元素个数;当Cs小于M时,则判定当前彩色色块轮廓形状为椭圆;当Cs大于等于M时,判定当前是彩色色块轮廓形状不为椭圆;
步骤五,由检测出的椭圆数量判定魔方在底板上的摆放位置是否准确。
计算步骤四中得到的椭圆形彩色色块的数量,单面扫描时,如果得到的椭圆形彩色色块数量与魔方单面宫格数量相同,则认为魔方位置摆放正确;双面扫描时如果得到的椭圆形彩色色块数量与魔方双面宫格数量相同,则认为魔方位置摆放正确;其它情况均认为魔方位置摆放错误。
下面以标准椭圆、魔方色块和五边形轮廓对本发明进行具体说明:
(1)设定距离阈值M=0.25,再分别从标准椭圆、形状为椭圆轮廓的魔方色块1以及形状为五边形轮廓的魔方色块2中分别提取出8个轮廓点,制成轮廓点表格,具体如下:
目标轮廓 点1 点2 点3 点4 点5 点6 点7 点8
标准椭圆 0.7 0.2 0.25 0.59 0.42 0.12 0.68 0.14
魔方色块1 0.58 0.14 0.19 0.48 0.32 0.02 0.54 0.33
魔方色块2 0.4 0.62 0.41 0.25 0.12 0.41 0.27 0.62
由于,g(k)和h(k)分别代表标准椭圆和待测形状的一组轮廓点集,因此标准椭圆中的8个轮廓点分别是g(k)点集中的点,而魔方色块、五边形轮廓分别是2个h(k)点集中的点,故将表格中的数据代入
Figure PCTCN2016086801-appb-000013
中,分别计算魔方色块与标准椭圆的形状距离值,以及五边形轮廓与标准椭圆的形状距离值;
魔方色块1与标准椭圆的形状距离值为:
Figure PCTCN2016086801-appb-000014
由于0.103<0.25,满足椭圆的判定条件,因此魔方色块为椭圆;
魔方色块2与标准椭圆的的形状距离值Cs=0.639;由于0.639>0.25,因此魔方色块2为非椭圆;
按照上述方式分别计算魔方单面宫格数量的魔方色块,判断其是否为椭圆,如果得到的椭圆形彩色色块数量与魔方单面宫格数量相同,则认为魔方位置摆放正确。
本发明的实施方式
为了使本发明技术实现的措施、创作特征、达成目的与功效易于明白了解,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例1:
图1是本实用新型一种教育玩具套件的结构示意图。
图2是本实用新型一种教育玩具套件的支架的后视图。
图3是本实用新型一种教育玩具套件的支架的立体图。
图4是本实用新型一种教育玩具套件的底板的结构示意图。
如图1-4所示,一种教育玩具套件,包括支架1、头盔探测器2和底板3,并且支架1安装于底板3上,头盔探测器2安装于支架1上;底板3,上方设置有第一凹槽301;支架1,底部具有凸起101,凸起101安装在第一凹槽301内,顶部具有第二凹槽102和第三凹槽103,第二凹槽102用于放置平板电脑;头盔探测器2,安装于第三凹槽103内;还包括:定位孔104,设置于第三凹槽103侧壁的纵向中心轴上。
图5是一种教育玩具套件中基于形状匹配的魔方检测定位方法的流程图。
如图5所示,一种教育玩具套件中基于形状匹配的魔方检测定位方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,游戏程序中设置有扫描界面,在扫描界面上设置扫描感兴趣区域ROI,扫描界面包括单面扫描模式和双面扫描模式;
扫描界面由方形宫格组成,预先根据选择魔方的阶数,设置扫描感兴趣区域ROI;采用单面扫描模式时,感兴趣区域ROI与魔方的单面相同;采用双面扫描模式时,感兴趣区域ROI由2个垂直面组成,每个垂直面含有的宫格与魔方的单面相同;例如:三阶魔方对应的单面扫描模式为九宫格,对应的双面扫描模式为18宫格;四阶魔方对应的单面扫描模式为16宫格,对应的双面扫描模式为32宫格;
步骤二,将平板电脑的底端安装于第二凹槽内,通过第四凹槽将头盔探测器安装于平板电脑的顶端,再将魔方放置于底板上;
步骤三,固定安装好后,通过平板电脑的前置摄像头采集图像;
步骤四,魔方的每个宫格由底面色和彩色色块组成,检测图像中魔方彩色色块的轮缘形状是否为椭圆形;
步骤五,由检测出的椭圆数量判定魔方在底板上的摆放位置是否准确。
实施例2:
图5是一种教育玩具套件中基于形状匹配的魔方检测定位方法的流程图。
如图5所示,一种教育玩具套件中基于形状匹配的魔方检测定位方法,包括如下步骤:
步骤一,在平板电脑中安装游戏程序,游戏程序中设置有扫描界面,在扫描界面上设置扫描感兴趣区域ROI,扫描界面包括单面扫描模式和双面扫描模式;
扫描界面由方形宫格组成,预先根据选择魔方的阶数,设置扫描感兴趣区域ROI;采用单面扫描模式时,感兴趣区域ROI与魔方的单面相同;采用双面扫描模式时,感兴趣区域ROI由2个垂直面组成,每个垂直面含有的宫格与魔方的单面相同;例如:三阶魔方对应的单面扫描模式为九宫格,对应的双面扫描模式为18宫格;四阶魔方对应的单面扫描模式为16宫格,对应的双面扫描模式为32宫格;
步骤二,将平板电脑的底端安装于第二凹槽内,通过第四凹槽将头盔探测器安装于平板电脑的顶端,再将魔方放置于底板上;
步骤三,固定安装好后,通过平板电脑的前置摄像头采集图像;
首先,将平板电脑前置摄像头所获取图像定义为Ixy,Ixy=f(x,y);
其中,(x,y)表示图像像素点的位置坐标,f(x,y)表示图像的在(x,y)上的像素值;
由于摄像头采集的图像为彩色图片,因此f(x,y)=(Rxy,Gxy,Bxy);
其中,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值;
步骤四,魔方的每个宫格由底面色和彩色色块组成,检测图像中魔方彩色色块的轮缘形状是否为椭圆形,具体步骤为:
a)把步骤三中采集得到的彩色图像转换为灰度图像,具体公式为:
Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
其中,Gray(x,y)表示灰度图像;
b)使用边缘检测算法提取色块轮廓;
图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
首先,计算相邻像素的差分,具体公式为:
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 PCTCN2016086801-appb-000015
其中,G(x,y)表示表示图像的在(x,y)点上梯度值,
Figure PCTCN2016086801-appb-000016
表示像素值在x方向上求导,
Figure PCTCN2016086801-appb-000017
表示像素值在y方向上求导;
进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
由于待检测的魔方目标,在转换为灰度图后,彩色色块和魔方底色反差较大,因此可以将反差很大的彩色色块的轮廓视为当前图像的边缘,进而采用边缘检测的方法提取色块轮廓;常规的边缘提取算法,包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
Figure PCTCN2016086801-appb-000018
其中,|G(x,y)|表示边缘点的梯度幅值;
c)对于步骤b)中得出的色块边缘轮廓,使用形状上下文的形状匹配的方法对于获得的二值轮廓进行目标筛选,计算形状轮廓与魔方色块的形状距离;
Figure PCTCN2016086801-appb-000019
Figure PCTCN2016086801-appb-000020
其中,Cs表示标准椭圆形状轮廓与魔方彩色色块的形状距离值,g(k)和h(k)分别代表标准椭圆和待测形状的一组轮廓点集,M表示距离阈值,k表示轮廓点集内第k个元 素点,K表示轮廓点集内含有的元素个数;当Cs小于M时,则判定当前彩色色块轮廓形状为椭圆;当Cs大于等于M时,判定当前是彩色色块轮廓形状不为椭圆;
步骤五,由检测出的椭圆数量判定魔方在底板上的摆放位置是否准确。
计算步骤四中得到的椭圆形彩色色块的数量,单面扫描时,如果得到的椭圆形彩色色块数量与魔方单面宫格数量相同,则认为魔方位置摆放正确;双面扫描时如果得到的椭圆形彩色色块数量与魔方双面宫格数量相同,则认为魔方位置摆放正确;其它情况均认为魔方位置摆放错误。
下面以标准椭圆、魔方色块和五边形轮廓对本发明进行具体说明:
(1)设定距离阈值M=0.25,再分别从标准椭圆、形状为椭圆轮廓的魔方色块1以及形状为五边形轮廓的魔方色块2中分别提取出8个轮廓点,制成轮廓点表格,具体如下:
目标轮廓 点1 点2 点3 点4 点5 点6 点7 点8
标准椭圆 0.7 0.2 0.25 0.59 0.42 0.12 0.68 0.14
魔方色块1 0.58 0.14 0.19 0.48 0.32 0.02 0.54 0.33
魔方色块2 0.4 0.62 0.41 0.25 0.12 0.41 0.27 0.62
由于,g(k)和h(k)分别代表标准椭圆和待测形状的一组轮廓点集,因此标准椭圆中的8个轮廓点分别是g(k)点集中的点,而魔方色块、五边形轮廓分别是2个h(k)点集中的点,故将表格中的数据代入
Figure PCTCN2016086801-appb-000021
中,分别计算魔方色块与标准椭圆的形状距离值,以及五边形轮廓与标准椭圆的形状距离值;
魔方色块1与标准椭圆的形状距离值为:
Figure PCTCN2016086801-appb-000022
由于0.103<0.25,满足椭圆的判定条件,因此魔方色块为椭圆;
魔方色块2与标准椭圆的的形状距离值Cs=0.639;由于0.639>0.25,因此魔方色块2为非椭圆;
按照上述方式分别计算魔方单面宫格数量的魔方色块,判断其是否为椭圆,如果得到的椭圆形彩色色块数量与魔方单面宫格数量相同,则认为魔方位置摆放正确。
本发明游戏交互设计巧妙;通过将游戏扫描界面的ROI区域设置为多宫格形式,既美观简单,又与魔方的形状相同,判断更加快速,同时保留了趣味性和直观性。
本发明检测算法更加科学、成熟,将图像的灰度化转化、边缘检测、形状匹配的图像算法相结合使用,能够快速的判断出魔方的摆放位置是否准确,便于魔方位置的快速调节,提高图像采集以及分析结果的准确率。
本发明计算速度快;通过将彩色向灰度化降低图片的内存,提高运算速度,每次定位检测耗时在30ms左右,为玩家提供流畅的使用体验。
以上显示和描述了本发明的基本原理、主要特征和本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等同物界定。
工业实用性
所属领域技术人员根据上文的记载容易得知,本发明技术方案适合在工业中制造并在生产、生活中使用,因此本发明具备工业实用性。

Claims (5)

  1. 一种教育玩具套件,包括:支架、头盔探测器和底板,并且所述支架安装于底板上,所述头盔探测器安装于支架上,底板上方设置有第一凹槽;所述支架底部具有凸起,所述凸起安装在第一凹槽内,顶部具有第二凹槽和第三凹槽,所述第二凹槽用于放置平板电脑;所述头盔探测器安装于第三凹槽内;其特征在于,还包括:定位孔,设置于所述第三凹槽侧壁的纵向中心轴上。
  2. 一种教育玩具套件中基于形状匹配的魔方检测定位方法,其特征在于,包括如下步骤:
    步骤一,在平板电脑中安装游戏程序,游戏程序中设置有扫描界面,在扫描界面上设置扫描感兴趣区域ROI,扫描界面包括单面扫描模式和双面扫描模式;
    扫描界面由方形宫格组成,预先根据选择魔方的阶数,设置扫描感兴趣区域ROI;采用单面扫描模式时,感兴趣区域ROI与魔方的单面相同;采用双面扫描模式时,感兴趣区域ROI由2个垂直面组成,每个垂直面含有的宫格与魔方的单面相同;
    步骤二,将平板电脑的底端安装于第二凹槽内,通过第四凹槽将头盔探测器安装于平板电脑的顶端,再将魔方放置于底板上;
    步骤三,固定安装好后,通过平板电脑的前置摄像头采集图像;
    步骤四,魔方的每个宫格由底面色和彩色色块组成,检测图像中魔方彩色色块的轮缘形状是否为椭圆形;
    步骤五,由检测出的椭圆数量判定魔方在底板上的摆放位置是否准确。
  3. 根据权利要求2所述的一种教育玩具套件中基于形状匹配的魔方检测定位方法中,其特征在于,所述步骤三的具体步骤为:
    将平板电脑前置摄像头所获取图像定义为Ixy,Ixy=f(x,y);
    其中,(x,y)表示图像像素点的位置坐标,f(x,y)表示图像的在(x,y)上的像素值;
    由于摄像头采集的图像为彩色图片,因此f(x,y)=(Rxy,Gxy,Bxy);
    其中,Rxy表示图像像素点在红色通道的色彩值,Gxy表示图像像素点在绿色通道的色彩值,Bxy表示图像像素点在蓝色通道的色彩值。
  4. 根据权利要求3所述的一种教育玩具套件中基于形状匹配的魔方检测定位方法中,其特征在于,所述步骤四的具体步骤为:
    a)把所述步骤三中采集得到的彩色图像转换为灰度图像,具体公式为:
    Gray(x,y)=0.2989×Rxy+0.5870×Gxy+0.1140×Bxy
    其中,Gray(x,y)表示灰度图像;
    b)使用边缘检测算法提取色块轮廓;
    图像的边缘是指灰度图像中灰度变化比较剧烈的部分,灰度值的变化程度采用相邻像素间的梯度变化来定量表示,梯度是一阶二维导数的二维等效式,具体计算过程为:
    首先,计算相邻像素的差分,具体公式为:
    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 PCTCN2016086801-appb-100001
    其中,G(x,y)表示表示图像的在(x,y)点上梯度值,
    Figure PCTCN2016086801-appb-100002
    表示像素值在x方向上求导,
    Figure PCTCN2016086801-appb-100003
    表示像素值在y方向上求导;
    进一步地,计算边缘点的梯度幅值,所有边缘点的梯度幅值集合即为提取的边缘轮廓;
    由于待检测的魔方目标,在转换为灰度图后,彩色色块和魔方底色反差较大,因此可以将反差很大的彩色色块的轮廓视为当前图像的边缘,进而采用边缘检测的方法提取色块轮廓;常规的边缘提取算法,包括Sobel算子、Roberts算子、Prewitt算子和Canny算子等,具体公式为:
    Figure PCTCN2016086801-appb-100004
    其中,|G(x,y)|表示边缘点的梯度幅值;
    c)对于所述步骤b)中得出的色块边缘轮廓,使用形状上下文的形状匹配的方法对于获得的二值轮廓进行目标筛选,计算形状轮廓与魔方色块的形状距离;
    Figure PCTCN2016086801-appb-100005
    Figure PCTCN2016086801-appb-100006
    其中,Cs表示标准椭圆形状轮廓与魔方彩色色块的形状距离值,g(k)和h(k)分别代表标准椭圆和待测形状的一组轮廓点集,M表示距离阈值,k表示轮廓点集内第k个元素点,K表示轮廓点集内含有的元素个数;当Cs小于M时,则判定当前彩色色块轮廓形状为椭圆;当Cs大于等于M时,判定当前是彩色色块轮廓形状不为椭圆。
  5. 根据权利要求4所述的一种教育玩具套件中基于形状匹配的魔方检测定位方法中,其特征在于,所述步骤五的具体步骤为:
    计算所述步骤四中得到的椭圆形彩色色块的数量,单面扫描时,如果得到的椭圆形彩色色块数量与魔方单面宫格数量相同,则认为魔方位置摆放正确;双面扫描时如果得到的椭圆形彩色色块数量与魔方双面宫格数量相同,则认为魔方位置摆放正确;其它情况均认为魔方位置摆放错误。
PCT/CN2016/086801 2016-01-26 2016-06-22 一种教育玩具套件及其基于形状匹配的魔方检测定位方法 WO2017128604A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610053827.8 2016-01-26
CN201610053827.8A CN105513086B (zh) 2016-01-26 2016-01-26 一种教育玩具套件及其基于形状匹配的魔方检测定位方法

Publications (1)

Publication Number Publication Date
WO2017128604A1 true WO2017128604A1 (zh) 2017-08-03

Family

ID=55721043

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086801 WO2017128604A1 (zh) 2016-01-26 2016-06-22 一种教育玩具套件及其基于形状匹配的魔方检测定位方法

Country Status (2)

Country Link
CN (1) CN105513086B (zh)
WO (1) WO2017128604A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114067147A (zh) * 2021-11-12 2022-02-18 北京航空航天大学 一种基于局部形状匹配的舰船目标确认方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105709434B (zh) * 2016-01-26 2017-10-13 上海葡萄纬度科技有限公司 一种教育玩具套件及其反光镜位置检测方法
CN105513086B (zh) * 2016-01-26 2019-02-19 上海葡萄纬度科技有限公司 一种教育玩具套件及其基于形状匹配的魔方检测定位方法
CN105498200A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其七巧板颜色识别方法
CN105719318B (zh) * 2016-01-26 2018-07-10 上海葡萄纬度科技有限公司 一种教育玩具套件中基于hsv的魔方颜色识别方法
CN106355592B (zh) * 2016-08-19 2020-06-16 上海葡萄纬度科技有限公司 一种教育玩具套件及其电路元件和电线的识别方法
CN106297492B (zh) * 2016-08-19 2019-06-25 上海葡萄纬度科技有限公司 一种教育玩具套件及利用颜色和轮廓识别编程模块的方法
CN107154058B (zh) 2017-05-08 2020-09-01 上海葡萄纬度科技有限公司 一种引导使用者还原魔方的方法
CN109684971B (zh) * 2018-12-18 2023-01-24 北京理工大学珠海学院 解魔方机器人算法执行方法
CN113554648B (zh) * 2021-09-18 2021-11-30 四川太平洋药业有限责任公司 生产线检测方法

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110081081A1 (en) * 2009-10-05 2011-04-07 Smith Gregory C Method for recognizing objects in images
CN103177259A (zh) * 2013-04-11 2013-06-26 中国科学院深圳先进技术研究院 色块识别方法及装置
CN105194884A (zh) * 2015-10-27 2015-12-30 上海葡萄纬度科技有限公司 教育玩具套件
CN105513086A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其基于形状匹配的魔方检测定位方法
CN205164140U (zh) * 2015-10-27 2016-04-20 上海葡萄纬度科技有限公司 教育玩具套件
CN105498200A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其七巧板颜色识别方法
CN105498253A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其定位孔检测定位方法
CN105719307A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及检测七巧板摆放形状、位置的方法
CN105719318A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及其基于hsv的魔方颜色识别方法
CN105709434A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及其反光镜位置检测方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2276446B (en) * 1993-03-26 1996-07-03 Honda Motor Co Ltd Method of measuring the position of a hole
JP4858401B2 (ja) * 2007-10-18 2012-01-18 ブラザー工業株式会社 画像記録装置
CN102590890B (zh) * 2011-12-31 2014-05-14 同方威视技术股份有限公司 用于标定装置的运动平台及其定位控制方法
CN103350419A (zh) * 2013-06-25 2013-10-16 塔米智能科技(北京)有限公司 一种可自主抓取魔方的智能解魔方机器人及其解魔方方法
CN104089575B (zh) * 2014-07-02 2018-05-11 北京东方迈视测控技术有限公司 智能平面检测仪及检测方法
CN204431257U (zh) * 2015-01-12 2015-07-01 北京工业大学 一种四面对称结构的解魔方机器人

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110081081A1 (en) * 2009-10-05 2011-04-07 Smith Gregory C Method for recognizing objects in images
CN103177259A (zh) * 2013-04-11 2013-06-26 中国科学院深圳先进技术研究院 色块识别方法及装置
CN105194884A (zh) * 2015-10-27 2015-12-30 上海葡萄纬度科技有限公司 教育玩具套件
CN205164140U (zh) * 2015-10-27 2016-04-20 上海葡萄纬度科技有限公司 教育玩具套件
CN105513086A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其基于形状匹配的魔方检测定位方法
CN105498200A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其七巧板颜色识别方法
CN105498253A (zh) * 2016-01-26 2016-04-20 上海葡萄纬度科技有限公司 一种教育玩具套件及其定位孔检测定位方法
CN105719307A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及检测七巧板摆放形状、位置的方法
CN105719318A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及其基于hsv的魔方颜色识别方法
CN105709434A (zh) * 2016-01-26 2016-06-29 上海葡萄纬度科技有限公司 一种教育玩具套件及其反光镜位置检测方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114067147A (zh) * 2021-11-12 2022-02-18 北京航空航天大学 一种基于局部形状匹配的舰船目标确认方法
CN114067147B (zh) * 2021-11-12 2022-12-16 北京航空航天大学 一种基于局部形状匹配的舰船目标确认方法

Also Published As

Publication number Publication date
CN105513086B (zh) 2019-02-19
CN105513086A (zh) 2016-04-20

Similar Documents

Publication Publication Date Title
WO2017128604A1 (zh) 一种教育玩具套件及其基于形状匹配的魔方检测定位方法
WO2017128605A1 (zh) 一种教育玩具套件及其基于hsv的魔方颜色识别方法
WO2021138995A1 (zh) 一种棋盘格角点全自动检测方法
WO2018032626A1 (zh) 一种教育玩具套件及其数字识别方法
WO2017128606A1 (zh) 一种教育玩具套件及其七巧板颜色识别方法
WO2017128602A1 (zh) 一种教育玩具套件及其定位孔检测定位方法
WO2020151489A1 (zh) 基于面部识别的活体检测的方法、电子设备和存储介质
WO2018032630A1 (zh) 一种教育玩具套件及利用颜色和轮廓识别编程模块的方法
WO2017128607A1 (zh) 一种教育玩具套件及检测七巧板摆放形状、位置的方法
US9498721B2 (en) System and method for object extraction
CN107154058B (zh) 一种引导使用者还原魔方的方法
WO2017128603A1 (zh) 一种教育玩具套件及其反光镜位置检测方法
WO2018032631A1 (zh) 一种教育玩具套件及其电路元件和电线的识别方法
CN107506701B (zh) 一种基于视频识别技术的围棋自动记谱方法
WO2018032627A1 (zh) 一种教育玩具套件及其海洋模具识别方法
CN105205447A (zh) 基于围棋图像的围棋识别方法以及棋盘
CN106127205A (zh) 一种适用于室内轨道机器人的数字仪表图像的识别方法
CN107392157B (zh) 一种基于机器视觉的中国象棋比赛智能虚拟直播方法
CN103455815A (zh) 一种复杂场景下的自适应车牌字符分割方法
CN102074017B (zh) 一种杠铃中心点检测及跟踪的方法和装置
CN106327464A (zh) 一种边缘检测方法
CN106384355A (zh) 一种投影交互系统中的自动标定方法
CN109726721A (zh) 一种基于卷积神经网络模型的象棋识别方法
WO2018032628A1 (zh) 一种教育玩具套件及其涂色卡片识别方法
CN110415256B (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: 16887486

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: 16887486

Country of ref document: EP

Kind code of ref document: A1