CN106709959B - method and device for recognizing chocolate plate and electronic equipment - Google Patents

method and device for recognizing chocolate plate and electronic equipment Download PDF

Info

Publication number
CN106709959B
CN106709959B CN201710015020.XA CN201710015020A CN106709959B CN 106709959 B CN106709959 B CN 106709959B CN 201710015020 A CN201710015020 A CN 201710015020A CN 106709959 B CN106709959 B CN 106709959B
Authority
CN
China
Prior art keywords
image
chocolate
color
preset
different colors
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.)
Active
Application number
CN201710015020.XA
Other languages
Chinese (zh)
Other versions
CN106709959A (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.)
Chengdu Jimi Technology Co Ltd
Original Assignee
Chengdu Jimi 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 Chengdu Jimi Technology Co Ltd filed Critical Chengdu Jimi Technology Co Ltd
Priority to CN201710015020.XA priority Critical patent/CN106709959B/en
Publication of CN106709959A publication Critical patent/CN106709959A/en
Application granted granted Critical
Publication of CN106709959B publication Critical patent/CN106709959B/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/60Analysis of geometric attributes
    • 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/10024Color image

Abstract

The invention relates to the technical field of image recognition, in particular to a method and a device for recognizing a plurality of chocolate plates with different colors and shapes and electronic equipment. The method comprises acquiring images of the composition of the respective skillets at intervals of a preset duration. The colour and shape of the respective chocolate pieces making up the acquired image are identified. And judging whether the image formed by the identified tangram with each color and shape is matched with preset information or not to obtain a judgment result. Whether there is corresponding image in the drawing according to drawing concatenation or independently concatenation completion back need be seeked to effectively solve when carrying out the tangram recreation through above-mentioned setting, the interesting poor and real-time interactive poor problem that causes.

Description

method and device for recognizing chocolate plate and electronic equipment
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for recognizing a chocolate plate and electronic equipment.
Background
In a traditional tangram game, some drawings are given to make children spell the images, or the children randomly splice the imaginative images, and after the splicing is finished, whether the images corresponding to the spliced images exist in the given drawings or not is searched to judge whether the spliced imaginative images are correct or not. The two kinds of the tangram games can cause the tangram splicing game process to be simple and monotonous, real-time feedback cannot be realized in the game process, and game interaction is lacked.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus and an electronic device for recognizing a puzzle, which effectively solve the problems of poor interest and poor real-time interactivity caused by the need to search whether a corresponding image exists in a drawing after splicing according to the drawing or after completing autonomous splicing when a puzzle game is performed.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
a method of identifying a plurality of chocolate pieces of different colour and shape, the method comprising:
Acquiring images formed by the skillets at preset time intervals;
identifying the colour and shape of the respective chocolate pieces making up the acquired image;
And judging whether the image formed by the identified tangram with each color and shape is matched with preset information or not to obtain a judgment result.
optionally, in the above method of chocolate identification, the step of identifying the shape of each of the chocolate pieces making up the acquired image comprises:
Converting the obtained image into a hexagonal cone model color space image;
Obtaining areas with different colors in the hexagonal cone model color space image to obtain a plurality of graphs with different colors and an image formed by the graphs with different colors;
carrying out linear detection on each graph to obtain a plurality of angular points;
Connecting the plurality of corner points to obtain the outline of each graph;
and detecting the contour of each figure to obtain the shape of the chocolate plate corresponding to each figure.
Optionally, in the above method of chocolate identification, the step of identifying the colour of each of the chocolate plates making up the acquired image comprises:
Establishing a coordinate system in the image formed by each graph and acquiring coordinate information of a preset point in the graph;
Judging whether the position relation between the graphs is adjacent or not according to the coordinate information of the preset points in the graphs;
Extracting two patterns with different colors and adjacent in position relation to combine to form a color pattern;
converting the color map into a Lab color space and acquiring a color component of an a channel;
Carrying out binarization processing on the color component of the channel a by adopting a gray algorithm to obtain a processed color image;
performing morphological corrosion and expansion treatment on the processed color image to obtain an accurate color image and performing linear detection;
selecting a plurality of straight lines meeting preset conditions according to the corner relation to obtain a polygon;
Removing the areas filled by the multiple colors to obtain a pattern filled by a single color;
The colour of the puzzle corresponding to the figure is obtained from the figure filled with a single colour.
Optionally, in the above-mentioned method for recognizing a chocolate tablet, the preset points in the figure are corner points of the figure.
optionally, in the chocolate plate identification method, the preset information is multiple, each preset information includes a preset position relationship and preset color information of a corresponding figure of each chocolate plate, and the step of determining whether the image formed by the identified chocolate plates of each color and shape matches with the preset information includes:
And judging whether the relative position relation of the chocolate plates is matched with the preset position relation or not, and judging whether the color information of the chocolate plates at the corresponding positions is matched with the preset color information or not.
optionally, in the method for recognizing the chocolate plate, the method further comprises filtering an image formed by each chocolate plate to eliminate noise interference.
Optionally, in the method of identifying a chocolate slab, each of the chocolate slabs is triangular, square or parallelogram in shape.
the invention also provides a device for identifying a plurality of chocolate pieces of different colours and shapes, the device comprising:
An image acquisition module: the device is used for acquiring images formed by the skillets at preset time intervals;
an identification module: for identifying the colour and shape of the respective chocolate pieces making up the acquired image;
A judging module: and the judgment module is used for judging whether the image formed by the identified tangram with each color and shape is matched with preset information or not to obtain a judgment result.
The present invention also provides an electronic device comprising:
an image acquisition device for acquiring an image formed by a plurality of skillets;
A memory storing the above-mentioned device for recognizing a chocolate tablet;
A processor for performing data processing;
a display device for displaying information;
The processor is respectively connected with the image acquisition device, the memory and the display equipment.
Optionally, in the electronic device, the electronic device is a non-screen television.
the invention provides a method, a device and electronic equipment for identifying a tangram, which are characterized in that images formed by all tangrams are obtained at intervals of preset duration, the color and the shape of each tangram forming the obtained images are identified, whether the images formed by the identified tangrams with the colors and the shapes are matched with preset information is judged to obtain a judgment result, and the problems of poor interest and poor real-time interactivity caused by the fact that whether corresponding images exist in drawings or not needs to be searched after splicing according to the drawings or automatic splicing is finished when a tangram game is carried out are effectively solved.
in order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments are briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention, and for those skilled in the art, other related drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present invention.
Figure 2 is a flow chart schematic diagram of a chocolate plate identification method provided by the embodiment of the invention.
Fig. 3 is a schematic diagram illustrating the sub-steps of step S140 in fig. 2.
Fig. 4 is a schematic diagram illustrating another substep of step S140 in fig. 2.
figure 5 is a block diagram of a module for a chocolate identification device according to an embodiment of the invention.
Icon: 10-a memory; 20-a processor; 30-an image acquisition device; 40-a display device; 100-a chocolate plate recognition device; 120-an image acquisition module; 140-an identification module; 160-judging module.
Detailed Description
in order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
it should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed" and "connected" are to be interpreted broadly, e.g., as being either fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
as shown in fig. 1, which is a block schematic diagram of an electronic device according to an embodiment of the present invention, the electronic device includes: a memory 10, a processor 20, an image capture device 30 and a display device 40, the memory 10 having stored therein a chocolate identification device 100.
the Memory 10 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 10 is used for storing a program, and the processor 20 executes the program after receiving an execution instruction.
the processor 20 may be an integrated circuit chip having signal processing capabilities. The Processor 20 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. But may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or any conventional processor or the like.
the device 100 is located in the memory 10 and the memory 10 is electrically connected, directly or indirectly, to the processor 20 to enable the transfer or interaction of data. The device 100 comprises at least one software functional module which can be stored in the memory 10 in the form of software or firmware (firmware), and the processor 20 executes various functional applications and data processing by running the software programs and modules stored in the memory 10, such as the device 100 in the embodiment of the present invention, so as to realize the method of the present invention.
The image capture device 30 may be, but is not limited to, a camera, a radio frequency identifier or a scanner, as long as it is capable of capturing an image of each of the chocolate plates. In this embodiment, the image capturing device 30 is a camera.
The display device 40 may be, but is not limited to, a terminal device such as a computer, a television, a projector, a screen-less television, or a mobile phone, as long as information can be displayed. Optionally, in this embodiment, the display device 40 is a non-screen television.
The processor 20 is connected to the memory 10, the image capturing device 30 and the display device 40, respectively, to realize data interaction.
It will be appreciated that the configuration shown in fig. 1 is merely illustrative and that an electronic device implementing a video display may include more or fewer components than shown in fig. 1 or may have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
referring to figure 2, the invention provides a method of identifying a plurality of chocolate plates of different colours and shapes. The method comprises three steps of step S120, step S140 and step S160.
Step S120: the images of the respective said puzzle pieces are acquired at predetermined intervals.
the preset time duration can be any, and can be several milliseconds or several seconds, and is not specifically limited herein, and the preset time duration can be set according to actual requirements. In this embodiment, the color of each of the chocolate plates is different. The shape of each tangram can be a parallelogram, a rectangle, a square, a triangle, a hexagon or a circle, etc., and is not particularly limited and can be selected according to actual requirements.
Step S140: identifying the colour and shape of the respective chocolate pieces making up the acquired image.
the shape and colour of each chocolate plate and the corresponding position of the chocolate plate in the image can be obtained by identifying the image constituting the acquisition.
as shown in figure 3, the step of identifying the shape of each of the chocolate plates making up the acquired image optionally comprises five substeps, step S141, step S142, step S143, step S144 and step S145.
substep S141: and converting the acquired image into a hexagonal cone model color space image.
The hexagonal cone model space image is composed of three parameters of hue, saturation and brightness, the obtained image is an RGB color space image under normal conditions, the RGB color space image is formed by adding and mixing three different components of red, green and blue, and the color of each area is enabled to be more visual by converting the image of the RGB color space into the hexagonal cone model space image, so that the area corresponding to each color is directly divided.
substep S142: and obtaining areas with different colors in the hexagonal cone model color space image to obtain a plurality of graphs with different colors and an image formed by the graphs with different colors.
Substep S143: and carrying out linear detection on each graph to obtain a plurality of corner points.
And performing linear detection on the image to obtain a plurality of straight lines corresponding to the image, and acquiring the corner point obtained by intersecting two adjacent straight lines.
Substep S144: and connecting the plurality of corner points to obtain the outline of each graph.
when the plurality of corner points are connected, the corner points corresponding to each graph are required to be determined, the starting corner point and the ending corner point of the corner points corresponding to each graph are determined, and the corner points are sequentially connected from the starting corner point to the ending corner point according to a clockwise sequence or a counterclockwise sequence to obtain the contour of each graph, wherein the starting corner point and the ending corner point are the same corner point.
substep S145: and detecting the contour of each figure to obtain the shape of the chocolate plate corresponding to each figure.
In this embodiment, optionally, the chocolate plates are seven chocolate plates, i.e. the number of plates is 7, each of which is triangular, parallelogram, rhombus or square in shape. The colours of the chocolate plates are different.
Referring to figure 4, optionally, the step of identifying the colour of each of the chocolate plates making up the acquired image comprises nine sub-steps S151-S159.
Substep S151: and establishing a coordinate system in the image formed by each graph and acquiring coordinate information of preset points in the graph.
The number of the preset points can be one or more. The position of the preset point may be a point at any position in the graph, or may be a corner point of the graph. In this embodiment, the preset points are corner points of the graph, and the number of the preset points is the same as the number of the corner points. The relative coordinate information of each preset point in the graph can be obtained by establishing a coordinate system.
Substep S152: and judging whether the position relation between the graphs is adjacent or not according to the coordinate information of the preset points in the graphs.
specifically, the relative position relationship of the graph corresponding to the corner point is obtained by obtaining the corner point of the graph and calculating according to the relative position of the corner point, for example: vectors can be obtained according to the coordinates of the corner points in different graphs, and whether the position relation is adjacent or not can be obtained through calculation.
Substep S153: and extracting two patterns with different colors adjacent to each other in position relation and combining the two patterns to form a color map.
substep S154: the color map is converted to Lab color space and the color components of the a-channel are obtained.
Substep S155: and carrying out binarization processing on the color component of the channel a by adopting a gray algorithm to obtain a processed color image.
Substep S156: and carrying out morphological corrosion and expansion treatment on the processed color image to obtain an accurate color image and carrying out linear detection. And obtaining a plurality of straight lines after the straight line detection is carried out.
substep S157: and selecting a plurality of straight lines meeting preset conditions according to the corner relation to obtain a polygon.
the preset condition is a straight line satisfying a corner relationship, for example: when the figures formed by the intersecting straight lines are triangles, whether the relation of the corners of an equilateral triangle or an isosceles right triangle is met or not is judged; and when the formed graph is a quadrangle, whether the corner relation of the square, the parallelogram or the rhombus is met or not is judged.
Substep S158: removing the areas filled with multiple colors results in a pattern filled with a single color.
Substep S159: the colour of the puzzle corresponding to the figure is obtained from the figure filled with a single colour.
The shape and the color of each chocolate plate in the image and the corresponding position of each chocolate plate can be obtained through the setting.
Step S160: and judging whether the image formed by the identified tangram with each color and shape is matched with preset information or not to obtain a judgment result.
The preset information is various, each preset information comprises a preset position relation and preset color information of the corresponding graph of each chocolate plate, and the step of judging whether the image formed by the identified chocolate plates with various colors and shapes is matched with the preset information comprises the following steps: and judging whether the relative position relation of the chocolate plates is matched with the preset position relation or not, and judging whether the color information of the chocolate plates at the corresponding positions is matched with the preset color information or not.
specifically, the method is realized by detecting a figure in an image formed by the tangram, acquiring the color corresponding to the detected figure and the angular points arranged according to the sequence of the hour, and mapping the color information in the preset information and the angular point information arranged according to the sequence of the hour. And secondly, judging whether the adjacent chocolate plates of the detected figures correspond to the adjacent chocolate plates of the mapping figures or not, and if so, marking the adjacent chocolate plates as the detected figures. And thirdly, repeating the step two until all the graphs of the image formed by the chocolate plate are detected, and obtaining a detection result.
since there are many unstable factors that may affect the photographed image in the process of acquiring the image formed by each of the chocolate plates by the image acquisition device 30, the unstable factors may be lighting environments such as day, night, strong light or weak light, or shadows of surrounding objects on the image formed by each of the chocolate plates or shadows of human shadows on the image, and these factors may affect the image formed by each of the chocolate plates acquired by the image acquisition device 30, the image acquisition device 30 needs to perform denoising processing after acquiring the image formed by each of the chocolate plates. In this embodiment, optionally, the chocolate plate identification method further comprises step S130.
step S130: and filtering the image formed by the skillets to eliminate noise interference.
in this embodiment, the image formed by the respective chocolate plates may be denoised by Gamma correction and histogram equalization, where Gamma correction is to normalize the color space of the input image to adjust the contrast of the image, reduce the influence of local shadows and illumination changes in the image, and suppress noise interference. Histogram equalization is to widen the gray levels with a large number of pixels in an image and compress the gray levels with a small number of pixels in the image, thereby expanding the dynamic range of the original value of the image, improving the contrast and increasing the change level of the gray levels to make the image clearer. By processing the images using the two methods, the quality of the image formed by each of the chocolate plates is better.
On the basis of the above method, the display device 40 can display different difficulty levels of the puzzle pattern when playing the puzzle game, for example: any puzzle pattern at any one of the three levels of easy, medium and difficult play. The display device 40 displays the colour, shape, location of each puzzle when performing easy stratification. The display device 40 displays the shape of a partial region when performing a middle hierarchy. The display device 40 displays only the shape of the entire pattern when performing difficult levels, and masks the color and shape of each board. In addition, when the puzzle game is played, the display device 40 may not display any image, and the user may splice the images as desired. In the process of splicing the puzzle game by a user, the image acquisition device 30 acquires images formed by splicing the puzzle pieces at preset intervals, and the processor 20 receives the images formed by the puzzle pieces, identifies and judges the images. If the image of each of the chocolate pieces being laid out already corresponds to the configuration of a local area of the chocolate pattern in the preset message, the processor 20 controls the display device 40 to display a game interface and to flash a reminder at the appropriate area for the correct layout. When it is detected that all of the images of the puzzle pieces have been properly and fully laid out, the processor 20 controls the display device 40 to indicate the end of the game, thereby enabling real-time interaction.
Through the setting, the user can experience the fun of real-time interaction in the game process and the thinking exercise brought by different difficulty when playing the puzzle game, so that the interest of the puzzle game is effectively improved, and the user is guided to exert imagination.
Referring to figure 5, figure 5 is a block diagram of the modules of a chocolate identification device 100 according to the present invention, the device 100 comprising an image acquisition module 120, an identification module 140 and a decision module 160.
The image acquisition module 120 is configured to acquire images of the respective chocolate plates at intervals of a predetermined duration. The detailed description of the image obtaining module 120 can refer to the description of step S120 shown in fig. 2 in the embodiment of the present invention. That is, the implementation principle of the image obtaining module 120 is similar to that of the step S120, and will not be further described here.
the recognition module 140 is used to recognize the colour and shape of the individual chocolate pieces making up the acquired image. The detailed description of the identification module 140 may refer to the description of step S140 shown in fig. 2 in the embodiment of the present invention. That is, the implementation principle of the identification module 140 is similar to that of the step S140, and will not be further described here.
the judging module 160 is configured to judge whether the image formed by the identified chocolate plates with different colors and shapes matches with preset information, so as to obtain a judgment result. The detailed description of the determining module 160 can refer to the description of step S160 shown in fig. 2 in the embodiment of the present invention. That is, the implementation principle of the determining module 160 is similar to that of the step S160, and will not be further described here.
In summary, the invention provides a method and an apparatus for recognizing a chocolate plate, and an electronic device, which are used for recognizing a plurality of chocolate plates with different colors and shapes. The electronic equipment is through setting up memory 10, processor 20, image acquisition device 30 and display device 40, and memory 10 stores chocolate plate recognition device 100, chocolate plate recognition device 100 is through setting up image acquisition module 120, identification module 140 and judging module 160 and make the user when carrying out the chocolate plate game, can realize real-time interdynamic, carries out the different chocolate plate games of degree of difficulty and arouses user imagination, effectively strengthens user's experience sense.
It should be understood that the disclosed methods and apparatus may be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
in addition, each functional module in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. It is noted that, herein, relational terms such as first, second, third, fourth, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A method of identifying a plurality of chocolate pieces of different colours and shapes, the method comprising:
acquiring images formed by the skillets at preset time intervals;
Identifying the colour and shape of the respective chocolate pieces making up the acquired image;
judging whether the image formed by the identified tangram with each color and shape is matched with preset information or not to obtain a judgment result;
The step of identifying the colour of the respective chocolate pieces making up the acquired image comprises:
Converting the obtained image into a hexagonal cone model color space image;
obtaining areas with different colors in the hexagonal cone model color space image to obtain a plurality of graphs with different colors and an image formed by the graphs with different colors;
Establishing a coordinate system in an image formed by each graph and acquiring coordinate information of a preset point in the graph;
Judging whether the position relation between the graphs is adjacent or not according to the coordinate information of the preset points in the graphs;
Extracting two patterns with different colors and adjacent in position relation to combine to form a color pattern;
Converting the color map into a Lab color space and acquiring a color component of an a channel;
Carrying out binarization processing on the color component of the channel a by adopting a gray algorithm to obtain a processed color image;
performing morphological corrosion and expansion treatment on the processed color image to obtain an accurate color image and performing linear detection;
Selecting a plurality of straight lines meeting preset conditions according to the corner relation to obtain a polygon; the preset condition is that the straight lines meet the corner relationship, and when the figures formed by intersecting the straight lines are triangles, whether the corner relationship of an equilateral triangle or an isosceles right triangle is met or not is judged; when the formed graph is a quadrangle, whether the corner relation of the square, the parallelogram or the rhombus is met or not is judged;
removing the areas filled by the multiple colors to obtain a pattern filled by a single color;
the colour of the puzzle corresponding to the figure is obtained from the figure filled with a single colour.
2. A chocolate plate identification method according to claim 1 wherein the step of identifying the shape of each of the chocolate plates making up the acquired image comprises:
Converting the obtained image into a hexagonal cone model color space image;
obtaining areas with different colors in the hexagonal cone model color space image to obtain a plurality of graphs with different colors and an image formed by the graphs with different colors;
carrying out linear detection on each graph to obtain a plurality of angular points;
Connecting the plurality of corner points to obtain the outline of each graph;
And detecting the contour of each figure to obtain the shape of the chocolate plate corresponding to each figure.
3. A chocolate plate identification method according to claim 2 wherein the pre-set points in the figure are corner points of the figure.
4. A chocolate piece identification method according to claim 3 wherein said predetermined information is a plurality of types, each type of predetermined information comprises a predetermined positional relationship and predetermined color information of the respective figure of the chocolate piece, and said step of determining whether the image formed by the chocolate pieces of each color and shape identified matches the predetermined information comprises:
And judging whether the relative position relation of the chocolate plates is matched with the preset position relation or not, and judging whether the color information of the chocolate plates at the corresponding positions is matched with the preset color information or not.
5. a method of chocolate identification as claimed in claim 4 further comprising filtering the image of each chocolate to exclude noise interference.
6. A chocolate plate identification method according to claim 1 wherein each chocolate plate is triangular, square or parallelogram in shape.
7. a device for identifying a plurality of chocolate pieces of different colours and shapes, the device comprising:
An image acquisition module: the device is used for acquiring images formed by the skillets at preset time intervals;
an identification module: for identifying the colour and shape of the respective chocolate pieces making up the acquired image;
a judging module: the device is used for judging whether the image formed by the identified tangram with each color and shape is matched with preset information or not to obtain a judgment result;
The identification module is used for:
Converting the obtained image into a hexagonal cone model color space image;
Obtaining areas with different colors in the hexagonal cone model color space image to obtain a plurality of graphs with different colors and an image formed by the graphs with different colors;
establishing a coordinate system in an image formed by each graph and acquiring coordinate information of a preset point in the graph;
Judging whether the position relation between the graphs is adjacent or not according to the coordinate information of the preset points in the graphs;
extracting two patterns with different colors and adjacent in position relation to combine to form a color pattern;
Converting the color map into a Lab color space and acquiring a color component of an a channel;
Carrying out binarization processing on the color component of the channel a by adopting a gray algorithm to obtain a processed color image;
performing morphological corrosion and expansion treatment on the processed color image to obtain an accurate color image and performing linear detection;
selecting a plurality of straight lines meeting preset conditions according to the corner relation to obtain a polygon; the preset condition is that the straight lines meet the corner relationship, and when the figures formed by intersecting the straight lines are triangles, whether the corner relationship of an equilateral triangle or an isosceles right triangle is met or not is judged; when the formed graph is a quadrangle, whether the corner relation of the square, the parallelogram or the rhombus is met or not is judged;
Removing the areas filled by the multiple colors to obtain a pattern filled by a single color;
the colour of the puzzle corresponding to the figure is obtained from the figure filled with a single colour.
8. an electronic device, comprising:
an image acquisition device for acquiring an image formed by a plurality of skillets;
A memory storing a chocolate identification device according to claim 7;
A processor for performing data processing;
A display device for displaying information;
the processor is respectively connected with the image acquisition device, the memory and the display equipment.
9. The electronic device of claim 8, wherein the electronic device is a screenless television.
CN201710015020.XA 2017-01-09 2017-01-09 method and device for recognizing chocolate plate and electronic equipment Active CN106709959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710015020.XA CN106709959B (en) 2017-01-09 2017-01-09 method and device for recognizing chocolate plate and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710015020.XA CN106709959B (en) 2017-01-09 2017-01-09 method and device for recognizing chocolate plate and electronic equipment

Publications (2)

Publication Number Publication Date
CN106709959A CN106709959A (en) 2017-05-24
CN106709959B true CN106709959B (en) 2019-12-17

Family

ID=58907170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710015020.XA Active CN106709959B (en) 2017-01-09 2017-01-09 method and device for recognizing chocolate plate and electronic equipment

Country Status (1)

Country Link
CN (1) CN106709959B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108198226B (en) * 2018-01-10 2022-04-26 广东辰宜信息科技有限公司 Ceramic color identification method, electronic equipment, storage medium and device
CN110569907B (en) * 2019-09-10 2022-03-04 网易(杭州)网络有限公司 Method and device for identifying splicing pattern, computer storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6708973B1 (en) * 2003-02-20 2004-03-23 Edwin A. Hall, Jr. Puzzle device and method of using
CN104680519A (en) * 2015-02-06 2015-06-03 四川长虹电器股份有限公司 Seven-piece puzzle identification method based on contours and colors
CN105718054A (en) * 2016-01-18 2016-06-29 天词信息科技(上海)有限公司 Non-contact intelligent terminal control method, device and system of augmented reality object
CN106228195A (en) * 2016-08-08 2016-12-14 华南理工大学 A kind of a seven-piece puzzle pattern recognition method based on image procossing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6708973B1 (en) * 2003-02-20 2004-03-23 Edwin A. Hall, Jr. Puzzle device and method of using
CN104680519A (en) * 2015-02-06 2015-06-03 四川长虹电器股份有限公司 Seven-piece puzzle identification method based on contours and colors
CN105718054A (en) * 2016-01-18 2016-06-29 天词信息科技(上海)有限公司 Non-contact intelligent terminal control method, device and system of augmented reality object
CN106228195A (en) * 2016-08-08 2016-12-14 华南理工大学 A kind of a seven-piece puzzle pattern recognition method based on image procossing

Also Published As

Publication number Publication date
CN106709959A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US20140329598A1 (en) System and method for object extraction
TWI670684B (en) A method for detecting and tracing a moving target and a target detection device
WO2017128605A1 (en) Educational toy kit and hsv-based magic cube color recognition method therefor
US11024036B2 (en) Extracting an object region from an extraction target image including a display surface
CN107346041B (en) Method and device for determining grating parameters of naked eye 3D display equipment and electronic equipment
US9646382B2 (en) Method, system and apparatus for providing improved audience participation
CN109803172B (en) Live video processing method and device and electronic equipment
CN111079741A (en) Image frame position detection method and device, electronic equipment and storage medium
CN106355592B (en) Educational toy set, circuit element thereof and wire identification method
CN106709959B (en) method and device for recognizing chocolate plate and electronic equipment
CN107346040B (en) Method and device for determining grating parameters of naked eye 3D display equipment and electronic equipment
CN107154058B (en) Method for guiding user to restore magic cube
CN109949248B (en) Method, apparatus, device and medium for modifying color of vehicle in image
CN111970557A (en) Image display method, image display device, electronic device, and storage medium
EP3126023A1 (en) Vision system for monitoring board games and method thereof
CN115474306A (en) Atmosphere lamp video data processing method, device, equipment and storage medium
CN114520894A (en) Projection area determining method and device, projection equipment and readable storage medium
CN114520895B (en) Projection control method, device, projection optical machine and readable storage medium
CN113709949A (en) Control method and device of lighting equipment, electronic equipment and storage medium
CN114520893A (en) Picture projection method and device, projection equipment and readable storage medium
CN113490009B (en) Content information implantation method, device, server and storage medium
CN109189246B (en) Method, device and system for processing scribbled content on handwriting board
CN108040239B (en) Knowledge training system and method based on image recognition
CN115604887A (en) Atmosphere lamp group control method, control console and device
CN108540824B (en) Video rendering method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 610094 Tianfu Software Park Area A, 1129 Century City Road, Chengdu High-tech Zone, Sichuan Province

Applicant after: Chengdu Jimi Technology Co., Ltd.

Address before: No. 1129 Tianfu Software Park A District Century City high tech Zone of Chengdu City, Sichuan Province Road 610000 7 5 storey building No. 501

Applicant before: CHENGDU XGIMI TECHNOLOGY CO., LTD.

GR01 Patent grant
GR01 Patent grant