Infrared touch screen lamp bead arrangement method and device and electronic equipment
By adjusting the arrangement of LED beads in the infrared touchscreen, the problem of uneven light distribution was solved, achieving higher touchscreen recognition accuracy.
Patent Information
- Application Number
- CN202310695912.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-06-12
AI Technical Summary
The uneven distribution of LEDs in an infrared touchscreen leads to uneven light distribution, affecting the accuracy of touchpoint recognition.
By acquiring the optical grid image of the infrared touch screen, dividing it into several optical grid regions, calculating the average pixel value of each region, determining whether the difference is greater than or equal to a preset threshold, and adjusting the LEDs corresponding to the minimum average pixel value to move to the region corresponding to the maximum average pixel value, the LEDs are rearranged.
It improves the uniformity of the light distribution of the infrared touch screen and enhances the accuracy of the touch screen in recognizing touch points.
Smart Images

Figure CN116958048B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of infrared touch technology, and in particular to a lamp bead arrangement method and device of an infrared touch screen and electronic equipment. BACKGROUND
[0002] An infrared touch screen is composed of infrared emitting elements and infrared receiving elements arranged on the frame of the touch screen. The infrared emitting elements emit infrared rays and the infrared receiving elements receive the infrared rays, thereby forming an infrared light net on the screen surface. When a touch point is present at a certain position of the touch screen, the light between the emitting elements and the receiving elements is blocked by the touch point. The position information of the touch point is determined according to the position information of the receiving elements that cannot receive the infrared rays.
[0003] However, the infrared light net formed on the screen surface in the related art has the following characteristics: the light net distribution on the touch screen is uneven due to the arrangement position of the lamp beads of the frame of the touch screen. For example, no scanning line appears in some areas or the density of the formed scanning line is small, thereby causing the recognition accuracy of the touch screen for the touch point to be not accurate enough. SUMMARY
[0004] Therefore, the present application aims to provide a lamp bead arrangement method and device of an infrared touch screen and electronic equipment to solve the problem of uneven light net distribution caused by the arrangement of lamp beads of the infrared touch screen in the related art.
[0005] To achieve the above object, in a first aspect, the present application provides a lamp bead arrangement method of an infrared touch screen, comprising:
[0006] obtaining a light net image of the infrared touch screen;
[0007] dividing the light net image into a plurality of light net areas and calculating the pixel mean value of each light net area;
[0008] determining the difference between the maximum pixel mean value and the minimum pixel mean value in the pixel mean value and judging whether the difference is greater than or equal to a preset pixel value difference threshold value;
[0009] in response to the difference being greater than or equal to the preset pixel value difference threshold value, moving a first lamp bead corresponding to the light net area corresponding to the minimum pixel mean value to a second lamp bead corresponding to the light net area corresponding to the maximum pixel mean value.
[0010] Optionally, in response to the difference being greater than or equal to the preset pixel value difference threshold value, moving the first lamp bead corresponding to the light net area corresponding to the minimum pixel mean value to the second lamp bead corresponding to the light net area corresponding to the maximum pixel mean value, comprising:
[0011] obtaining the light emitting angle of the first lamp bead;
[0012] determining a light mesh area corresponding to the minimum pixel mean value;
[0013] establishing a first mapping area of the light mesh area corresponding to the minimum pixel mean value on the light mesh image with the center of the light mesh area corresponding to the minimum pixel mean value as an intersection and the light emitting angle of the first lamp bead as a first included angle, an angle bisector of the first included angle being perpendicular to the boundary of the single-channel image;
[0014] moving the first lamp bead corresponding to the first mapping area to the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean value.
[0015] Optionally, in response to the first lamp bead being a plurality of,
[0016] The obtaining of the light emitting angle of the first lamp bead comprises:
[0017] obtaining a first preset angle of all the first lamp beads;
[0018] calculating the mean value of the first preset angle to obtain a first mean value;
[0019] taking the first mean value as the light emitting angle of the first lamp bead.
[0020] Optionally, the moving of the first lamp bead corresponding to the first mapping area to the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean value comprises:
[0021] obtaining the light emitting angle of the second lamp bead;
[0022] establishing a second mapping area of the light mesh area corresponding to the maximum pixel mean value on the light mesh image with the center of the light mesh area corresponding to the maximum pixel mean value as an intersection and the light emitting angle of the second lamp bead as a second included angle, an angle bisector of the second included angle being perpendicular to the boundary of the single-channel image;
[0023] moving the first lamp bead to the direction of the second lamp bead corresponding to the second mapping area.
[0024] Optionally, in response to the second lamp bead being a plurality of,
[0025] The obtaining of the light emitting angle of the second lamp bead comprises:
[0026] obtaining a second preset angle of all the second lamp beads;
[0027] calculating the mean value of the second preset angle to obtain a second mean value;
[0028] taking the second mean value as the light emitting angle of the first lamp bead.
[0029] Optionally, the light mesh image is divided into a plurality of light mesh regions, and pixel means of each of the light mesh regions are calculated, including:
[0030] The light mesh image is traversed by a preset first collection field of view; and the light mesh image is divided into a plurality of light mesh regions;
[0031] The pixel value of each pixel point in each of the light mesh regions is collected;
[0032] The average pixel value of each of the pixel points is calculated according to the pixel value of each of the pixel points;
[0033] The average pixel value of the pixel points is taken as the pixel mean of the light mesh region.
[0034] Optionally, in response to the difference being greater than or equal to a preset pixel value difference threshold, a first lamp bead corresponding to the light mesh region corresponding to the minimum pixel mean is moved in a direction of a second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean, including:
[0035] In response to the difference being greater than or equal to a preset pixel value difference threshold, a first lamp bead corresponding to the light mesh region corresponding to the minimum pixel mean is moved in a direction of a second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean by a first distance; wherein the first distance is not greater than half of the maximum distance of the first collection field of view.
[0036] Optionally, after the first lamp bead corresponding to the light mesh region corresponding to the minimum pixel mean is moved in the direction of the second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean, including:
[0037] A new difference between a new maximum pixel mean and a new minimum pixel mean in the pixel means of the plurality of light mesh regions is re-determined;
[0038] The new difference is compared with the preset pixel value difference threshold until the new difference is less than the preset pixel value difference threshold or the lamp bead is moved more than a first number of times.
[0039] In a second aspect of the present application, a lamp bead arrangement device of an infrared touch screen is provided, including:
[0040] A light mesh image conversion module is configured to acquire a light mesh image of an infrared touch screen;
[0041] A light mesh region division module is configured to divide the single-channel light mesh image into a plurality of light mesh regions and calculate pixel means of each of the light mesh regions;
[0042] A pixel value judgment module is configured to determine a difference between a maximum pixel mean and a minimum pixel mean in the pixel means and judge whether the difference is greater than or equal to a preset pixel value difference threshold.
[0043] The lamp bead position adjustment module is configured to move a first lamp bead corresponding to a light mesh area corresponding to the minimum pixel mean to a second lamp bead corresponding to a light mesh area corresponding to the maximum pixel mean in response to the difference being greater than or equal to a preset pixel value difference threshold.
[0044] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.
[0045] As can be seen from the above, the lamp bead arrangement method, device and electronic device of the infrared touch screen provided by the present application divide the light mesh image into a plurality of light mesh areas, obtain the pixel mean of each light mesh area, compare the difference between the maximum pixel mean and the minimum pixel mean in the pixel mean of the light mesh area with a preset pixel value difference threshold, determine that the light mesh distribution of the light mesh area with a pixel value difference greater than or equal to the preset pixel value difference threshold is uneven, and adjust the movement of the lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean to the light mesh area corresponding to the maximum pixel mean, so as to adjust the arrangement of the lamp bead of the infrared touch screen, so that the light mesh distribution of the infrared touch screen is more uniform, and the recognition accuracy of the touch screen for the touch point is higher. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present application or related art, the following will briefly introduce the drawings needed to be used in the embodiments or related art descriptions. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0047] Figure 1 A schematic diagram of the lamp bead arrangement method of the infrared touch screen of the embodiment of the present application;
[0048] Figure 2 A schematic diagram of the method for calculating the pixel mean of the light mesh area of the embodiment of the present application;
[0049] Figure 3 A schematic diagram of the method for moving the first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean to the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean of the embodiment of the present application;
[0050] Figure 4 A schematic diagram of the method for obtaining the light-emitting angle of the first lamp bead of the embodiment of the present application;
[0051] Figure 5A schematic diagram of a moving method of a first lamp bead corresponding to a light mesh area corresponding to a minimum pixel mean to a second lamp bead corresponding to a light mesh area corresponding to a maximum pixel mean for another embodiment of the present application;
[0052] Figure 6 A schematic diagram of a method of obtaining a light emitting angle of a second lamp bead for an embodiment of the present application;
[0053] Figure 7 A schematic diagram of a first mapping area and a second mapping area for an embodiment of the present application;
[0054] Figure 8 A schematic diagram of a lamp bead arrangement device of an infrared touch screen for an embodiment of the present application;
[0055] Figure 9 A schematic diagram of an electronic device for an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed descriptions will be given below with reference to specific embodiments and the accompanying drawings.
[0057] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be understood as the general meanings understood by those skilled in the art. The terms "first", "second", and similar terms used in the embodiments of the present application do not represent any order, quantity, or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms cover the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms do not mean physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right", and the like only represent relative positional relationships, which can change accordingly when the absolute positions of the described objects change.
[0058] Reference Figure 1 The present application proposes a lamp bead arrangement method of an infrared touch screen, comprising:
[0059] S101, obtaining a light mesh image of the infrared touch screen. It can be understood that the light mesh distribution of the infrared touch screen is obtained by the infrared light emitted by the emitting lamp beads arranged on the infrared touch screen to the receiving lamp beads. In some embodiments, the light mesh image can be obtained by a camera arranged in front of the infrared touch screen. Similarly, the light mesh image can also be obtained by simulating the infrared touch screen through a terminal device. Herein, the method of obtaining the light mesh image of the infrared touch screen is not specifically limited.
[0060] In some embodiments, the light mesh image is converted into a single channel image, for example, the light mesh image is converted into a single channel light mesh image through the R channel. It can be understood that the light mesh is obtained by the light emitted by the lamp beads arranged on the infrared touch screen, and the obtained light mesh image is also essentially an RGB image, but the light emitted by the lamp beads is more biased towards red light, that is, the color of the obtained RGB image is more biased towards red. By converting the light mesh image into a single channel light mesh image through the R channel, the contrast of the obtained single channel light mesh image with the white background can be more obvious, and the light mesh distribution therein can be more delicate, and the more delicate the obtained light mesh distribution is, the more it can be determined whether the current lamp bead arrangement is reasonable, thereby preparing for subsequent lamp bead adjustment.
[0061] S102, the light mesh image is divided into a plurality of light mesh regions, and the pixel mean value of each light mesh region is calculated. It can be understood that the single channel light mesh image is divided into a plurality of light mesh regions, and the distribution of the light mesh in the infrared touch screen. Each light mesh region cannot contain only one pixel value, unless the light mesh region is particularly small. Therefore, in the case that the light mesh region is not small enough, the average value in each light mesh region can be calculated as the pixel value in the current light mesh region.
[0062] S103, the difference between the maximum pixel mean value and the minimum pixel mean value in the pixel mean value is determined, and it is judged whether the difference is greater than or equal to a preset pixel value difference threshold.
[0063] It can be understood that by comparing the difference with the preset pixel value difference threshold, the light mesh distribution in the light mesh image is uniform or relatively uniform, so that the pixel mean value in each light mesh region is the same or very close. If the light mesh distribution in the light mesh image is not uniform, the pixel mean values in different light mesh regions are greatly different. Conversely, by subtracting the maximum pixel mean value from the minimum pixel mean value in the pixel mean value in the light mesh region, the difference is obtained and compared with the preset pixel value difference threshold. If the difference is greater than or equal to the pixel value difference threshold, it can also be determined that the light mesh distribution is not uniform. If the light mesh distribution is not uniform, the arrangement of the lamp beads on the infrared touch screen is adjusted to make the light mesh distribution more uniform.
[0064] S104, in response to the difference being greater than or equal to the preset pixel value difference threshold, moving the first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean to the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean. It can be understood that the more dense the arrangement of the emitting lamp beads, the more dense the light mesh distribution, the darker the image of the light mesh area, the smaller the pixel mean of the light mesh area, the sparser the arrangement of the lamp beads, the sparser the light mesh distribution, the whiter the image of the light mesh area, the larger the pixel mean of the light mesh area, and then moving the lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean to the light mesh area corresponding to the minimum pixel mean, so that the arrangement of the lamp beads is more uniform, and the light mesh is more delicate.
[0065] In some embodiments, when moving the first lamp bead of the light mesh area corresponding to the minimum pixel value, the first lamp bead can be moved to the second lamp bead direction in turn, the pixel mean of each light mesh area is calculated, it is determined whether the light mesh distribution is uniform, then the first lamp bead is divided into two groups, each group of first lamp bead is moved in turn, the pixel mean of each light mesh area is calculated, it is determined whether the light mesh distribution is uniform, finally, the first lamp bead is divided into multiple groups, each group of first lamp bead is moved to the second lamp bead direction in turn, the pixel mean of each light mesh area is calculated, it is determined whether the light mesh distribution is uniform, or the first lamp bead spaced apart corresponding to the light mesh area corresponding to the minimum pixel value is moved to the second lamp bead direction corresponding to the light mesh area corresponding to the maximum pixel mean, finally, all the first lamp beads of the light mesh area corresponding to the minimum pixel mean can be moved to the second lamp bead direction of the light mesh area corresponding to the maximum pixel mean, it can be understood that by moving in the above-mentioned various methods, in the current method, the light mesh distribution is determined every time the first lamp bead is moved, the area where the light mesh distribution is uneven is determined, and then the current method is used for moving.
[0066] In some embodiments, the preset pixel value difference includes: calculating the average value of the pixel means of a plurality of light mesh areas; obtaining a plurality of light mesh areas close to the average value; calculating the range of the pixel means of a plurality of light mesh areas, and taking the range as the preset pixel value difference. It can be understood that the preset pixel value difference can be temporarily preset. Similarly, the preset pixel value difference can be a fixed value.
[0067] For example, the preset pixel value difference value is configured as one tenth of the average of the pixel mean values of all the light mesh regions. For example, the light mesh image includes 100 light mesh regions, the pixel mean value of each light mesh region is obtained by the above calculation, the average of the pixel mean values of the 100 light mesh regions is calculated, and one tenth of the average is taken as the preset pixel value difference value threshold. It can be understood that the single-channel pixel value range is generally 0-255, and simply taking the average as the preset pixel value difference value threshold may cause the threshold value to be too large, so that the uniformity of the light mesh of the infrared touch screen cannot be effectively judged. In the case of uniform light mesh distribution, the preset pixel value difference value threshold is about one tenth of the average of the pixel mean values of several light mesh regions. In the embodiment of the present application, the preset pixel value difference value threshold is 10.
[0068] In some embodiments, the reference Figure 2 , step S102 includes:
[0069] S201, traversing the light mesh image through a preset first acquisition field of view, and dividing the light mesh image into a plurality of light mesh regions.
[0070] The shape of the preset first acquisition field of view can be any shape, and preferably the first acquisition field of view can divide the entire light mesh image into a plurality of light mesh regions. It should be noted that the size of the first acquisition field of view is also a preset size, and the size of the light mesh image obtained for different sizes of infrared touch screens is different. The size of the first acquisition field of view can be adjusted so that the sizes of the plurality of light mesh regions are the same. Similarly, the size of the first acquisition field of view is unchanged, and the single-channel image is divided from top to bottom and from left to right in units of the size of the first acquisition field of view. For a region less than one unit, it can also overlap with the nearest light mesh region and be divided into a light mesh region. That is, the light mesh regions overlap, and the overlapping parts are calculated into the corresponding light mesh regions. The overlapping part of the corresponding light mesh region is calculated separately, and the calculation of different light mesh regions increases the repeated calculation of the overlapping part, the sampling of the pixel mean value of the light mesh region is more, and the subsequent light mesh adjustment is more delicate.
[0071] S202, collecting the pixel value of each pixel point in each light mesh region.
[0072] It can be understood that the first acquisition field of view is also used to collect the pixel value of each pixel point in each light mesh region. At the same time, each light mesh region cannot contain only one pixel value, unless the light mesh region is particularly small and contains only one pixel point. Therefore, in the case that the light mesh region is not small enough, the pixel points contained are more than one, and then the pixel value of each pixel point in each light mesh region needs to be collected to calculate the pixel mean value of each light mesh region.
[0073] S203, calculating average pixel values of each light net area according to pixel values of each pixel point.
[0074] S204, taking the average pixel values as pixel mean values of the light net areas.
[0075] The pixel mean values of each light net area are obtained by calculating average pixel values of the pixel points contained in each light net area.
[0076] In some embodiments, the pixel mean values of each light net area are converted into a preset uniform format. For example, the uniform format is an int integer format. In order to ensure the uniformity of data types and facilitate subsequent operations, the original pixel values are converted into the int integer format. The electronic device or terminal device can directly determine the maximum pixel mean value and the minimum pixel mean value through the pixel mean values in the int integer format, and can also directly calculate the difference between the maximum pixel mean value and the minimum pixel mean value through the pixel mean values in the int integer format, and determine the size of the difference and the preset pixel value difference threshold. This is more convenient and fast for the calculation process.
[0077] In some embodiments, in order to respectively establish the relationship between each light net area and its corresponding pixel mean value, and establish the relationship between each light net area and the pixel mean value after conversion, a corresponding list can be established to facilitate the relationship between the pixel mean value, the light net area, and the pixel mean value in the uniform format.
[0078] The several light net areas are numbered respectively.
[0079] A first list and a second list corresponding to the first list are created, and the number values of the light net areas are stored in the first list.
[0080] The pixel mean values corresponding to the light net areas are stored in the second list. By numbering the light net areas, different desired light net areas can be quickly obtained. Further, after determining the pixel mean values in the second list or the pixel mean values in the uniform format, the light net area corresponding to the pixel mean value or the pixel mean value in the uniform format can be quickly determined through the number corresponding to the pixel mean value or the pixel mean value in the uniform format.
[0081] The pixel mean values in the uniform format are stored in the array. It can be understood that, since the numbers of the light mesh areas in the first list and the orders of the pixel mean values in the second list are one-to-one corresponding, after the pixel mean values are converted into the pixel mean values in the int integer format, in order to be one-to-one corresponding with the numbers of the light mesh areas in the first list, the pixel mean values in the second list can be converted one by one according to the orders of the pixel mean values in the second list, and when the pixel mean values in the int integer format obtained after the conversion are stored in the array, the orders of the pixel mean values in the int integer format are also sorted according to the orders of the pixel mean values in the second list.
[0082] It should be noted that, the application embodiments determine the corresponding relationship of the pixel mean values, the light mesh areas and the pixel mean values in the uniform format through the first list, the second list and the array, and the corresponding relationship can also be realized by other ways, for example, the corresponding pixel mean values, the light mesh areas and the pixel mean values in the uniform format are numbered uniformly, which is not limited here.
[0083] In some embodiments, referring to Figure 3 , step S104 comprises:
[0084] S301, obtaining the light-emitting angle of the first lamp bead.
[0085] In some embodiments, in order to form the light mesh areas of the infrared touch screen, the light-emitting angle of the first lamp bead is preset, and the light-emitting angle of the first lamp bead can be obtained by storing and directly reading the preset light-emitting angle of the first lamp bead.
[0086] S302, determining the light mesh area corresponding to the minimum pixel mean value.
[0087] In some embodiments, each light mesh area has a corresponding pixel mean value, and the minimum pixel mean value can be determined by arranging the pixel mean values from large to small or from small to large, and the light mesh area corresponding to the minimum pixel mean value can be determined through the minimum pixel mean value. It should be noted that, different pixel mean values correspond to light mesh areas, and the corresponding light mesh areas are arranged according to the corresponding relationship when the pixel mean values are arranged from small to large or from large to small, so that the light mesh area corresponding to the minimum pixel mean value can be determined according to the sorting result.
[0088] In some embodiments, since the numbers of the light mesh areas in the first list correspond to the pixel mean values in the second list, and the pixel mean values in the int integer format in the array correspond to the pixel mean values in the second list, it can be determined that the light mesh area corresponding to the minimum pixel mean value in the int integer format in the first list can be obtained at the same time when the minimum pixel mean value in the int integer format is obtained by traversing the array.
[0089] S303, taking the center of the light mesh area corresponding to the minimum pixel mean as the intersection point, and taking the light emitting angle of the first lamp bead as the first included angle to establish the first mapping area of the light mesh area corresponding to the minimum pixel mean on the light mesh image. Wherein the angle bisector of the first included angle is perpendicular to the boundary of the light mesh image.
[0090] In some embodiments, referring to Figure 7 As shown, the infrared touch screen has lamp beads for emitting infrared rays and receiving elements for receiving infrared rays. For example, the left and upper parts of the infrared touch screen are emitting lamp beads, and the corresponding right and lower parts are receiving elements, or the right and upper parts are emitting lamp beads, and the corresponding left and lower parts are receiving elements. Since the area of the light mesh area is very small, one or more first lamp beads form the light mesh area of the current minimum pixel mean through their light emitting angles. Conversely, by taking the center of the light emitting area corresponding to the minimum pixel mean as the intersection point and taking the light emitting angle of the first lamp bead as the first included angle on the first mapping area of the light mesh image, the first lamp bead of the first mapping area can be determined, that is, the first lamp bead emits infrared light through its light emitting angle to form the light mesh area corresponding to the minimum pixel mean or the first lamp bead of the first mapping area has the highest correlation with the light mesh area corresponding to the minimum pixel mean. In addition, the first mapping area also includes a first receiving element corresponding to the first lamp bead, for example, Figure 7 The solid ellipses in the left and upper parts of the infrared touch screen in the figure represent the first lamp bead area of the first mapping area, and the solid ellipses in the right and lower parts represent the first receiving element of the first mapping area. The light rays between the first lamp bead and the first receiving element form the light mesh area with the densest light mesh distribution and the smallest pixel mean, so the first lamp bead of the first mapping area needs to be moved.
[0091] S304, moving the first lamp bead corresponding to the first mapping area to the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean.
[0092] In some embodiments, in order to make the dense light mesh distribution of the light mesh area corresponding to the minimum pixel mean consistent with the sparse light mesh distribution of the light mesh area corresponding to the maximum pixel mean, the first lamp bead is moved in the direction of the second lamp bead. It can be understood that the first lamp bead above the infrared touch screen is moved in the direction of the second lamp bead above the infrared touch screen, and the first lamp bead on the left of the infrared touch screen is moved in the direction of the second lamp bead on the left of the infrared touch screen.
[0093] It should be noted that while moving the first lamp bead, the first receiving element of the first mapping area also needs to be moved in the direction of the second receiving element corresponding to the second lamp bead, so that the light mesh distribution composed of the first lamp bead and the first receiving element is consistent with the light mesh distribution composed of the second lamp bead and the second receiving element.
[0094] In some embodiments, the light-emitting angle of the first lamp bead is the same as the receiving angle of the first receiving element, the center of the light-emitting area corresponding to the minimum pixel mean value can be further determined as the intersection point, the first mapping area on the light network image can be determined by taking the light-emitting angle of the first lamp bead or the receiving angle of the first receiving element as the first included angle, and the infrared light between the first lamp bead and the first receiving element in the first mapping area forms the light network area corresponding to the minimum pixel mean value or the first lamp bead and the first receiving element in the first mapping area have the highest correlation with the light network area corresponding to the minimum pixel mean value.
[0095] By comparing the first lamp bead in the first mapping area moving with the first lamp bead corresponding to the light network area corresponding to the minimum pixel mean value moving, the first lamp bead corresponding to the light network area corresponding to the minimum pixel mean value has a more perfect light network adjustment, that is, the first lamp bead forming the light network distribution of the light network area corresponding to the minimum pixel mean value is further refined to move in the direction of the second lamp bead, and there is no movement of the first lamp bead that is redundant or lacking for the light network area corresponding to the minimum pixel mean value. The adjustment of the light network distribution is more delicate.
[0096] In some embodiments, referring to Figure 4 , step S301 comprises:
[0097] S401, acquiring a first preset angle of all first lamp beads. The first preset angle of the first lamp bead is the light-emitting angle, and the first preset angle is set in advance. The first lamp bead can be one or multiple. In response to the first lamp bead being one, the light-emitting angle of the first lamp bead is directly acquired. In response to the first lamp bead being multiple, the light-emitting angles of the first lamp beads are not the same in the design of some curved screens and the like. Therefore, the first preset angles of all first lamp beads need to be acquired.
[0098] S402, calculating the mean value of the first preset angle to obtain a first mean value.
[0099] S403, taking the first mean value as the light-emitting angle of the first lamp bead. In order to reduce the uneven distribution of the light network caused by the different light-emitting angles of different lamp beads, the mean value of the first preset angle is calculated, and the first mean value is taken as the light-emitting angle of the first lamp bead to reduce the calculation error caused by the different light-emitting angles of different lamp beads. It can be understood that if the light-emitting angle of any first lamp bead is directly acquired for calculation, the error caused by the difference between the light-emitting angles of different first lamp beads will be greater.
[0100] It can be understood that, in order to reduce the calculation error, the first mean value is used as the light-emitting angle of the first lamp bead is only one way to obtain the light-emitting angle of the first lamp bead, and other ways can also be used to obtain the light-emitting angle of the first lamp bead, for example, obtaining the first preset angle of the first lamp bead, and using the median value of the first preset angle of the plurality of first lamp beads as the light-emitting angle of the first lamp bead.
[0101] In some embodiments, in order not to cause the light network of the infrared touch screen to be unevenly distributed due to the different light-emitting angles of the first lamp beads, the first preset angles of the first lamp beads are all the same, so that the light-emitting angle of any first lamp bead can be directly obtained without calculating the first mean value.
[0102] It should be noted that, whether the preset angles of the first lamp beads are the same or not, the light-emitting angles of the first lamp beads are preset, so the first preset angle of each first lamp bead is stored. After determining the first lamp bead corresponding to the light network region corresponding to the minimum pixel mean value, for the light-emitting angle of the first lamp bead being the same, the light-emitting angle of any first lamp bead can be directly accessed and obtained from the storage, and for the light-emitting angle of the first lamp bead being different, the first preset angle of any first lamp bead is obtained by accessing the storage, and the mean value of the preset angles of the first lamp beads is calculated to obtain the first mean value.
[0103] For example, in response to the light-emitting angles of the first lamp beads being the same, the light-emitting angles of the first lamp beads are configured to be 25°.
[0104] In some embodiments, with reference to Figure 5 , in response to the difference being greater than or equal to the preset pixel value difference threshold, moving the first lamp bead corresponding to the light network region corresponding to the minimum pixel mean value to the direction of the second lamp bead corresponding to the light network region corresponding to the maximum pixel mean value, comprising:
[0105] S501, obtaining the light-emitting angle of the second lamp bead.
[0106] In some embodiments, in order to form the light network region of the infrared touch screen, the light-emitting angle of the first lamp bead is preset, and the light-emitting angle of the first lamp bead can be obtained by storing the preset light-emitting angle of the first lamp bead and directly reading the storage.
[0107] S502, determining the light network region corresponding to the maximum pixel mean value.
[0108] In some embodiments, each light mesh area has a corresponding pixel mean value, and the maximum pixel mean value can be determined by arranging the pixel mean values in descending order or ascending order, and the light mesh area corresponding to the maximum pixel mean value can be determined by the maximum pixel mean value. It should be noted that different pixel mean values correspond to light mesh areas, and when the pixel mean values are arranged in descending order or ascending order, the corresponding light mesh areas are also arranged in the corresponding relationship, so that the light mesh area corresponding to the maximum pixel mean value is determined according to the sorting result.
[0109] In some embodiments, the light mesh area corresponding to the minimum pixel value is determined in the same way as the above embodiment. Since the numbers of the light mesh areas in the first list correspond to the pixel mean values in the second list, and the int type pixel mean values in the array correspond to the pixel mean values in the second list, when the maximum int type pixel mean value in the array is obtained, the light mesh area corresponding to the maximum int type pixel mean value in the first list can also be obtained.
[0110] S503, taking the center of the light mesh area corresponding to the maximum pixel mean value as the intersection point and the light-emitting angle of the second lamp bead as the second included angle to establish the second mapping area of the light mesh area corresponding to the maximum pixel mean value on the light mesh image. Wherein the angle bisector of the second included angle is perpendicular to the boundary of the light mesh image.
[0111] In some embodiments, referring to Figure 7 As shown, the infrared touch screen has not only lamp beads for emitting infrared rays, but also receiving elements for receiving infrared rays. For example, the left and upper parts of the infrared touch screen are emitting lamp beads, and the corresponding right and lower parts are receiving elements, or the right and upper parts are emitting lamp beads, and the corresponding left and lower parts are receiving elements. Since the area of the light mesh area is very small, one or more second lamp beads form the light mesh area of the current maximum pixel mean value through their light-emitting angles, and vice versa. By taking the center of the light-emitting area corresponding to the maximum pixel mean value as the intersection point and the light-emitting angle of the second lamp bead as the second included angle on the first mapping area of the light mesh image, the second lamp bead of the second mapping area can be determined, that is, the second lamp bead that emits infrared light rays through its light-emitting angle forms the light mesh area corresponding to the maximum pixel mean value or determines that the second lamp bead of the second mapping area has the highest relevance with the light mesh area corresponding to the maximum pixel mean value. In addition, the second mapping area also includes the second receiving element corresponding to the second lamp bead, for example, Figure 7 The dashed oval on the left and upper part of the infrared touch screen in the above figure represents the second lamp bead area of the second mapping area, and the dashed oval on the right and lower part represents the second receiving element of the second mapping area. The light rays between the second lamp bead and the second receiving element form the light mesh area with the most sparse light mesh distribution and the maximum pixel mean value, so the first lamp bead needs to be moved in the direction of the second lamp bead of the second mapping area.
[0112] S504, moving the first lamp bead to the direction of the second lamp bead corresponding to the second mapping area.
[0113] In some embodiments, in order to make the dense light mesh distribution of the light mesh area corresponding to the minimum pixel mean tend to be consistent with the sparse light mesh distribution of the light mesh area corresponding to the maximum pixel value, the first lamp bead is moved to the direction of the second lamp bead. It can be understood that the first lamp bead above the infrared touch screen is moved to the direction of the second lamp bead above, and the first lamp bead on the left of the infrared touch screen is moved to the direction of the second lamp bead on the left.
[0114] It should be noted that while moving the first lamp bead, the first receiving element of the first mapping area is also moved to the direction of the second receiving element corresponding to the second lamp bead, so that the light mesh distribution composed of the first lamp bead and the first receiving element tends to be consistent with the light mesh distribution composed of the second lamp bead and the second receiving element.
[0115] In some embodiments, the light emitting angle of the second lamp bead is the same as the receiving angle of the second receiving element, and the center of the light emitting area corresponding to the maximum pixel mean can be further determined as an intersection point. With the light emitting angle of the second lamp bead or the receiving angle of the second receiving element as a second included angle in the second mapping area on the light mesh image, it can be determined that the infrared light between the second lamp bead and the second receiving element in the second mapping area forms the light mesh area corresponding to the maximum pixel mean, or that the second mapping area includes the second lamp bead and the second receiving element with the highest correlation with the light mesh area corresponding to the maximum pixel mean.
[0116] In some embodiments, the light emitting angles of the emitting lamp beads of the infrared touch screen are the same, and then the light emitting angle of the first lamp bead is the same as the light emitting angle of the second lamp bead.
[0117] In some embodiments, referring to Figure 7 , determining the first lamp bead and the first receiving element of the first mapping area, and determining the second lamp bead and the second receiving element of the second mapping area, can more clearly determine the direction of the second lamp bead relative to the first lamp bead, and the direction of the second receiving element relative to the first receiving element, that is, the direction of the second mapping area relative to the first mapping area. When moving the first lamp bead and the first receiving element, they can be directly moved, which is more efficient. For example, the first lamp bead represented by the solid line ellipse above is directly moved to the direction of the second lamp bead represented by the dashed line ellipse, and the first receiving element represented by the solid line ellipse below is directly moved to the direction of the second receiving element represented by the dashed line ellipse.
[0118] It can be understood that by moving the first lamp bead or the first receiving element corresponding to the first mapping area on each bezel to the second lamp bead or the second receiving element corresponding to the second mapping area, the lamp beads on the bezel of the infrared touch screen are more uniform, and the light mesh formed is more uniform and delicate.
[0119] In some embodiments, referring to Figure 6 , the light-emitting angle of the second lamp bead is obtained, including:
[0120] S601, a second preset angle of all second lamp beads is obtained. As with the first lamp bead, the second preset angle of the second lamp bead is the light-emitting angle, which is preset. The second lamp bead can be one or multiple. In response to the second lamp bead being one, the light-emitting angle of the second lamp bead is directly obtained. In response to the second lamp bead being multiple, in the design of some curved screens and the like, the light-emitting angles of the second lamp beads are not the same. Therefore, the second preset angle of all second lamp beads needs to be obtained.
[0121] S602, a mean value of the second preset angle is calculated to obtain a second mean value.
[0122] S603, the second mean value is taken as the light-emitting angle of the second lamp bead. In order to reduce the uneven distribution of the light net caused by the different light-emitting angles of different lamp beads, the mean value of the second preset angle is calculated, and the second mean value is taken as the light-emitting angle of the second lamp bead to reduce the calculation error caused by the different light-emitting angles of different lamp beads. It can be understood that if the light-emitting angle of any second lamp bead is directly obtained for calculation, the error caused by the difference between the light-emitting angles of different second lamp beads will be greater.
[0123] Similarly, in order to reduce the calculation error, taking the mean value of the first preset angle as the light-emitting angle of the second lamp bead is only one way to obtain the light-emitting angle of the second lamp bead. The light-emitting angle of the second lamp bead can also be obtained by other ways, for example, the second preset angle of the second lamp bead is obtained, and the median value of the second preset angles of multiple second lamp beads is taken as the light-emitting angle of the second lamp bead.
[0124] In some embodiments, in order not to cause the uneven distribution of the light net of the infrared touch screen due to the different light-emitting angles of the second lamp bead, the second preset angles of the second lamp bead are the same. Therefore, the light-emitting angle of any second lamp bead can be directly obtained without calculating the second mean value.
[0125] It should be noted that whether the preset angle of the second lamp bead is the same or not, the light-emitting angle is preset. Therefore, the second preset angle of each second lamp bead is stored. After determining the second lamp bead corresponding to the light net area corresponding to the maximum pixel mean value, in response to the light-emitting angle of the second lamp bead being the same, the light-emitting angle of any second lamp bead can be directly accessed and obtained by accessing the storage. In response to the light-emitting angle of the second lamp bead being different, the second preset angle of any second lamp bead is obtained by accessing the storage, and the mean value of the preset angles of the second lamp beads is calculated to obtain the second mean value.
[0126] In some embodiments, the first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean moves a first distance in the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean; wherein the first distance is not greater than half of the maximum distance of the first collection field of view.
[0127] For example, the first collection field of view is a square, and the maximum distance is the side length of the square. The first collection field of view is a circle, and the maximum distance is the diameter of the circle.
[0128] In some embodiments, the first distance is not greater than the difference between the spacing between the first lamp beads and the spacing between the second lamp beads. It can be understood that the infrared light emitted by the first lamp bead forms a light mesh area corresponding to the minimum pixel area, and the smaller the pixel mean, the more dense the light mesh distribution, and the smaller the spacing of the corresponding first lamp bead. Similarly, the spacing of the corresponding second lamp bead is larger. If the moving distance is too large, the light mesh area with the minimum pixel value and the light mesh area with the maximum pixel value may be reversed, which cannot make the light mesh distribution uniform, and if the moving distance is too small, it cannot effectively adjust the light mesh distribution. By limiting the moving distance of the first lamp bead to be not greater than the difference between the spacing between the first lamp beads and the spacing between the second lamp beads, the light mesh can be effectively adjusted, and the light mesh distribution of the light mesh area corresponding to the minimum pixel value and the light mesh distribution of the light mesh area corresponding to the maximum pixel value will not be reversed.
[0129] It can be understood that the size of the first collection field of view is very small relative to the size of the light mesh image, and if the moving distance of the first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean to the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean is too large, it may be counterproductive, making the light mesh distribution of the light mesh area corresponding to the minimum pixel mean too sparse, and if the moving distance is too small, it may not meet the requirement of making the light mesh distribution of the light mesh area corresponding to the minimum pixel mean sparse, thereby failing to meet the requirement of making the light mesh distribution of the entire light mesh image uniform. In order to meet the above requirements, the number of times of moving the corresponding lamp bead will increase too much, thereby wasting resources. By setting the maximum distance of the first collection field of view as the first preset moving distance, the moving distance will not be too large, and the number of times of moving the lamp bead will be minimized.
[0130] In some embodiments, the first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean moves in the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean, and then comprises:
[0131] redetermining a new difference between the new maximum pixel mean and the new minimum pixel mean of the pixel means of the plurality of light mesh areas;
[0132] The new difference value is compared with a preset pixel value difference threshold value until the new difference value is less than the preset pixel value difference threshold value or the lamp bead moves more than a first number of times.
[0133] It can be understood that after the new difference value is compared with the preset pixel value difference threshold value, if the new difference value is greater than or equal to the preset pixel value difference threshold value, the lamp bead corresponding to the light mesh area of the new minimum pixel mean value also needs to be moved to the light mesh area corresponding to the maximum pixel mean value. The moving distance is also the first distance.
[0134] It should be noted that when the lamp bead moves more than the first number of times, the lamp bead is no longer moved. For example, the first number of times is twenty times. When the lamp bead moves more than twenty times, the current infrared touch screen lamp bead arrangement basically cannot meet the adjustment needs, or the uniform distribution of the light mesh cannot be achieved by adjusting the lamp bead.
[0135] It should be noted that the method of the embodiment of the present application can be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scenario, and be completed by multiple devices cooperating with each other. In this distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiment of the present application, and the multiple devices can interact with each other to complete the method.
[0136] It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than those described above and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0137] Based on the same technical concept, the present application also provides an infrared touch screen lamp bead arrangement device corresponding to the method of any of the above embodiments.
[0138] Reference Figure 8 , the infrared touch screen lamp bead arrangement device comprises:
[0139] The light mesh image conversion module 801 is configured to obtain a light mesh image of an infrared touch screen.
[0140] The light mesh area division module 802 is configured to divide the single-channel light mesh image into a plurality of light mesh areas and calculate the pixel mean value of each light mesh area.
[0141] The pixel value judgment module 803 is configured to determine a difference between the maximum pixel mean value and the minimum pixel mean value in the pixel means, and judge whether the difference is greater than or equal to a preset pixel value difference threshold.
[0142] The lamp bead position adjustment module 804 is configured to, in response to the difference being greater than or equal to the preset pixel value difference threshold, move a first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean value to a second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean value.
[0143] In some embodiments, the lamp bead position adjustment module 804 is further configured to:
[0144] obtain an out-lighting angle of the first lamp bead;
[0145] determine the light mesh area corresponding to the minimum pixel mean value;
[0146] establish a first mapping area of the light mesh area corresponding to the minimum pixel mean value on the single-channel image with the center of the light mesh area corresponding to the minimum pixel mean value as an intersection point and the out-lighting angle of the first lamp bead as a first included angle, and an angle bisector of the first included angle is perpendicular to a boundary of the single-channel image;
[0147] move the first lamp bead corresponding to the first mapping area to the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean value.
[0148] Further, the lamp bead position adjustment module 804 is further configured to:
[0149] obtain preset angles of all first lamp beads;
[0150] calculate a mean value of the preset angles;
[0151] use the mean value as the out-lighting angle of the first lamp bead.
[0152] In some embodiments, the lamp bead position adjustment module 804 is configured to:
[0153] obtain an out-lighting angle of the second lamp bead;
[0154] establish a second mapping area of the light mesh area corresponding to the maximum pixel mean value on the single-channel image with the center of the light mesh area corresponding to the maximum pixel mean value as an intersection point and the out-lighting angle of the second lamp bead as a second included angle, and an angle bisector of the second included angle is perpendicular to a boundary of the single-channel image;
[0155] move the first lamp bead to the second lamp bead corresponding to the second mapping area.
[0156] Further, the lamp bead position adjustment module 804 is further configured to:
[0157] obtain preset angles of all second lamp beads;
[0158] Calculate the mean value of the preset angle;
[0159] The mean value is used as the light-emitting angle of the second lamp bead.
[0160] In some embodiments, the light mesh region division module 802 is further configured to: traverse the light mesh image by the preset first collection field of view, divide the light mesh image into a plurality of light mesh regions; and
[0161] Collect the pixel value of each pixel point in each light mesh region;
[0162] According to the pixel value of each pixel point, calculate the average pixel value of each pixel point;
[0163] The average pixel value is used as the pixel mean value of the light mesh region.
[0164] In some embodiments, the pixel value judgment module 803 is further configured to: re-determine a new difference value between a new maximum pixel mean value and a new minimum pixel mean value in the pixel mean values of the plurality of light mesh regions;
[0165] Compare the new difference value with the preset pixel value difference threshold value until the new difference value is less than the preset pixel value difference threshold value or the lamp bead moves more than the first number of times.
[0166] For the convenience of description, the above device is described as various modules described respectively in terms of functions. Of course, in the implementation of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0167] The device of the above embodiment is used to implement the corresponding infrared touch screen lamp bead arrangement method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described here.
[0168] Based on the same technical concept, corresponding to the method of any of the above embodiments, the present application also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the infrared touch screen lamp bead arrangement method of any of the above embodiments.
[0169] Figure 9 A more specific hardware structure of an electronic device is shown, which can include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 for communication within the device.
[0170] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, etc., for executing relevant programs to implement the technical solutions provided by the embodiments of the present specification.
[0171] The memory 1020 can be implemented by a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs, and when the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called and executed by the processor 1010.
[0172] The input / output interface 1030 is configured to connect input / output modules to implement information input and output. The input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input devices can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices can include a display, a speaker, a vibrator, an indicator light, etc.
[0173] The communication interface 1040 is configured to connect a communication module (not shown in the figure) to implement the communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0174] The bus 1050 includes a channel for transmitting information between various components (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.
[0175] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only include the components necessary to implement the solutions of the embodiments of the present specification, and does not have to include all the components shown in the figure.
[0176] The electronic device of the above embodiment is used to implement the corresponding infrared touch screen lamp bead arrangement method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0177] Based on the same technical concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the infrared touch screen lamp bead arrangement method according to any of the above embodiments.
[0178] The computer-readable medium of the present embodiment includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0179] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to perform the infrared touch screen lamp bead arrangement method according to any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0180] Those skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including claims) is limited to these examples; under the idea of the present application, the above embodiments or technical features in different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of different aspects of the embodiments of the present application as described above. In order to be brief, they are not provided in detail.
[0181] Additionally, to simplify the description and discussion, and so as not to obscure the embodiments of the application being presented, the well-known functions or constructions of integrated circuit (IC) chips and other components can or can not be shown in the figures and will be omitted as not to unnecessarily obscure the embodiments of the application being presented. Moreover, the devices can be shown in block diagram form in order to avoid obscuring the embodiments of the application, and this also acknowledges the fact that the details in regard to the implementation of the block diagram devices are highly dependent on the platform within which the embodiments of the application are to be implemented (i.e., these details should be well within the purview of one of ordinary skill in the art). Where specific details are set forth in order to describe an illustrative embodiment of the application, it will be apparent to one of ordinary skill in the art that the embodiments of the application can be practiced without, or with variation of, these specific details. Thus, the description is to be considered as illustrative only and not restrictive in nature.
[0182] While the application has been described in connection with specific embodiments thereof, it will be understood that many modifications, substitutions and changes will be apparent to those of ordinary skill in the art once they have the benefit of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) can use the embodiments discussed.
[0183] It is intended that the embodiments of the application embrace all such alternatives, modifications and variations as falling within the broad scope of the appended claims. Accordingly, any and all such modifications, variations or equivalents that fall within the spirit and scope of the embodiments of the application should be intended to be embraced by the claims.
Claims
1. An infrared touch screen lamp bead arrangement method, characterized in that, The method comprises: acquiring a light mesh image of an infrared touch screen; dividing the light mesh image into a plurality of light mesh regions, and calculating a pixel mean value of each light mesh region; determining a difference between a maximum pixel mean value and a minimum pixel mean value in the pixel mean values, and judging whether the difference is greater than or equal to a preset pixel value difference threshold; in response to the difference being greater than or equal to the preset pixel value difference threshold, moving a first lamp bead corresponding to the light mesh region corresponding to the minimum pixel mean value to a second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean value; the moving the first lamp bead corresponding to the light mesh region corresponding to the minimum pixel mean value to the second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean value in response to the difference being greater than or equal to the preset pixel value difference threshold comprises: acquiring an emitting angle of the first lamp bead; determining the light mesh region corresponding to the minimum pixel mean value; establishing a first mapping region of the light mesh region corresponding to the minimum pixel mean value on the light mesh image by taking the center of the light mesh region corresponding to the minimum pixel mean value as an intersection point and taking the emitting angle of the first lamp bead as a first included angle, wherein an angle bisector of the first included angle is perpendicular to a boundary of the light mesh image; moving the first lamp bead corresponding to the first mapping region to the second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean value; and / or, comprising: acquiring an emitting angle of the second lamp bead; determining the light mesh region corresponding to the maximum pixel mean value; establishing a second mapping region of the light mesh region corresponding to the maximum pixel mean value on the light mesh image by taking the center of the light mesh region corresponding to the maximum pixel mean value as an intersection point and taking the emitting angle of the second lamp bead as a second included angle, wherein an angle bisector of the second included angle is perpendicular to the boundary of the light mesh image; moving the first lamp bead to the second lamp bead corresponding to the second mapping region.
2. The method of claim 1, wherein, in response to the first lamp bead being a plurality of lamp beads; the acquiring the emitting angle of the first lamp bead comprises: acquiring a first preset angle of all the first lamp beads; calculating a mean value of the first preset angle to obtain a first mean value; taking the first mean value as the emitting angle of the first lamp bead.
3. The method of claim 1, wherein, in response to the second lamp bead being a plurality of lamp beads; the acquiring the emitting angle of the second lamp bead comprises: acquiring a second preset angle of all the second lamp beads; calculating a mean value of the second preset angle to obtain a second mean value; taking the second mean value as the emitting angle of the second lamp bead.
4. The method of claim 1, wherein, the dividing the light mesh image into a plurality of light mesh regions and calculating a pixel mean value of each light mesh region comprises: traversing the light mesh image through a preset first collection field of view, and dividing the light mesh image into a plurality of light mesh regions; collecting a pixel value of each pixel point in each light mesh region; calculating an average pixel value of each light mesh region according to the pixel value of each pixel point; taking the average pixel value as the pixel mean value of the light mesh region.
5. The method of claim 4, wherein, the moving the first lamp bead corresponding to the light mesh region corresponding to the minimum pixel mean value to the second lamp bead corresponding to the light mesh region corresponding to the maximum pixel mean value in response to the difference being greater than or equal to the preset pixel value difference threshold comprises: In response to the difference being greater than or equal to a preset pixel value difference threshold, moving a first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean in a direction of a second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean by a first distance; wherein the first distance is not greater than half of the maximum distance of the first collection field of view.
6. The method of claim 1, wherein, The moving of the first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean in the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean, and then comprising: redetermining a new difference between a new maximum pixel mean and a new minimum pixel mean of the pixel means of the light mesh areas; comparing the new difference with the preset pixel value difference threshold until the new difference is less than the preset pixel value difference threshold or the lamp bead is moved more than a first number of times.
7. An infrared touch screen lamp bead arrangement device, characterized in that, comprising: a light mesh image conversion module configured to acquire a light mesh image of an infrared touch screen; a light mesh area division module configured to divide the light mesh image into a plurality of light mesh areas and calculate pixel means of the light mesh areas; a pixel value judgment module configured to determine a difference between a maximum pixel mean and a minimum pixel mean of the pixel means and judge whether the difference is greater than or equal to a preset pixel value difference threshold; a lamp bead position adjustment module configured to, in response to the difference being greater than or equal to the preset pixel value difference threshold, move a first lamp bead corresponding to the light mesh area corresponding to the minimum pixel mean in a direction of a second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean; the lamp bead position adjustment module is specifically configured to: acquire an emission angle of the first lamp bead; determine the light mesh area corresponding to the minimum pixel mean; establish a first mapping area of the light mesh area corresponding to the minimum pixel mean on the light mesh image with the center of the light mesh area corresponding to the minimum pixel mean as an intersection point and the emission angle of the first lamp bead as a first included angle; an angle bisector of the first included angle is perpendicular to the boundary of the light mesh image; move the first lamp bead corresponding to the first mapping area in the direction of the second lamp bead corresponding to the light mesh area corresponding to the maximum pixel mean; and / or is specifically configured to: acquire an emission angle of the second lamp bead; determine the light mesh area corresponding to the maximum pixel mean; establish a second mapping area of the light mesh area corresponding to the maximum pixel mean on the light mesh image with the center of the light mesh area corresponding to the maximum pixel mean as an intersection point and the emission angle of the second lamp bead as a second included angle; an angle bisector of the second included angle is perpendicular to the boundary of the light mesh image; move the first lamp bead in the direction of the second lamp bead corresponding to the second mapping area.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1 to 6 when executing the program.
Citation Information
Patent Citations
Infrared touch screen lamp tube layout detection method and related device
CN114201790A
Image adjustment based on locally flat scenes
US20160156858A1