Image positioning point search method, system, medium and toy in toy camera
By loading the target grayscale, background grayscale difference and color threshold in the toy camera, scanning the pixel points progressively, identifying the longest continuous row as the positioning point, solving the brightness of low-cost devices. All of them are caused by identification error problems, achieving efficient and low-cost image positioning point search.
Patent Information
- Application Number
- CN202111674813.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-12-31
AI Technical Summary
When taking photos, due to the influence of ambient light and the angle of taking photos, the uneven brightness of different areas of the photo leads to errors in position recognition or increased recognition time. The existing algorithms have high hardware requirements for low-cost MCU devices, making it difficult to use low-cost fields. It is effective in children's toys.
By loading the target grayscale, background grayscale difference between the target grayscale and the target color threshold, the pixel points in the image are scanned progressively, find the pixel points that match the target color and record the continuous length, and find the longest continuous length with the longest continuous length One row to determine the coordinates of the target anchor point.
Effectively identifying positioning points in the image at different brightness, reducing hardware requirements, suitable for low-cost toys, reducing recognition error rate, simple and efficient algorithm, and low development difficulty.
Smart Images

Figure CN114299140B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image search technology, and in particular to a method, system, medium and toy for searching image positioning points in a toy camera. Background Art
[0002] When taking photos, the brightness of different areas of a photo may vary due to ambient lighting and the angle of the shot. However, these brightness variations can affect the recognition of the photo content, causing errors or increasing recognition time. For example, when recognizing a photo of an image plate containing information, the first step is to identify the area of the image plate in the image. A common approach is to set anchor points at the vertices of the image plate and then identify the coordinates of the anchor points. However, uneven brightness across different areas of the photo can interfere with the recognition of the anchor points.
[0003] Currently, some algorithms, such as the automatic balanced binarization algorithm, effectively address image recognition at varying brightness levels. However, these complex algorithms require powerful hardware and high computing power, making them less suitable for low-end MCUs. In low-cost applications, such as children's toys, an algorithm is needed that effectively addresses these challenges.
[0004] Chinese patent publication number CN113344803A discloses an image adjustment method, which includes: obtaining an image to be adjusted, wherein the image to be adjusted has areas of uneven brightness; adjusting the brightness of all pixels in the image to be adjusted based on a first adjustment ratio to obtain a globally adjusted image; and comparing the brightness of each pixel in the globally adjusted image with a preset brightness threshold, and adjusting the brightness of each pixel based on the comparison result to obtain a target image. The method disclosed in this patent document suffers from a high processing workload. Summary of the Invention
[0005] In view of the defects in the prior art, the purpose of the present invention is to provide a method, system, medium and toy for finding image positioning points in a toy camera.
[0006] According to the present invention, a method for finding an image positioning point in a toy camera includes: loading the target grayscale, the difference between the background grayscale and the target grayscale, and the target color threshold, scanning the pixels in the image line by line, finding the pixels in the image that match the target color and recording the continuous length, finding the row with the longest continuous length, and obtaining the coordinates of the target positioning point.
[0007] Preferably, the method comprises the following steps:
[0008] Step S1: Acquire a captured image and load a target grayscale, a background grayscale-target grayscale difference, and a target color threshold list; the image includes a building block mounting plate, the building block mounting plate is provided with building block mounting points distributed in a grid pattern, and positioning points are provided at the corners of the building block base;
[0009] Step S2: selecting a scanning area in the image, wherein the scanning area includes a positioning point;
[0010] Step S3: Select a set of target grayscale, background grayscale and target grayscale difference, and target color threshold;
[0011] Step S4: Scan the pixels in the image row by row starting from the left, compare the grayscale and hue values of the pixels, and determine whether the pixel matches the target color. If so, determine whether the pixels at a set distance to the left of the pixel match the background color. After finding the pixel that matches the background color, start recording the length of the pixels that match the target color; if not, determine the next pixel.
[0012] Step S5: Scan all rows of pixels and determine whether the length of the largest row among all pixel lengths that match the target color is greater than zero. If so, return the target coordinates; if not, proceed to step S6;
[0013] Step S6: Determine whether every set of target grayscale, background grayscale and target grayscale difference, and target color threshold in the list has been traversed. If so, output that no target is found. If not, select the next set of target grayscale, color grayscale and target grayscale difference, and target color threshold, and enter step S4.
[0014] Preferably, step S4 includes the following sub-steps:
[0015] Step S4.1: Select the first pixel in the first row;
[0016] Step S4.2: Compare the grayscale and hue values of each selected pixel one by one to determine whether the pixel is within the target color threshold range. If not, select the next pixel to be judged. If the judgment result for all pixels in the row is no, proceed to the next row and repeat this step. If yes, proceed to step S4.3.
[0017] Step S4.3: Compare the grayscale and hue values of the pixel located a set distance to the left of the current pixel to determine whether the pixel matches the background color. If not, select the next pixel and return to step S4.2; if so, execute step S4.4;
[0018] Step S4.4: Start recording the length of the pixel that matches the target color, select the next pixel to determine whether it matches the target color, if so, increase the pixel length by 1 and select the next pixel to determine whether it matches the target color; if not, proceed to step S4.5;
[0019] Step S4.5: Determine whether the end condition is met. If so, compare the target color length of the current row with that of the previous row and retain the maximum length; if not, select the next row and go to step S4.2.
[0020] Preferably, the end condition includes:
[0021] -The pixel does not meet the target grayscale, and the color of the point located a set distance to the right of the pixel meets the background color, and the grayscale difference between it and the target point meets the set value;
[0022] -Select a point in the pixel length as the center of the circle, draw two concentric circles, and draw several intersection lines through the center of the circle to obtain two sets of intersection points that intersect with the two circles respectively. The intersection points on the circle with the smaller radius all meet the target color condition, and the intersection points on the circle with the larger radius all meet the background color condition. The grayscale difference between the intersection points on the circle with the larger radius and the intersection points on the circle with the smaller radius meets the set value;
[0023] If the above two conditions are met at the same time, the end condition is met, otherwise, the end condition is not met.
[0024] Preferably, the list includes target grayscale, the difference between background grayscale and target grayscale, and target color threshold at different brightness levels.
[0025] According to the present invention, an image positioning point search system in a toy camera includes: loading the target grayscale, the difference between the background grayscale and the target grayscale, and the target color threshold, scanning the pixels in the image line by line, finding the pixels in the image that match the target color and recording the continuous length, finding the row with the longest continuous length, and obtaining the coordinates of the target positioning point.
[0026] Preferably, the system includes the following modules:
[0027] Module M1: Acquires a captured image and loads a list of target grayscale, the difference between background grayscale and target grayscale, and target color thresholds; the image includes a brick mounting plate with brick mounting points arranged in a grid pattern, and positioning points at the corners of the brick base;
[0028] Module M2: selecting a scanning area in the image, wherein the scanning area includes a positioning point;
[0029] Module M3: Select a set of target grayscale, background grayscale and target grayscale difference, and target color threshold;
[0030] Module M4: Scans the pixels in the image row by row starting from the left, compares the grayscale and hue values of the pixels, and determines whether the pixel matches the target color. If so, it determines whether the pixels at a set distance to the left of the pixel match the background color. After finding the pixel that matches the background color, it starts recording the length of the pixels that match the target color. If not, it determines the next pixel.
[0031] Module M5: Scan all rows of pixels and determine whether the length of the largest row among all pixels that match the target color is greater than zero. If so, return the target coordinates; if not, enter module M6;
[0032] Module M6: Determine whether every set of target grayscale, background grayscale and target grayscale difference, and target color threshold in the list has been traversed. If so, output that no target is found. If not, select the next set of target grayscale, color grayscale and target grayscale difference, and target color threshold, and execute module M4.
[0033] Preferably, the module M4 includes the following sub-steps:
[0034] Module M4.1: Select the first pixel in the first row;
[0035] Module M4.2: Compare the grayscale and hue values of each selected pixel one by one to determine whether the pixel is within the target color threshold range. If not, select the next pixel for judgment. If the judgment results for all pixels in the row are negative, proceed to the next row; if they are positive, proceed to module M4.3.
[0036] Module M4.3: Compares the grayscale and hue values of a pixel located a set distance to the left of the current pixel to determine whether the pixel matches the background color. If not, selects the next pixel and returns to module M4.2. If so, executes module M4.4.
[0037] Module M4.4: Start recording the length of pixels that match the target color, select the next pixel to determine if it matches the target color, if so, increment the pixel length by 1 and select the next pixel to determine if it matches the target color; if not, proceed to module M4.5;
[0038] Module M4.5: Determine whether the end condition is met. If so, compare the target color length of the current row with that of the previous row and retain the maximum length; if not, select the next row and enter module M4.2.
[0039] Preferably, the list includes target grayscale, the difference between background grayscale and target grayscale, and target color threshold at different brightness levels.
[0040] According to a computer-readable storage medium provided by the present invention, a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the image positioning point search method in the toy camera is implemented.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] 1. The method provided by the present invention can effectively identify positioning points in images at different brightness levels, has low hardware requirements, and is suitable for deployment in the low-cost toy field;
[0043] 2. The algorithm in this method determines the attributes of pixels by comparison, which can effectively reduce the probability of recognition errors;
[0044] 3. This method has a simple algorithm, high efficiency and low development difficulty. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0046] Figure 1 Schematic diagram of the flow of the method for finding an image positioning point in a toy camera of the present invention;
[0047] Figure 2 Schematic diagram of a photo taken by a camera unit in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0049] Currently, some mature algorithms for finding localization points in images have not been directly applied to the field of building block toys, mainly due to the following reasons:
[0050] For example: 1. The algorithm requires high hardware computing power (building block toys are configured with low computing power for cost considerations). However, the images taken by building block toys have many interference factors, and the position and angle of the image shooting are not fixed, which requires a more complex algorithm to process, thus creating a contradiction.
[0051] 2. In the field of building block toys, the judgment method using fixed target grayscale values and fixed background grayscale values will result in poor positioning point recognition when the environment changes, especially when the light brightness changes, and the probability of misjudgment is high.
[0052] To address the above shortcomings, the present invention uses a method to compare and calculate the difference between background grayscale and target grayscale, which not only reduces the algorithm's hardware requirements for building block toys, but also effectively implements the positioning point search function on building block toys. The positioning point search method of the present invention is generally applicable to searching for icons of specific shapes in images.
[0053] The present invention discloses a method for finding an image positioning point in a toy camera, which is applicable to building block toys. The method comprises the following steps: loading a target grayscale, a difference between a background grayscale and a target grayscale, and a target color threshold; scanning pixel points in an image line by line; finding pixel points in the image that match the target color and recording the continuous length; finding a line with the longest continuous length, and obtaining the coordinates of the target positioning point.
[0054] The method is further disclosed below. Figure 1 The method for finding an image positioning point in a toy camera introduced in the present invention comprises the following steps:
[0055] Step S1: Acquire a captured image and load a list of target grayscale, background grayscale-target grayscale difference, and target color threshold. The image includes a brick mounting plate with brick mounting points arranged in a grid pattern, and positioning points located at the corners of the brick base. The list includes target grayscale, background grayscale-target grayscale difference, and target color threshold at different brightness levels. By setting a brightness gradient, the image plate is photographed at different brightness levels, and the images are analyzed to obtain the grayscale value of the target positioning point, the background grayscale-target grayscale difference, and the target color threshold for each brightness condition. Finally, the data for each brightness condition is organized into a table.
[0056] Step S2: Select a scanning area in the image, where the scanning area contains the positioning points. Figure 2 As shown in the figure, a plurality of building block mounting points are provided on the building block mounting plate, the building blocks can be granular building blocks, and mounting male heads are provided on the building blocks, and the building block mounting points are mounting female heads corresponding to the mounting male heads; and the building block mounting points are evenly distributed in a grid, and positioning points are provided at the four corners of the building block mounting plate. The scanning area can be a single area containing four positioning points, or four areas, each of which contains one positioning point.
[0057] Step S3: Select a set of target grayscale, background grayscale and target grayscale difference, and target color threshold. The selection can be made step by step according to the brightness gradient or according to other algorithms.
[0058] Step S4: Scan the pixels in the image row by row starting from the left, compare the grayscale and hue values of the pixels, and determine whether the pixel matches the target color. If so, determine whether the pixel at a set distance to the left of the pixel matches the background color. After finding the pixel that matches the background color, start recording the length of the pixel that matches the target color; if not, determine the next pixel.
[0059] In more detail, step S4 includes the following sub-steps:
[0060] Step S4.1: Select the first pixel in the first row.
[0061] Step S4.2: Compare the grayscale and hue values of the selected pixel to determine whether the pixel is within the target color threshold range. If not, the pixel is not the target point, and the next pixel is selected for judgment. When the judgment results of all the pixels in this row are negative, go to the next row and re-execute this step; if yes, the pixel is the target point, and go to step S4.3.
[0062] Step S4.3: Compare the grayscale and hue values of a pixel located a set distance to the left of the current pixel to determine whether the pixel matches the background color. If not, select the next pixel and return to step S4.2; if so, execute step S4.4. This added contrast prevents the background color from being too close to the target color in the data set, thereby misidentifying the background color as the target color. The set distance can be determined experimentally to eliminate interference from transitional pixels at the edge of the target location.
[0063] Step S4.4: Start recording the length of the pixel that matches the target color, select the next pixel to determine whether it matches the target color, if so, increase the pixel length by 1 and select the next pixel to determine whether it matches the target color; if not, proceed to step S4.5;
[0064] Step S4.5: Determine whether the end condition is met. If so, compare the target color length of the current row with that of the previous row and retain the maximum length; if not, select the next row and go to step S4.2.
[0065] End conditions include:
[0066] Condition 1: The pixel does not match the target grayscale, and the color of the point located a set distance to the right of the pixel matches the background color, and the grayscale difference between the target point and the grayscale meets the set value. This condition is used to determine whether the pixel is a transition point or a background color point.
[0067] Condition 2: Select a point in the pixel length as the center, draw two concentric circles, and draw several intersecting lines through the center of the circles to obtain two sets of intersection points that intersect with the two circles. The intersection points on the circle with the smaller radius all meet the target color condition, the intersection points on the circle with the larger radius all meet the background color condition, and the grayscale difference between the intersection points on the circle with the larger radius and the intersection points on the circle with the smaller radius meets the set value. The diameters of the two concentric circles in this condition are obtained through experiments, and the selected points are usually located at the midpoint of the target length in the row. For example, the radius of the small circle is slightly larger than one-quarter of the diameter of the target positioning point, and the radius of the large circle is slightly smaller than three-quarters of the diameter of the target positioning point. Through experiments, it is known that only rows located close to the center of the target positioning point can meet condition 2. Through condition 2, shorter data in the target pixel length can be directly excluded, reducing the subsequent calculation amount.
[0068] If the above two conditions are met at the same time, the end condition is met, otherwise, the end condition is not met.
[0069] Step S5: Scan all rows of pixels and determine whether the length of the largest row of pixels matching the target color is greater than zero. If so, return the target coordinates; if not, proceed to step S6. In this embodiment, if the target positioning point is a circle, the obtained pixel length is the diameter of the circle formed by the pixels in the target positioning point. The coordinates of the point corresponding to half the pixel length are the center of the circle, and the coordinates of the center of the circle are the target coordinates.
[0070] Step S6: Determine whether every set of target grayscale, background grayscale and target grayscale difference, and target color threshold in the list has been traversed. If so, output that no target is found. If not, select the next set of target grayscale, color grayscale and target grayscale difference, and target color threshold, and enter step S4.
[0071] The present invention also discloses an image positioning point search system in a toy camera, including: loading the target grayscale, the difference between the background grayscale and the target grayscale, and the target color threshold, scanning the pixels in the image line by line, finding the pixels in the image that match the target color and recording the continuous length, finding the row with the longest continuous length, and obtaining the coordinates of the target positioning point.
[0072] This system includes the following modules:
[0073] Module M1: Captures a captured image and loads a list of target grayscale, background grayscale-target grayscale difference, and target color thresholds. The list includes target grayscale, background grayscale-target grayscale difference, and target color thresholds at different brightness levels. The image includes a brick mounting plate with a grid of brick mounting points, including positioning points at the corners of the brick base.
[0074] Module M2: selecting a scanning area in the image, wherein the scanning area includes a positioning point;
[0075] Module M3: Select a set of target grayscale, background grayscale and target grayscale difference, and target color threshold;
[0076] Module M4: Scan the pixels in the image row by row starting from the left, compare the grayscale and hue values of the pixels, and determine whether the pixel matches the target color. If so, determine whether the pixel at a set distance to the left of the pixel matches the background color. After finding the pixel that matches the background color, start recording the length of the pixel that matches the target color; if not, determine the next pixel.
[0077] In more detail, module M4 includes the following submodules:
[0078] Module M4.1: Select the first pixel in the first row;
[0079] Module M4.2: Compares the grayscale and hue values of the selected pixel to determine whether the pixel is within the target color threshold. If not, the next pixel is selected for determination. If all pixels in the row are determined to be negative, the process proceeds to the next row. If they are negative, the process proceeds to module M4.3.
[0080] Module M4.3: Compares the grayscale and hue values of a pixel located a set distance to the left of the current pixel to determine whether the pixel matches the background color. If not, selects the next pixel and returns to module M4.2. If so, executes module M4.4.
[0081] Module M4.4: Start recording the length of pixels that match the target color, select the next pixel to compare with the end condition, if the end condition is not met, increase the pixel length by 1 and select the next pixel to compare with the end condition; if the end condition is met, compare the pixel length obtained this time with the previous pixel length and save the maximum length.
[0082] Module M5: Scan all rows of pixels and determine whether the length of the largest row among all pixels that match the target color is greater than zero. If so, return the target coordinates; if not, enter module M6;
[0083] Module M6: Determine whether every set of target grayscale, background grayscale and target grayscale difference, and target color threshold in the list has been traversed. If so, output that no target is found. If not, select the next set of target grayscale, color grayscale and target grayscale difference, and target color threshold, and execute module M4.
[0084] The present invention discloses a computer-readable storage medium, such as a USB flash drive, a mobile hard disk, etc., wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the image positioning point search method in the toy camera is implemented.
[0085] The present invention also discloses a building block toy, which includes the image positioning point search system or computer-readable storage medium in the above-mentioned toy camera. When a player plays the building block toy, the above-mentioned positioning point search function in the image can be realized.
[0086] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.
[0087] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A method for finding image positioning points in a toy camera, characterized in that: include: Step S1: Get the captured image, load the target grayscale, the difference between the background grayscale and the target grayscale, and the target color threshold list; Step S2: Select a scanning area in the image, wherein the scanning area includes a positioning point; Step S3: Select a set of target grayscale, background grayscale and target grayscale difference, and target color threshold; Scan the pixels in the image line by line, find the pixels in the image that match the target color and record the continuous length, find the row with the longest continuous length, and get the coordinates of the target positioning point.
2. The method for finding image positioning points in a toy camera according to claim 1, characterized in that: include: The image includes a building block installation plate, on which building block installation points distributed in a grid are arranged, and positioning points are arranged at the corners of the building block base; Also includes: Step S4: Scan the pixels in the image row by row from the left, compare the grayscale and hue values of the pixels, and determine whether the pixel matches the target color. If so, determine whether the pixel at a set distance to the left of the pixel matches the background color. After finding the pixel that matches the background color, start recording the length of the pixel that matches the target color; if not, determine the next pixel. Step S5: Scan all rows of pixels to determine whether the length of the largest row among all pixel lengths that match the target color is greater than zero. If so, return the target coordinates; if not, proceed to step S6; Step S6: Determine whether every set of target grayscale, background grayscale and target grayscale difference, and target color threshold in the list has been traversed. If so, output that the target is not found. If not, select the next set of target grayscale, color grayscale and target grayscale difference, and target color threshold, and enter step S4.
3. The method for finding image positioning points in a toy camera according to claim 2, characterized in that: The step S4 comprises the following sub-steps: Step S4.1: Select the first pixel in the first row; Step S4.2: Compare the grayscale and hue values of the selected pixels one by one to determine whether the pixel is within the target color threshold range. If not, select the next pixel for determination. If the determination results of the pixels in this row are all negative, proceed to the next row and re-execute this step. If yes, proceed to step S4.
3. Step S4.3: Compare the grayscale and hue values of the pixel point located at a set distance to the left of the current pixel point to determine whether the pixel point matches the background color. If not, select the next pixel point and return to step S4.2; if yes, execute step S4.4; Step S4.4: Start recording the length of the pixel points that match the target color, select the next pixel point to determine whether it matches the target color, if so, add 1 to the pixel length and select the next pixel point to determine whether it matches the target color; if not, proceed to step S4.5; Step S4.5: Determine whether the end condition is met. If so, compare the target color length of the current row with that of the previous row and retain the maximum length; if not, select the next row and go to step S4.
2.
4. The method for finding image positioning points in a toy camera according to claim 3, characterized in that: The end conditions include: -The pixel does not meet the target grayscale, and the color of the point located at a set distance to the right of the pixel meets the background color, and the grayscale difference with the target point meets the set value; -Select a point in the pixel length as the center of the circle, make two concentric circles, and make several intersection lines through the center of the circle to obtain two groups of intersection points that intersect with the two circles respectively. The intersection points on the circle with a smaller radius all meet the target color conditions, and the intersection points on the circle with a larger radius all meet the background color conditions. The grayscale difference between the intersection points on the circle with a larger radius and the intersection points on the circle with a smaller radius meets the set value; If the above two conditions are met at the same time, the end condition is met, otherwise, the end condition is not met.
5. The method for finding image positioning points in a toy camera according to claim 2, characterized in that: The list includes target grayscale, the difference between background grayscale and target grayscale, and target color threshold at different brightness.
6. An image positioning point search system in a toy camera, characterized in that: include: Module M1: Get the captured image, load the target grayscale, the difference between the background grayscale and the target grayscale, and the target color threshold list; Module M2: Selecting a scanning area in the image, wherein the scanning area includes a positioning point; Module M3: Select a set of target grayscale, background grayscale and target grayscale difference, and target color threshold; Scan the pixels in the image line by line, find the pixels in the image that match the target color and record the continuous length, find the row with the longest continuous length, and get the coordinates of the target positioning point.
7. The image positioning point search system in a toy camera according to claim 6, characterized in that: include: The image includes a building block installation plate, on which building block installation points distributed in a grid are arranged, and positioning points are arranged at the corners of the building block base; Also includes: Module M4: Scan the pixels in the image row by row from the left, compare the grayscale and hue values of the pixels, and determine whether the pixel matches the target color. If so, determine whether the pixel at a set distance to the left of the pixel matches the background color. After finding the pixel that matches the background color, start recording the length of the pixel that matches the target color; if not, determine the next pixel. Module M5: Scan all rows of pixels to determine whether the length of the largest row among all pixel lengths that match the target color is greater than zero. If so, return the target coordinates; if not, enter module M6; Module M6: Determine whether every set of target grayscale, background grayscale and target grayscale difference, and target color threshold in the list has been traversed. If so, output that the target is not found. If not, select the next set of target grayscale, color grayscale and target grayscale difference, and target color threshold, and execute module M4.
8. The image positioning point search system in a toy camera according to claim 7, characterized in that: The module M4 comprises the following sub-steps: Module M4.1: Select the first pixel in the first row; Module M4.2: Compare the grayscale and hue values of the selected pixels one by one to determine whether the pixel is within the target color threshold range. If not, select the next pixel for determination. If the determination results of the pixels in this row are all negative, proceed to the next row. If yes, proceed to module M4.
3. Module M4.3: Compare the grayscale and hue values of the pixel point located at a set distance to the left of the current pixel point to determine whether the pixel point matches the background color. If not, select the next pixel point and return to module M4.2; if yes, execute module M4.4; Module M4.4: Start recording the length of the pixel points that match the target color, select the next pixel point to determine whether it matches the target color, if so, add 1 to the pixel length and select the next pixel point to determine whether it matches the target color; if not, enter module M4.5; Module M4.5: Determine whether the end condition is met. If so, compare the target color length of the current row with that of the previous row and retain the maximum length; if not, select the next row and enter module M4.
2.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for searching image positioning points in a toy camera according to any one of claims 1 to 5 is implemented.
10. A building block toy, characterized in that: It includes the image positioning point search system in a toy camera as described in any one of claims 6-8 or the computer-readable storage medium as described in claim 9.
Citation Information
Patent Citations
Image adjusting method and device, electronic device and storage medium
CN113344803A
Method and apparatus for detection of dots in an image
US10192132B1
Zonal underground structure detection method based on sun illumination and shade compensation
WO2016106950A1
