A multi-section programmable lightbar brightness control system
Patent Information
- Application Number
- CN202610774210.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-09-25
AI Technical Summary
传统系统对灯条下方区域中物体的轮廓捕捉能力不足,往往难以有效过滤环境干扰因素,导致边界信息提取存在偏差,进而使得映射至灯条空间坐标系的位置坐标数据准确性欠佳
1.本发明通过轮廓定位模块的帧间差分、边缘检测及多边形拟合等步骤,结合区域像素面积精准计算,能有效过滤噪声干扰,准确获取物体边界与位置坐标;区段划定模块基于坐标数据匹配灯珠分布信息,整合连续灯珠并剔除孤立灯珠,使目标灯珠区段界定更贴合物体实际覆盖范围,让亮度控制聚焦需求区域,避免无效照明。
Smart Images

Figure CN122825299A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of light bar control technology, and in particular to a multi-segment programmable light bar brightness control system. Background Technology
[0002] In the field of brightness control for multi-segment programmable LED strips, existing technologies have significant shortcomings in the accuracy of object positioning and matching of LED segments. Traditional systems lack the ability to capture the contours of objects in the area below the LED strip, often failing to effectively filter environmental interference factors. This leads to deviations in boundary information extraction, resulting in inaccurate positional coordinate data mapped to the LED strip's spatial coordinate system. This problem directly causes a lack of specificity in defining target LED segments, making it impossible to accurately match the actual spatial coverage of objects. Ultimately, this results in brightness control failing to focus on the desired area, affecting the rationality and adaptability of the overall lighting effect.
[0003] Meanwhile, existing technologies lack sufficient brightness control response capabilities in dynamic scenarios, making efficient real-time adjustments difficult. When object positions change, traditional systems exhibit low sensitivity to positional shifts, lag in segment updates, and a lack of coordination in adjusting existing brightness control commands. Furthermore, some technologies fail to fully integrate the segment structure of the light strip with the characteristics of the lighting scene during brightness parameter parsing and command encoding, resulting in insufficient adaptability between drive signals and control commands. This not only reduces the dynamic adaptability of light strip brightness control but also hinders the full realization of the advantages of multi-segment programmability, ultimately failing to meet the overall control efficiency and stability requirements of practical applications. Summary of the Invention
[0004] To achieve the above objectives, the present invention provides a multi-segment programmable light strip brightness control system, characterized in that the system includes a contour positioning module, a segment delineation module, a brightness analysis module, an instruction generation module, a tracking and update module, and an instruction adjustment module, wherein: The contour localization module is used to perform region contour fitting on a continuous image sequence of an object in the area below the target light bar to obtain the boundary information of the object, and to map the boundary information to the spatial coordinate system of the target light bar to obtain the position coordinate data of the object. The segment delineation module is used to define the target LED segment of the object on the target LED strip based on the position coordinate data. The brightness analysis module is used to analyze the brightness parameters of the target LED bead section to obtain the display drive signal of the target LED strip; The instruction generation module is used to map and encode the display driving signal based on the display control logic of the target light strip to obtain the segment display control instruction of the target light strip; The tracking and updating module is used to monitor the position changes of the object, obtain the real-time position coordinate data of the object, and update the target LED segment based on the real-time position coordinate data. The instruction adjustment module is used to make targeted adjustments to the display control instructions of the target LED segment based on the updated target LED segment, so as to obtain the dynamic display control instructions of the target LED strip.
[0005] In a preferred embodiment, when the contour localization module performs region contour fitting on a continuous image sequence of an object in the region below the target light strip to obtain the boundary information of the object, and maps the boundary information to the spatial coordinate system of the target light strip to obtain the position coordinate data of the object, it is specifically used for: Obtain a continuous image sequence of objects in the region below the target light strip; Perform inter-frame difference on the continuous image sequence to obtain the foreground region of the object contained in the continuous image sequence; Edge detection is performed on the foreground region to obtain the initial contour information of the object; The initial contour information is subjected to polygon approximation fitting to obtain the boundary information of the object; According to the preset planar projection mapping relationship, the boundary information is mapped to the spatial coordinate system of the target light strip to obtain the position coordinate data of the object.
[0006] In a preferred embodiment, when the contour localization module performs inter-frame differencing on the continuous image sequence to obtain a foreground region containing the object in the continuous image sequence, it is specifically used for: In chronological order, two adjacent original images from the continuous image sequence are extracted as the original frame image and the reference frame image; The original frame image and the reference frame image are adjusted in grayscale to obtain the enhanced frame image of the object and the enhanced reference frame image. Pixel difference statistics are performed on the enhanced frame image and the reference frame enhanced image to obtain the initial difference image of the object; Abnormal noise data is removed from the initial difference image to obtain a binarized difference image of the object; The distribution area of interconnected pixel regions in the binarized difference image is calculated to obtain the region pixel area of the interconnected pixel regions; From the interconnected pixel regions, select the connected regions whose pixel area exceeds a preset minimum area threshold, and use the connected regions as the foreground region of the object.
[0007] In a preferred embodiment, the formula for calculating the area of the region pixels is as follows: ; In the formula, This represents the pixel area of the region. This represents the total number of pixels in the interconnected pixel regions. This represents the preset basic area unit coefficient. This represents the preset edge gradient weight coefficient used to control the degree to which the edge intensity at the location of a pixel affects its area contribution. Indicates the first pixel in the interconnected pixel region The edge gradient magnitude of each pixel This represents the maximum value among the edge gradient magnitudes. This represents a preset temporal stability coefficient used to control the impact of the historical frequency of pixel occurrences on the area contribution of the current frame. Indicates the first pixel in the interconnected pixel region Temporal stability factor for each pixel.
[0008] In a preferred embodiment, when the segment delineation module defines the target LED segment of the object on the target LED strip based on the position coordinate data, it is specifically used for: The spatial coverage area of the object is determined based on the extreme values of the object's boundary coordinates in the location coordinate data. The distribution and association information of the LED beads on the target light strip are analyzed to obtain the spatial position identifiers and coordinate mapping relationships of the LED beads on the target light strip; The spatial coverage area is associated and matched with the coordinate mapping relationship to filter out the set of LED beads on the target light strip that are within the spatial coverage area; Based on the spatial position identifiers of the LEDs in the LED set, the LEDs are integrated into continuous segments according to the arrangement order of the target LED strip to obtain the initial LED segments of the target LED strip; By removing isolated LED beads from the initial LED bead segment that are not related to the spatial coverage of the object, the target LED bead segment corresponding to the object is obtained.
[0009] In a preferred embodiment, when the brightness analysis module performs brightness parameter analysis on the target LED bead segment to obtain the display drive signal for the target LED strip, it is specifically used for: Extract the lighting scene parameters of the target LED segment; The number of LEDs in the target LED segment and the arrangement order of the LEDs on the target LED strip are integrated into the segment structure description information of the target LED segment; By performing a synergistic coupling analysis on the lighting scene parameters and the section structure description information, the initial brightness driving parameter set of the target LED section is obtained; Based on the communication protocol format of the target light strip, the initial brightness driving parameter set is encoded and encapsulated to obtain the display driving signal of the target light strip.
[0010] In a preferred embodiment, when the instruction generation module executes the display control logic based on the target light strip and maps and encodes the display driving signal to obtain the segment display control instruction for the target light strip, it is specifically used for: The display driving signal is parsed to extract the brightness parameter data and the corresponding target LED segment identifier from the display driving signal; Based on the instruction mapping relationship table of the target light strip in the display control logic, the brightness parameter data is mapped and matched to obtain the pulse width control instruction of the brightness parameter data; Based on the pulse width control command, the brightness parameter data is converted into a data format to obtain the pulse width modulation duty cycle data of the target light strip; According to the serial communication data frame format of the target light strip, the target light bead segment identifier and the pulse width modulation duty cycle data are integrated into the original control data packet of the target light strip; A frame header, checksum, and frame trailer are added to the original control data packet to generate the segment display control command for the target light strip.
[0011] In a preferred embodiment, when the tracking and updating module monitors the position changes of the object, obtains the real-time position coordinate data of the object, and updates the target LED segment based on the real-time position coordinate data, it is specifically used for: Continuously acquire real-time image sequences of the area below the target light strip; Edge detection analysis is performed on single-frame images in the real-time image sequence to obtain the real-time boundary information of the object; The real-time boundary information is compared with the boundary information by feature point comparison to determine the position offset vector of the object in the real-time image sequence. Based on the position offset vector, the position coordinate data is translated and corrected to obtain the real-time position coordinate data of the object; The real-time position coordinate data is mapped to the spatial coordinate system of the target light bar to obtain the updated mapped coordinates of the object; Based on the updated mapping coordinates, determine the set of LED positions on the target LED corresponding to the updated mapping coordinates, and define the continuous LED interval covered by the set of LED positions as the updated target LED segment.
[0012] In a preferred embodiment, when the tracking update module performs feature point comparison between the real-time boundary information and the boundary information to determine the position offset vector of the object in the real-time image sequence, it is specifically used for: Key point detection is performed on the object contour in the real-time boundary information to identify the corner points and curvature convex points in the object contour, thereby obtaining the real-time feature point set of the object. The real-time image sequence of the object is backtracked to obtain the historical feature point set of the object; Using historical feature points in the historical feature point set as reference templates, grayscale similarity matching is performed on real-time feature points in the real-time feature point set to obtain the feature matching result of the real-time feature point set. Based on the feature matching results, a stable set of correspondences between the historical feature points and the real-time feature points is established. The coordinate changes of the stable correspondence pairs of concentrated feature points are analyzed by least squares fitting, and the two-dimensional translation vector in the analysis result is determined as the position offset vector of the real-time image sequence.
[0013] In a preferred embodiment, when the instruction adjustment module performs targeted adjustments to the display control instruction for the target LED segment based on the updated target LED segment to obtain the dynamic display control instruction for the target LED strip, it is specifically used for: Read the latest display drive signal in the updated target LED segment; The segment display control command is decoded and extracted to obtain the old brightness parameter data and old lamp segment identifier of the updated target lamp segment; The old brightness parameter data is compared and fused with the target brightness parameter in the latest display driving signal to obtain the fused brightness parameter data of the updated target LED segment; Based on the updated physical location range of the updated LED beads in the updated target LED bead segment, the corresponding updated segment identifier is regenerated, and a mapping relationship is established between the updated segment identifier and the fused brightness parameter data; Based on the mapping relationship, and according to the control data frame format of the target light bar, the fused brightness parameter data is encapsulated and encoded a second time to obtain the dynamic display control command of the target light bar.
[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention, through the steps of inter-frame difference, edge detection, and polygon fitting in the contour positioning module, combined with precise calculation of the region pixel area, can effectively filter noise interference and accurately obtain the object boundary and position coordinates; the segment delineation module matches the LED distribution information based on coordinate data, integrates continuous LEDs and removes isolated LEDs, so that the target LED segment definition is more in line with the actual coverage range of the object, allowing brightness control to focus on the required area and avoid ineffective lighting.
[0015] 2. This invention captures the object's position shift and updates the LED segments in real time through feature point comparison and least squares fitting; the instruction adjustment module integrates the old and new brightness parameters and re-encodes and generates dynamic control instructions to achieve real-time linkage between brightness control and object position changes, solving the problems of lagging segment updates and uncoordinated instruction adjustments in traditional systems, and significantly improving the control stability and efficiency of multi-segment programmable LED strips in dynamic scenarios. Attached Figure Description
[0016] Figure 1 A system architecture diagram of a multi-segment programmable light bar brightness control system provided in an embodiment of the present invention; The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments belong to some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “said” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.
[0019] Depending on the context, the word "if" or "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0020] Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.
[0021] In practice, the server-side equipment deployed in a multi-segment programmable light strip brightness control system may consist of one or more devices. This multi-segment programmable light strip brightness control system can be implemented as a business instance, a virtual machine, or hardware devices. For example, it can be implemented as a business instance deployed on one or more devices in a cloud node. Simply put, it can be understood as software deployed on a cloud node, providing a multi-segment programmable light strip brightness control system to each user terminal. Alternatively, it can be implemented as a virtual machine deployed on one or more devices in a cloud node, with application software installed to manage each user terminal. Or, it can also be implemented as a server composed of numerous identical or different types of hardware devices, with one or more hardware devices configured to provide a multi-segment programmable light strip brightness control system to each user terminal.
[0022] In terms of implementation, a multi-segment programmable light strip brightness control system and a user terminal are mutually compatible. That is, if the multi-segment programmable light strip brightness control system is implemented as an application installed on a cloud service platform, then the user terminal is a client that establishes a communication connection with the application; or if the multi-segment programmable light strip brightness control system is implemented as a website, then the user terminal is implemented as a webpage; or if the multi-segment programmable light strip brightness control system is implemented as a cloud service platform, then the user terminal is implemented as a mini-program in an instant messaging application.
[0023] like Figure 1 The diagram shown is a system architecture diagram of a multi-segment programmable light bar brightness control system provided in an embodiment of the present invention.
[0024] The multi-segment programmable light strip brightness control system 100 described in this invention can be located on a cloud server. In terms of implementation, it can function as one or more service devices, or as an application installed on the cloud (e.g., a mobile service operator's server, server cluster, etc.), or it can be developed into a website. Depending on the functions implemented, the multi-segment programmable light strip brightness control system 100 may include a contour positioning module 101, a segment delineation module 102, a brightness analysis module 103, an instruction generation module 104, a tracking and update module 105, and an instruction adjustment module 106. The module described in this invention can also be called a unit, referring to a series of computer program segments that can be executed by the processor of an electronic device and perform a fixed function, stored in the memory of the electronic device.
[0025] In this embodiment of the invention, in a multi-segment programmable light strip brightness control system, each of the above-mentioned modules can be implemented independently and called upon other modules. Here, "called upon" can be understood as a module connecting to multiple modules of another type and providing corresponding services to those connected modules. In the multi-segment programmable light strip brightness control system provided by this embodiment of the invention, the applicable scope of the multi-segment programmable light strip brightness control system architecture can be adjusted by adding modules and directly calling them without modifying the program code, achieving cluster-based horizontal expansion to quickly and flexibly expand the multi-segment programmable light strip brightness control system. In practical applications, the above modules can be set in the same device or different devices, or they can be set in a virtual device, such as a service instance in a cloud server.
[0026] The following describes, with reference to specific embodiments, each component and its specific workflow of a multi-segment programmable light bar brightness control system: The contour localization module is used to perform region contour fitting on a continuous image sequence of an object in the area below the target light bar to obtain the boundary information of the object, and to map the boundary information to the spatial coordinate system of the target light bar to obtain the position coordinate data of the object. In this embodiment of the invention, when the contour localization module performs region contour fitting on a continuous image sequence of an object in the area below the target light strip to obtain the boundary information of the object, and maps the boundary information to the spatial coordinate system of the target light strip to obtain the position coordinate data of the object, it is specifically used for: Obtain a continuous image sequence of objects in the region below the target light strip; Perform inter-frame difference on the continuous image sequence to obtain the foreground region of the object contained in the continuous image sequence; Edge detection is performed on the foreground region to obtain the initial contour information of the object; The initial contour information is subjected to polygon approximation fitting to obtain the boundary information of the object; According to the preset planar projection mapping relationship, the boundary information is mapped to the spatial coordinate system of the target light strip to obtain the position coordinate data of the object.
[0027] When the contour localization module performs inter-frame differencing on the continuous image sequence to obtain the foreground region containing the object in the continuous image sequence, it is specifically used for: In chronological order, two adjacent original images from the continuous image sequence are extracted as the original frame image and the reference frame image; The original frame image and the reference frame image are adjusted in grayscale to obtain the enhanced frame image of the object and the enhanced reference frame image. Pixel difference statistics are performed on the enhanced frame image and the reference frame enhanced image to obtain the initial difference image of the object; Abnormal noise data is removed from the initial difference image to obtain a binarized difference image of the object; The distribution area of interconnected pixel regions in the binarized difference image is calculated to obtain the region pixel area of the interconnected pixel regions; From the interconnected pixel regions, select the connected regions whose pixel area exceeds a preset minimum area threshold, and use the connected regions as the foreground region of the object.
[0028] The formula for calculating the pixel area of the region is as follows: ; In the formula, This represents the pixel area of the region. This represents the total number of pixels in the interconnected pixel regions. This represents the preset basic area unit coefficient. This represents the preset edge gradient weight coefficient used to control the degree to which the edge intensity at the location of a pixel affects its area contribution. Indicates the first pixel in the interconnected pixel region The edge gradient magnitude of each pixel This represents the maximum value among the edge gradient magnitudes. This represents a preset temporal stability coefficient used to control the impact of the historical frequency of pixel occurrences on the area contribution of the current frame. Indicates the first pixel in the interconnected pixel region Temporal stability factor for each pixel.
[0029] The total number of pixels in interconnected pixel regions comes from the interconnected pixel regions in the binary difference image. The calculation is implemented by starting from any pixel in an interconnected pixel region, traversing all pixels in the region row by row and column by column, and uniquely marking each pixel to avoid duplication or omission. After the traversal is completed, the number of marked pixels is counted, and the resulting value is the total number of pixels in interconnected pixel regions. This value has no threshold limit and its size is determined by the actual range of the interconnected pixel regions.
[0030] The preset base area unit coefficient is derived from the pixel resolution of the image acquisition device and the mapping relationship between the actual physical area of the area below the target light bar and the image pixel area. The calculation is implemented by first measuring the actual physical area of the area below the target light bar, then counting the total number of pixels corresponding to this area in the image, dividing the actual physical area by the total number of corresponding pixels to obtain the basic value of the physical area corresponding to a single pixel, and setting this basic value as the preset base area unit coefficient. The preset base area unit coefficient has no threshold limit, its value is fixed and bound to the parameters of the device and the monitoring area.
[0031] The preset edge gradient weight coefficient, used to control the influence of edge intensity on the area contribution of a pixel, is pre-set based on the requirements of the object's edge region on area calculation. The calculation is implemented by repeatedly testing the reasonable contribution of the object's edge to the area result in different scenarios, and determining a fixed coefficient value as the edge gradient weight coefficient. Usually, the value of this coefficient is between 0 and 1. This range is a threshold set based on the reasonable influence of edge intensity on area contribution, ensuring that the adjustment of the edge gradient on the area does not deviate excessively from the actual situation.
[0032] The first in interconnected pixel regions The edge gradient magnitude of the nth pixel originates from the nth pixel within the interconnected pixel region. The calculation is performed on the nth pixel. The brightness values of the four adjacent pixels (top, bottom, left, and right) of the i-th pixel are collected, and the brightness values of the i-th pixel are calculated respectively. The edge gradient magnitude of a pixel is determined by the brightness difference between each pixel and its neighboring pixels. The maximum value among these brightness differences is taken as the edge gradient magnitude of that pixel. The threshold of the edge gradient magnitude is determined by the brightness range of the image. For example, when the image brightness ranges from 0 to 255, the threshold range of the edge gradient magnitude is 0 to 255.
[0033] The maximum value of the edge gradient magnitude comes from the edge gradient magnitude of all pixels in the interconnected pixel region. The calculation is implemented by traversing each pixel in the interconnected pixel region, collecting the edge gradient magnitude corresponding to each pixel, comparing these edge gradient magnitudes, and selecting the edge gradient magnitude with the largest value as the maximum value of the edge gradient magnitude. The threshold of this maximum value is the same as the edge gradient magnitude and is determined by the range of image brightness values.
[0034] The preset temporal stability coefficient, used to control the impact of historical pixel occurrence frequency on the area contribution of the current frame, is pre-set based on the requirement of the impact of historical pixel occurrence frequency on the current area calculation. The calculation is implemented by repeatedly testing the reasonable contribution of pixel occurrence frequency to the area result under different temporal sequences, and determining a fixed coefficient value as the temporal stability coefficient. Typically, the value of this coefficient is between 0 and 0.5. This range is a threshold set based on the reasonable impact of temporal stability on the area contribution, avoiding excessive adjustment of the current area by historical frequency.
[0035] The first in interconnected pixel regions The temporal stability factor of the nth pixel originates from the nth pixel within the interconnected pixel region. The calculation of the occurrence of a pixel in a continuous image sequence involves retrieving multiple previous frames from the sequence and checking each frame for a match with the current pixel. For each pixel whose position and display state are consistent, count the number of image frames in which the pixel exists. Divide this number of frames by the total number of image frames retrieved previously. The resulting ratio is the temporal stability factor of the pixel. The threshold range of the temporal stability factor is 0 to 1, where 0 indicates that the pixel has never appeared in previous frames, and 1 indicates that the pixel has appeared in all previous frames.
[0036] The significance of this formula is to calculate the area of a region of interconnected pixels. First, it adjusts the area contribution of each pixel due to edge intensity by combining the ratio of the edge gradient magnitude to the maximum edge gradient magnitude with the edge gradient weight coefficient. Then, it adjusts the area contribution of each pixel due to historical frequency by combining the temporal stability factor with the temporal stability coefficient. After that, it multiplies the basic area unit coefficient of each pixel with the results of these two adjustments to obtain the actual area contribution of a single pixel. Finally, it adds up the actual area contributions of all pixels in the interconnected pixel region to obtain the area of the region, making the calculated area of the region more closely resemble the actual area of the object region in the real scene.
[0037] When the first pixel region is interconnected When the edge gradient magnitude of a pixel increases, the ratio of its corresponding edge gradient magnitude to the maximum edge gradient magnitude increases. This, combined with the adjustment result after considering the edge gradient weighting coefficient, also increases, leading to a greater actual area contribution from a single pixel and ultimately an increase in the area of the region. When the th pixel in a connected pixel region... When the temporal stability factor of a pixel increases, the adjustment result of that pixel after combining the temporal stability coefficient will increase, the actual area contribution of a single pixel will increase accordingly, and the final pixel area of the region will increase accordingly. When the total number of pixels in interconnected pixel regions increases, the number of pixels participating in the addition of area contributions will increase, and the final pixel area of the region will increase accordingly.
[0038] Use an image acquisition device to aim at the designated area below the target light strip. First, adjust the device's position and angle to ensure that the device's field of view can completely cover the entire area to be monitored below the target light strip, and keep the distance between the device and the area stable to avoid inconsistent image clarity due to changes in distance. Then, start the device's continuous capture function. The device continuously captures images of objects in the area at a fixed rhythm. Each time a capture action is completed, a complete image containing the object is acquired. These multiple images, arranged in chronological order of capture time, are integrated together to form a continuous image sequence.
[0039] All images in a continuous image sequence are sorted according to the timestamp information generated when the image acquisition device captures the image. The timestamp information accurately records the capture time of each image. All images are arranged in order according to the chronological order of the timestamps. Two adjacent images are selected from the arranged images. Adjacent means that there are no other images in the time sequence. The image captured later is the original frame image, and the image captured first that is adjacent to the original frame image is the reference frame image.
[0040] Grayscale adjustment operations are performed on both the original frame image and the reference frame image. When processing the original frame image, each pixel in the image is observed one by one. Based on the original brightness of the pixels, the brightness of insufficient pixels is gradually increased, and the brightness of excessively bright pixels is gradually decreased, so that the brightness distribution of the entire image is more uniform and the outlines and details of objects are more clearly presented in the image. After such adjustment, the original frame image is transformed into an enhanced frame image. When processing the reference frame image, the same method is used as for processing the original frame image. The brightness of each pixel in the reference frame image is adjusted one by one. By increasing the brightness of insufficient pixels and decreasing the brightness of excessively bright pixels, the outlines and details of objects in the reference frame image are made clearer. The adjusted reference frame image is transformed into a reference frame enhanced image.
[0041] The enhanced frame image and the reference enhanced frame image are placed in a completely overlapping manner, with the top left corner of the enhanced frame image aligned with the top left corner of the reference enhanced frame image. This ensures that the pixel arrangement of the two images is completely consistent, and the relative position of each pixel in the two images corresponds completely. Then, the brightness of corresponding pixels in the two images is compared one by one. The difference in brightness of each group of corresponding pixels is carefully observed and recorded. Finally, the brightness differences of all corresponding pixels are presented in the form of an image. The display state of each pixel in the image directly reflects the brightness difference between the two groups of pixels corresponding to that position. The image formed in this way is the initial difference image.
[0042] Carefully observe the display state of all pixels in the initial difference image, identify those isolated pixels that are not connected to other pixels with similar display states and whose display states are significantly different from most of the surrounding pixels. These pixels do not reflect the actual outline of the object and are judged as abnormal noise data. For the pixels corresponding to these abnormal noise data, adjust their display states to be the same as those of the background pixels in the image, so that these pixels blend into the background. After removing the abnormal noise data, process the entire image so that all pixels in the image only present two distinct display states: one display state corresponds to the object-related area, and the other display state corresponds to the background area. The image after this processing is the binarized difference image.
[0043] In a binary difference image, starting from the top left corner, the display state of each pixel is checked row by row and column by column. When a pixel with a certain display state is encountered, it is checked whether the pixels adjacent to it in the four directions (up, down, left, and right) have the same display state. If the adjacent pixels have the same display state, they are classified into the same region. The process continues to expand to check the adjacent pixels of other pixels in the region until there are no more adjacent pixels with the same display state, thus completing the identification of a connected pixel region. In the same way, all pixels in the image are checked until all connected pixel regions in the image are identified. Then, the number of pixels in each identified connected pixel region is counted. Starting from an edge pixel of the region, each pixel in the region is counted one by one to ensure that no pixel is counted twice and no pixel is missed. The final total number of pixels is the pixel area of the connected pixel region.
[0044] The pixel area of each interconnected pixel region is compared with a preset minimum area threshold one by one. The total number of pixels in each interconnected pixel region is checked one by one. It is determined whether the total number exceeds the number of pixels corresponding to the preset minimum area threshold. All interconnected pixel regions whose pixel area exceeds the minimum area threshold are retained. These retained interconnected pixel regions are the foreground regions that can accurately reflect the position and outline of the object.
[0045] Edge detection is performed on the foreground region. Pixels within the foreground region are observed row by row, and their display status is checked from left to right. When the display status of a pixel changes significantly from that of its left-adjacent pixel, that pixel is marked. Then, pixels within the foreground region are observed column by column, and their display status is checked from top to bottom. When the display status of a pixel changes significantly from that of its upper-adjacent pixel, that pixel is marked. All marked pixels are connected sequentially according to their position in the image to form continuous edge lines. These edge lines completely outline the approximate contour of the object. The relevant information of these edge lines is recorded, and the resulting information is the initial contour information.
[0046] Based on the edge lines in the initial contour information, polygon approximation fitting is performed. Feature points are selected on the edge lines, including at the turning points of the lines, locations with large curve curvatures, and the beginning and end positions of the lines. This ensures that the selected feature points can comprehensively and accurately reflect the overall direction and shape of the edge lines. After selection, all feature points are sorted sequentially according to the natural direction of the edge lines, and adjacent feature points are connected one by one with straight line segments. The end of one feature point is seamlessly connected to the beginning of the next feature point, ultimately forming a closed polygon. The contour of this polygon closely matches the actual contour of the object. The contour information of this closed polygon is the boundary information of the object.
[0047] The preset planar projection mapping relationship clarifies the correspondence between the position of pixels in the image and the coordinate position in the target light strip spatial coordinate system. This rule is determined based on the installation position and angle of the image acquisition device and the actual spatial size of the area below the target light strip. According to this correspondence rule, the horizontal axis position of the target light strip spatial coordinate system corresponding to the horizontal position of each pixel in the image is first determined, and then the vertical axis position of the target light strip spatial coordinate system corresponding to the vertical position of each pixel in the image is determined. Based on the specific horizontal and vertical positions of each feature point in the image in the boundary information, combined with the above correspondence, the horizontal and vertical coordinate values of each feature point in the target light strip spatial coordinate system are determined respectively. The horizontal and vertical coordinate values corresponding to all feature points are integrated together to form the position coordinate data of the object.
[0048] The beneficial effects include the ability to continuously capture images of objects in the area below the target light strip and form a continuous image sequence; clearly present object details through grayscale adjustment; accurately obtain the brightness difference between the object and the reference image through pixel difference; clearly distinguish the object from the background after removing abnormal noise; accurately locate the object's foreground area by filtering connected regions; obtain boundary information that matches the actual contour of the object through edge detection and polygon fitting; and finally accurately obtain the object's position coordinate data in the target light strip's spatial coordinate system through planar projection mapping. The entire process can clearly, accurately, and comprehensively obtain relevant object information, effectively improving the reliability and accuracy of object position detection.
[0049] The segment delineation module is used to define the target LED segment of the object on the target LED strip based on the position coordinate data. In this embodiment of the invention, when the segment delineation module defines the target LED segment of the object on the target LED strip based on the position coordinate data, it is specifically used for: The spatial coverage area of the object is determined based on the extreme values of the object's boundary coordinates in the location coordinate data. The distribution and association information of the LED beads on the target light strip are analyzed to obtain the spatial position identifiers and coordinate mapping relationships of the LED beads on the target light strip; The spatial coverage area is associated and matched with the coordinate mapping relationship to filter out the set of LED beads on the target light strip that are within the spatial coverage area; Based on the spatial position identifiers of the LEDs in the LED set, the LEDs are integrated into continuous segments according to the arrangement order of the target LED strip to obtain the initial LED segments of the target LED strip; By removing isolated LED beads from the initial LED bead segment that are not related to the spatial coverage of the object, the target LED bead segment corresponding to the object is obtained.
[0050] Extract all boundary coordinates contained in the object's position coordinate data, examine the horizontal values of these coordinates one by one, find the coordinate with the smallest value as the leftmost coordinate, and the coordinate with the largest value as the rightmost coordinate. Then examine the vertical values of these coordinates one by one, find the coordinate with the smallest value as the topmost coordinate, and the coordinate with the largest value as the bottommost coordinate. Connect the points corresponding to the four extreme coordinates of leftmost top, rightmost top, rightmost bottom, and leftmost bottom in sequence, and the enclosed area formed is determined as the spatial coverage of the object.
[0051] The LED distribution association information of the target light strip is a record of information related to the LEDs. From this information, we search for the unique spatial position identifier of each LED, which is a unique marker that distinguishes each LED. At the same time, we search for the specific coordinates of each LED in the spatial coordinate system of the target light strip. We match the spatial position identifier of each LED with its corresponding spatial coordinates one by one. After completing the matching operation for all LEDs, the resulting set of correspondences is the spatial position identifier and coordinate mapping relationship of the LEDs on the target light strip.
[0052] Extract the coordinates of the first LED bead from the coordinate mapping relationship, and check whether its horizontal value is greater than or equal to the leftmost coordinate value and less than or equal to the rightmost coordinate value of the spatial coverage area. At the same time, check whether its vertical value is greater than or equal to the topmost coordinate value and less than or equal to the bottommost coordinate value of the spatial coverage area. If both conditions are met, select this LED bead. Check each LED bead in the coordinate mapping relationship in the same way. Gather all LED beads that meet the conditions together. The group formed is the set of LED beads on the target light strip that are within the spatial coverage area.
[0053] The arrangement order of the target light strip is the actual arrangement order of the LED beads on the light strip from one end to the other. The spatial position identifier of each LED bead is taken out from the LED bead set. According to this arrangement order, the LED beads in the LED bead set are sorted according to their actual positions. Starting from the first LED bead after sorting, it is checked whether the next LED bead is a consecutive adjacent LED bead on the light strip. If so, it is grouped into the same segment. Continue to check whether the subsequent LED bead is consecutively adjacent to the last LED bead of the current segment. If so, it is added to the segment. Until a non-consecutive adjacent LED bead is encountered, the current segment is integrated. Then, the operation is repeated from the non-consecutive LED bead to integrate all consecutive segments. These segments together form the initial LED bead segments of the target light strip.
[0054] Take the first LED in the initial LED segment and check if its horizontal coordinate is between the leftmost and rightmost points of the spatial coverage area, and if its vertical coordinate is between the topmost and bottommost points. If not, check if the LED has any adjacent LEDs in the current segment. If not, it is an isolated LED and is removed from the initial LED segment. Check each LED in the initial LED segment in turn and remove all isolated LEDs that do not meet the spatial coverage conditions and have no adjacent LEDs in the same segment. The remaining LED segment is the target LED segment corresponding to the object.
[0055] The beneficial effects include the ability to accurately determine the spatial coverage of an object, clearly obtain the spatial position identifiers and coordinate mapping relationships of the LED beads on the target light strip, accurately filter out the set of LED beads within the spatial coverage of the object, effectively integrate continuous initial LED bead segments according to the actual arrangement order of the target light strip, and accurately obtain the target LED bead segments corresponding to the object by removing isolated LED beads that are not related to the spatial coverage of the object. The entire process can closely associate the corresponding LED bead segments of the object and the target light strip, improving the accuracy and rationality of the association and matching between the object and the LED beads of the light strip.
[0056] The brightness analysis module is used to analyze the brightness parameters of the target LED bead section to obtain the display drive signal of the target LED strip; In this embodiment of the invention, when the brightness analysis module performs brightness parameter analysis on the target LED bead segment to obtain the display drive signal of the target LED strip, it is specifically used for: Extract the lighting scene parameters of the target LED segment; The number of LEDs in the target LED segment and the arrangement order of the LEDs on the target LED strip are integrated into the segment structure description information of the target LED segment; By performing a synergistic coupling analysis on the lighting scene parameters and the section structure description information, the initial brightness driving parameter set of the target LED section is obtained; Based on the communication protocol format of the target light strip, the initial brightness driving parameter set is encoded and encapsulated to obtain the display driving signal of the target light strip.
[0057] The relevant parameters corresponding to the target LED segment are retrieved from the preset lighting scene configuration information. These parameters include the adaptation requirements of LED brightness in this scene, the lighting adjustment standards corresponding to ambient light, etc. The information related to the lighting of the target LED segment is collected one by one, and the information set formed after integration is the lighting scene parameters of the target LED segment.
[0058] Each LED in the target LED segment is counted and the total number of LEDs in the segment is recorded. At the same time, the actual arrangement order of each LED on the target LED strip is determined. The total number of LEDs and the arrangement order of the LEDs are integrated through text description to clearly present the composition of the target LED segment. The descriptive information formed in this way is the segment structure description information of the target LED segment.
[0059] By combining lighting scene parameters with segment structure description information for collaborative coupling analysis, the specific requirements for LED brightness in the lighting scene parameters are first clarified. Then, combined with the number and arrangement order of LEDs in the segment structure description information, the brightness driving standard that each LED should achieve in this lighting scene is determined. This ensures that the driving requirements of each LED not only meet the needs of the lighting scene but also match its own arrangement position on the LED strip. The brightness driving standards of all LEDs are integrated to form the initial brightness driving parameter set of the target LED segment.
[0060] The communication protocol format of the target LED strip is obtained in advance. This format clarifies the rules for signal transmission and the specifications for data presentation. According to this format requirement, each brightness driving standard in the initial brightness driving parameter set is converted into a signal segment that conforms to the protocol specification. Each signal segment accurately corresponds to the brightness driving requirement of one LED. Then, all the converted signal segments are combined sequentially according to the arrangement order of the target LED segments to ensure that the combined signal can be accurately recognized and received by the target LED strip. The complete signal formed in this way is the display driving signal of the target LED strip.
[0061] The beneficial effects include the ability to accurately extract lighting scene parameters corresponding to the target LED segment, clearly integrate the number and arrangement order of LEDs in the target LED segment to form segment structure description information, obtain an initial brightness driving parameter set that adapts to the lighting scene and segment structure through the synergistic coupling analysis of the two, and then encode and encapsulate it according to the communication protocol format of the target LED strip to generate a display driving signal that can be accurately identified and received by the target LED strip. The whole process realizes the accurate matching of lighting scene requirements, segment structure characteristics and LED strip driving signals, effectively improving the adaptability and reliability of the lighting display of the target LED segment, and ensuring that the LED strip can present the lighting effect that meets the scene requirements as expected.
[0062] The instruction generation module is used to map and encode the display driving signal based on the display control logic of the target light strip to obtain the segment display control instruction of the target light strip; In this embodiment of the invention, when the instruction generation module executes the display control logic based on the target light strip and maps and encodes the display driving signal to obtain the segment display control instruction for the target light strip, it is specifically used for: The display driving signal is parsed to extract the brightness parameter data and the corresponding target LED segment identifier from the display driving signal; Based on the instruction mapping relationship table of the target light strip in the display control logic, the brightness parameter data is mapped and matched to obtain the pulse width control instruction of the brightness parameter data; Based on the pulse width control command, the brightness parameter data is converted into a data format to obtain the pulse width modulation duty cycle data of the target light strip; According to the serial communication data frame format of the target light strip, the target light bead segment identifier and the pulse width modulation duty cycle data are integrated into the original control data packet of the target light strip; A frame header, checksum, and frame trailer are added to the original control data packet to generate the segment display control command for the target light strip.
[0063] According to the parsing rules specified in the communication protocol corresponding to the display driving signal, the content of the display driving signal is read segment by segment. The specific data segment used to characterize the brightness of the LED bead is identified in the signal. This data segment is the brightness parameter data. At the same time, the specific identification segment used to uniquely identify the target LED bead segment is identified in the signal. This identification segment is the target LED bead segment identifier. After extracting the two segments of information, they are stored independently.
[0064] The instruction mapping relationship table set in the display control logic of the target light strip is obtained in advance. This table records the fixed correspondence between all brightness parameter data and corresponding pulse width control instructions. The extracted brightness parameter data is compared with each record in the table one by one to find the record entry that completely matches the brightness parameter data. The corresponding instruction is extracted from the instruction information marked in the entry. This instruction is the pulse width control instruction of the brightness parameter data.
[0065] The specific requirements for data format in the pulse width control command are clearly defined. These requirements include the data presentation format, encoding rules, etc. The brightness parameter data is converted according to these requirements. The format of each information unit in the brightness parameter data is adjusted one by one to make it conform to the standard specified by the pulse width control command. The adjusted data is the pulse width modulation duty cycle data of the target light strip.
[0066] The serial communication data frame format of the target LED strip is retrieved. This format specifies the arrangement order and storage specifications of each part of the information in the data frame. First, the target LED segment identifier is placed in the corresponding position of the data frame according to the format requirements. Then, the pulse width modulation duty cycle data is placed in the specified position after the identifier according to the same format requirements. This ensures that the arrangement order and storage method of the two fully comply with the provisions of the serial communication data frame format. The complete data frame formed after integration is the original control data packet of the target LED strip.
[0067] A preset frame header is generated to identify the start of the segment display control command. This header is added to the beginning of the original control data packet. Then, the integrity of all data in the original control data packet is checked. A corresponding checksum is generated by checking the data bit by bit. The checksum is added to the end of the original control data packet. Finally, a preset frame tail is generated to identify the end of the segment display control command. This tail is added to the end of the checksum. The complete command, which includes the frame header, the original control data packet, the checksum, and the frame tail in sequence, is the segment display control command for the target light strip.
[0068] The beneficial effects include the ability to accurately analyze display drive signals, precisely extract brightness parameter data and target LED segment identifiers, match them with the instruction mapping table in the display control logic to obtain the corresponding pulse width modulation (PWM) control instructions, convert the brightness parameter data into PWM duty cycle data according to the instruction requirements, integrate the identifiers and duty cycle data to form the original control data packet based on the serial communication data frame format, and then generate complete segment display control instructions by adding frame headers, check codes, and frame tails. The entire process achieves accurate conversion of drive signals into control instructions, ensuring the integrity and accuracy of instruction transmission, effectively guaranteeing that the target LED strip stably presents the lighting effect of the corresponding segment according to preset requirements, and improving the reliability and adaptability of LED strip control.
[0069] The tracking and updating module is used to monitor the position changes of the object, obtain the real-time position coordinate data of the object, and update the target LED segment based on the real-time position coordinate data. In this embodiment of the invention, when the tracking and updating module monitors the position change of the object, obtains the real-time position coordinate data of the object, and updates the target LED segment based on the real-time position coordinate data, it is specifically used for: Continuously acquire real-time image sequences of the area below the target light strip; Edge detection analysis is performed on single-frame images in the real-time image sequence to obtain the real-time boundary information of the object; The real-time boundary information is compared with the boundary information by feature point comparison to determine the position offset vector of the object in the real-time image sequence. Based on the position offset vector, the position coordinate data is translated and corrected to obtain the real-time position coordinate data of the object; The real-time position coordinate data is mapped to the spatial coordinate system of the target light bar to obtain the updated mapped coordinates of the object; Based on the updated mapping coordinates, determine the set of LED positions on the target LED corresponding to the updated mapping coordinates, and define the continuous LED interval covered by the set of LED positions as the updated target LED segment.
[0070] When the tracking and updating module performs feature point comparison between the real-time boundary information and the boundary information to determine the position offset vector of the object in the real-time image sequence, it is specifically used for: Key point detection is performed on the object contour in the real-time boundary information to identify the corner points and curvature convex points in the object contour, thereby obtaining the real-time feature point set of the object. The real-time image sequence of the object is backtracked to obtain the historical feature point set of the object; Using historical feature points in the historical feature point set as reference templates, grayscale similarity matching is performed on real-time feature points in the real-time feature point set to obtain the feature matching result of the real-time feature point set. Based on the feature matching results, a stable set of correspondences between the historical feature points and the real-time feature points is established. The coordinate changes of the stable correspondence pairs of concentrated feature points are analyzed by least squares fitting, and the two-dimensional translation vector in the analysis result is determined as the position offset vector of the real-time image sequence.
[0071] Aim the image acquisition device at the designated area below the target light strip, fix the device on a stable bracket, adjust the bracket height and the device's shooting angle to ensure that the device's field of view can completely cover the entire area to be monitored, and that the shooting direction is perpendicular to the plane of the area to ensure that the image is distortion-free. Confirm and keep the parameters such as image resolution and color mode fixed through the device's settings interface, start the device's continuous acquisition function, and the device will continuously capture images in the area at preset fixed time intervals. Each capture will obtain a clear real-time image that contains the complete shape of the object. Integrate these real-time images in chronological order of acquisition time to form a continuous and coherent real-time image sequence.
[0072] Extract a single frame image from the real-time image sequence. Divide the image into a uniform pixel grid by rows and columns. Check the brightness and darkness of each pixel row by row from left to right and column by column from top to bottom. For each pixel, observe the brightness and darkness of its four adjacent pixels above, below, to the left, and to the right. When the brightness and darkness of a pixel changes abruptly from dark to bright or from bright to dark with any of its adjacent pixels, the pixel is determined to be an edge point of the object. Use a uniform marking method to record the row and column positions of each edge point in the image grid, ensuring that no edge point on the contour is missed and that irrelevant non-edge points are not marked. Connect all marked edge points end to end in the actual distribution order of the edge points in the image to form a closed contour line that can completely outline the shape of the object. The position and shape information carried by these lines is the real-time boundary information of the object.
[0073] For the closed contour lines formed in the real-time boundary information, the direction change of each point is analyzed point by point in the clockwise direction of the line. When the previous and subsequent directions of the contour line at a certain point form a clear turning point, and the extension directions of the two directions show a significant angular difference, this point is a corner point. Continuing to analyze along the line, when it is found that the contour line presents an outward convex shape at a certain point, and the lines on both sides of the point bend to the same side and convex around the point, this point is a curvature convex point. During the analysis, each point on the contour is judged and marked one by one, and the specific position of each corner point and curvature convex point on the contour line and the distance relative to adjacent feature points are recorded. The position information of all marked corner points and curvature convex points is sorted and summarized in order on the contour to form a real-time feature point set containing the key morphological features of the object.
[0074] Retrieve previously acquired and stored real-time image sequences to determine the range of historical images to be traced back. This range covers all relevant real-time images acquired before the current moment. For each historical real-time image, examine the display status of image pixels row by row and column by column using the same method as acquiring real-time boundary information. Compare the brightness differences of adjacent pixels, mark edge points, and connect them to form the outline of the historical object. Then, analyze the direction changes of each point along the historical outline lines to identify corner points and curvature convex points on the historical outline. Record the feature point position information corresponding to each historical image. According to the time sequence of image acquisition, classify and organize the historical feature points at different times. The feature point sets of all historical moments are integrated together in chronological order to form the historical feature point set of the object.
[0075] Select an arbitrary historical feature point from the historical feature point set as a reference template. Centered on this historical feature point, extend the same number of pixel rows and columns in all four directions (up, down, left, and right) to form a rectangular pixel region of fixed size. Record the brightness and darkness of each pixel within this rectangular region point by point to ensure that the recorded grayscale information is complete and accurate. Then, select a real-time feature point from the real-time feature point set. Centered on this real-time feature point, extract a rectangular pixel region of the same size and extension range as the reference template. Similarly, record the brightness and darkness of each pixel within this region point by point. Align the two rectangular regions according to their corresponding positions and compare the brightness and darkness of each corresponding pixel. Count the number of pixels with completely identical display states. The more identical pixels, the higher the similarity between the two feature points. Using the same method, complete the grayscale region comparison between all historical feature points in the historical feature point set and all real-time feature points in the real-time feature point set. Record the similarity data of each pair of feature points in detail to form the feature matching result of the real-time feature point set.
[0076] Based on the similarity data of each pair of feature points recorded in the feature matching results, a clear similarity qualification standard is set. Historical feature points and real-time feature points that meet the similarity standard are selected. For each selected combination, the relative position of the historical feature point in the historical contour of the object is checked, and the relative position of the real-time feature point in the current real-time contour of the object is also checked to ensure that the relative positions of the two feature points in their respective contours are consistent. For example, if the historical feature point is located in the upper left corner of the contour, the real-time feature point must also be located in the upper left corner of the current contour. The consistency of the relative position of each combination is verified one by one. Combinations that meet the similarity standard but have inconsistent relative positions are eliminated. All feature point combinations that meet both the similarity standard and the requirement of consistent relative positions are compiled and summarized to form a stable set of correspondences between historical feature points and real-time feature points.
[0077] Extract the specific coordinates of each pair of feature points from the stable correspondence set. Obtain the horizontal and vertical coordinates of historical feature points and real-time feature points in each pair. Calculate the difference between the horizontal coordinates of the real-time feature points and the historical feature points to obtain the change in the horizontal coordinates of the feature point pair. Calculate the difference between the vertical coordinates of the real-time feature points and the historical feature points to obtain the change in the vertical coordinates of the feature point pair. Collect the changes in the horizontal and vertical coordinates of all feature point pairs. Try different horizontal and vertical translation values. For each set of selected translation values, calculate the absolute value of the difference between the change in the horizontal coordinates of each feature point pair and the horizontal translation value. Calculate the absolute value of the difference between the change in the vertical coordinates of each feature point pair and the vertical translation value. Add all the absolute values of the horizontal and vertical differences to obtain a total difference value. Continuously adjust the horizontal and vertical translation values until the set of horizontal and vertical translation values that minimizes the total difference value is found. The two-dimensional vector formed by this set of values is the position offset vector of the real-time image sequence.
[0078] The system retrieves the object's position coordinate data, previously calculated using position coordinate data. This data includes the horizontal and vertical coordinates of all key points on the object's outline. The horizontal translation value in the position offset vector is superimposed on the horizontal coordinate of each key point in the position coordinate data. If the horizontal translation value is positive, it is directly added to the horizontal coordinate, moving the coordinate point to the right of the image. If the horizontal translation value is negative, the absolute value of the value is subtracted from the horizontal coordinate, moving the coordinate point to the left of the image. Similarly, the vertical translation value in the position offset vector is superimposed on the vertical coordinate of each key point, adjusting the vertical coordinate position according to the same superposition rules as the horizontal coordinates. This process is repeated for all key point coordinates. Through this precise translation correction, the coordinate deviation caused by changes in the object's position is eliminated, resulting in real-time position coordinate data that accurately reflects the object's current actual position.
[0079] Based on a preset planar projection mapping relationship, which is pre-established based on the installation position, installation angle, lens parameters of the image acquisition device, and the actual physical space size of the area below the target light strip, the system clarifies the corresponding conversion rules between the horizontal and vertical positions of pixels in the image coordinate system and the horizontal and vertical axis coordinates in the target light strip space coordinate system. The horizontal position of each key point in the real-time position coordinate data is converted into the corresponding horizontal coordinate value in the target light strip space coordinate system according to the mapping relationship. The vertical position of each key point is converted into the corresponding vertical coordinate value in the target light strip space coordinate system according to the same ratio. During the conversion process, it is ensured that the horizontal and vertical conversion of each coordinate point strictly follows the mapping relationship without deviation. All the converted coordinate values are integrated together in the order of the object outline to form the updated mapped coordinates that can reflect the current position of the object in the target light strip space.
[0080] Based on the maximum and minimum horizontal and vertical coordinates of all key points in the updated mapped coordinates, the horizontal and vertical coverage areas of the object in the target light strip's spatial coordinate system are determined. The spatial position identifiers and coordinate mapping relationships of the target light strip's LEDs are retrieved. This relationship contains the specific horizontal and vertical coordinates of each LED in the target light strip's spatial coordinate system. The coordinates of each LED are checked one by one according to the arrangement order of the light strip to determine whether the horizontal coordinate of the LED is within the object's horizontal coverage area and whether its vertical coordinate is within the object's vertical coverage area. Within the coverage area, all LEDs whose coordinates are simultaneously within two coverage areas are selected, and their position information is recorded to form an LED position set. The actual arrangement of all LEDs in the LED position set on the target LED strip is observed. Starting from the first LED in the LED position set, subsequent LEDs are checked sequentially to see if they are arranged adjacent to the previous LED on the LED strip without any other LEDs in between. Consecutive adjacent LEDs without any gaps are divided into an interval, ensuring that the interval contains all consecutively arranged LEDs in the LED position set. This consecutive LED interval is the updated target LED segment.
[0081] The beneficial effects include the ability to continuously capture real-time images of objects in the area below the target light strip, obtain clear real-time boundary information of the object through precise edge detection, accurately identify contour corners and curvature convex points to form a real-time feature point set, combine the historical feature point set for grayscale similarity matching to establish a stable feature point correspondence, obtain accurate position offset vectors through coordinate change analysis, perform precise translation correction on the object position coordinate data, accurately map the real-time position coordinates to the light strip spatial coordinate system, and finally define the updated target light bead segment that highly matches the current position of the object. The entire process realizes real-time tracking and precise positioning of the object position, ensuring that the target light bead segment is updated in a timely manner as the object position changes, effectively improving the dynamic adaptability and control accuracy of light strip lighting and object position.
[0082] The instruction adjustment module is used to make targeted adjustments to the display control instructions of the target LED segment based on the updated target LED segment, so as to obtain the dynamic display control instructions of the target LED strip.
[0083] In this embodiment of the invention, when the instruction adjustment module performs targeted adjustments to the display control instruction for the target LED segment based on the updated target LED segment to obtain the dynamic display control instruction for the target LED strip, it is specifically used for: Read the latest display drive signal in the updated target LED segment; The segment display control command is decoded and extracted to obtain the old brightness parameter data and old lamp segment identifier of the updated target lamp segment; The old brightness parameter data is compared and fused with the target brightness parameter in the latest display driving signal to obtain the fused brightness parameter data of the updated target LED segment; Based on the updated physical location range of the updated LED beads in the updated target LED bead segment, the corresponding updated segment identifier is regenerated, and a mapping relationship is established between the updated segment identifier and the fused brightness parameter data; Based on the mapping relationship, and according to the control data frame format of the target light bar, the fused brightness parameter data is encapsulated and encoded a second time to obtain the dynamic display control command of the target light bar.
[0084] The latest display drive signal corresponding to the target LED segment is retrieved from the storage unit that stores the relevant signals of the updated target LED segment. During the retrieval process, the matching and confirmation between the signal identifier and the updated target LED segment are used to ensure that the retrieved signal is the latest generated signal for the current updated target LED segment. All data content of the signal is completely read, without omitting any information related to brightness control.
[0085] According to the decoding rules of the communication protocol corresponding to the segment display control command, the frame structure of the segment display control command is disassembled segment by segment. First, the specific data segment used to identify the LED segment is identified after the frame header. This data segment is the old LED segment identifier. Then, the core data segment used to characterize the LED brightness is extracted from the frame structure. The information carried by this data segment is the old brightness parameter data. The field division method specified in the protocol is strictly followed during the decoding process to ensure that the extracted old brightness parameter data corresponds accurately with the old LED segment identifier.
[0086] The brightness information corresponding to each LED in the old brightness parameter data is compared point by point with the target brightness parameters in the latest display driver signal. It is checked whether the brightness requirements for the same LED are consistent. If they are consistent, the brightness information is retained. If there are differences, the target brightness parameters in the latest display driver signal are used as the benchmark to adjust the corresponding brightness information in the old brightness parameter data. The adjusted brightness information not only continues the reasonable brightness setting in the old parameters, but also meets the latest target brightness requirements. All the adjusted brightness information is integrated to form the updated fused brightness parameter data for the target LED segment.
[0087] The actual physical location range of the LEDs in the target LED segment after the update is determined. This range includes the physical locations of the leftmost and rightmost LEDs, as well as the frontmost and rearmost LEDs within the segment. A unique update segment identifier is generated based on this physical location range. The identifier contains positional feature information that can distinguish it from other LED segments, ensuring that each target LED segment after the update has a unique update segment identifier. Then, the update segment identifier is mapped one-to-one with the fused brightness parameter data. Each fused brightness parameter data is explicitly associated with the update segment identifier, forming a fixed mapping relationship between the two.
[0088] The control data frame format of the target light strip is retrieved. This format specifies the arrangement order and data specifications of each part of the data frame, such as the identifier, brightness parameters, and verification information. Based on the previously established mapping relationship, the update segment identifier is first placed in the designated position of the data frame according to the format requirements. Then, the fused brightness parameter data is sequentially filled into the corresponding fields of the data frame according to the arrangement order of the LEDs in the segment. During the filling process, it is ensured that each brightness parameter accurately matches the position of the corresponding LED. Finally, the necessary verification information is added according to the format requirements to make the entire data frame conform to the communication protocol requirements of the target light strip. The complete data frame formed after secondary encoding and encapsulation is the dynamic display control instruction of the target light strip.
[0089] The beneficial effects include the ability to accurately read the latest display drive signal of the updated target LED segment, accurately decode and extract the old brightness parameter data and old LED segment identifier from the segment display control command, compare and fuse the old and new brightness parameters to obtain fused brightness parameter data that meets the current requirements, generate a unique updated segment identifier based on the physical location range of the updated LEDs and establish a stable mapping relationship, complete secondary encoding and encapsulation according to the LED strip control data frame format, and generate dynamic display control commands. The entire process achieves reasonable connection and accurate adaptation of the old and new brightness parameters, ensuring that the identifier of the updated target LED segment and the brightness parameters correspond accurately, effectively improving the continuity, adaptability and control accuracy of the LED strip dynamic display, and ensuring that the LED strip stably presents the lighting effect according to real-time requirements.
[0090] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0091] This application embodiment can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A multi-segment programmable light strip brightness control system, characterized in that, The system includes a contour positioning module, a segment delineation module, a brightness analysis module, a command generation module, a tracking and update module, and a command adjustment module, wherein: The contour localization module is used to perform region contour fitting on a continuous image sequence of an object in the area below the target light bar to obtain the boundary information of the object, and to map the boundary information to the spatial coordinate system of the target light bar to obtain the position coordinate data of the object. The segment delineation module is used to define the target LED segment of the object on the target LED strip based on the position coordinate data. The brightness analysis module is used to analyze the brightness parameters of the target LED bead section to obtain the display drive signal of the target LED strip; The instruction generation module is used to map and encode the display driving signal based on the display control logic of the target light strip to obtain the segment display control instruction of the target light strip; The tracking and updating module is used to monitor the position changes of the object, obtain the real-time position coordinate data of the object, and update the target LED segment based on the real-time position coordinate data. The instruction adjustment module is used to make targeted adjustments to the display control instructions of the target LED segment based on the updated target LED segment, so as to obtain the dynamic display control instructions of the target LED strip.
2. The multi-segment programmable light strip brightness control system as described in claim 1, characterized in that, When the contour localization module performs region contour fitting on a continuous image sequence of an object in the area below the target light strip to obtain the boundary information of the object, and maps the boundary information to the spatial coordinate system of the target light strip to obtain the position coordinate data of the object, it is specifically used for: Obtain a continuous image sequence of objects in the region below the target light strip; Perform inter-frame difference on the continuous image sequence to obtain the foreground region of the object contained in the continuous image sequence; Edge detection is performed on the foreground region to obtain the initial contour information of the object; The initial contour information is subjected to polygon approximation fitting to obtain the boundary information of the object; According to the preset planar projection mapping relationship, the boundary information is mapped to the spatial coordinate system of the target light strip to obtain the position coordinate data of the object.
3. The multi-segment programmable light strip brightness control system as described in claim 2, characterized in that, When the contour localization module performs inter-frame differencing on the continuous image sequence to obtain the foreground region containing the object in the continuous image sequence, it is specifically used for: In chronological order, two adjacent original images from the continuous image sequence are extracted as the original frame image and the reference frame image; The original frame image and the reference frame image are adjusted in grayscale to obtain the enhanced frame image of the object and the enhanced reference frame image. Pixel difference statistics are performed on the enhanced frame image and the reference frame enhanced image to obtain the initial difference image of the object; Abnormal noise data is removed from the initial difference image to obtain a binarized difference image of the object; The distribution area of interconnected pixel regions in the binarized difference image is calculated to obtain the region pixel area of the interconnected pixel regions; From the interconnected pixel regions, select the connected regions whose pixel area exceeds a preset minimum area threshold, and use the connected regions as the foreground region of the object.
4. The multi-segment programmable light strip brightness control system as described in claim 3, characterized in that, The formula for calculating the pixel area of the region is as follows: ; In the formula, This represents the pixel area of the region. This represents the total number of pixels in the interconnected pixel regions. This represents the preset basic area unit coefficient. This represents the preset edge gradient weight coefficient used to control the degree to which the edge intensity at the location of a pixel affects its area contribution. Indicates the first pixel in the interconnected pixel region The edge gradient magnitude of each pixel This represents the maximum value among the edge gradient magnitudes. This represents a preset temporal stability coefficient used to control the impact of the historical frequency of pixel occurrences on the area contribution of the current frame. Indicates the first pixel in the interconnected pixel region Temporal stability factor for each pixel.
5. The multi-segment programmable light strip brightness control system as described in claim 1, characterized in that, When the segment delineation module defines the target LED segment on the target LED strip based on the position coordinate data, it is specifically used for: The spatial coverage area of the object is determined based on the extreme values of the object's boundary coordinates in the location coordinate data. The distribution and association information of the LED beads on the target light strip are analyzed to obtain the spatial position identifiers and coordinate mapping relationships of the LED beads on the target light strip; The spatial coverage area is associated and matched with the coordinate mapping relationship to filter out the set of LED beads on the target light strip that are within the spatial coverage area; Based on the spatial position identifiers of the LEDs in the LED set, the LEDs are integrated into continuous segments according to the arrangement order of the target LED strip to obtain the initial LED segments of the target LED strip; By removing isolated LED beads from the initial LED bead segment that are not related to the spatial coverage of the object, the target LED bead segment corresponding to the object is obtained.
6. The multi-segment programmable light strip brightness control system as described in claim 1, characterized in that, When the brightness analysis module performs brightness parameter analysis on the target LED bead segment to obtain the display drive signal for the target LED strip, it is specifically used for: Extract the lighting scene parameters of the target LED segment; The number of LEDs in the target LED segment and the arrangement order of the LEDs on the target LED strip are integrated into the segment structure description information of the target LED segment; By performing a synergistic coupling analysis on the lighting scene parameters and the section structure description information, the initial brightness driving parameter set of the target LED section is obtained; Based on the communication protocol format of the target light strip, the initial brightness driving parameter set is encoded and encapsulated to obtain the display driving signal of the target light strip.
7. The multi-segment programmable light strip brightness control system as described in claim 1, characterized in that, When the instruction generation module executes the display control logic based on the target light strip and maps and encodes the display driving signal to obtain the segment display control instruction for the target light strip, it is specifically used for: The display driving signal is parsed to extract the brightness parameter data and the corresponding target LED segment identifier from the display driving signal; Based on the instruction mapping relationship table of the target light strip in the display control logic, the brightness parameter data is mapped and matched to obtain the pulse width control instruction of the brightness parameter data; Based on the pulse width control command, the brightness parameter data is converted into a data format to obtain the pulse width modulation duty cycle data of the target light strip; According to the serial communication data frame format of the target light strip, the target light bead segment identifier and the pulse width modulation duty cycle data are integrated into the original control data packet of the target light strip; A frame header, checksum, and frame trailer are added to the original control data packet to generate the segment display control command for the target light strip.
8. The multi-segment programmable light strip brightness control system as described in claim 1, characterized in that, When the tracking and updating module monitors the position changes of the object, obtains the real-time position coordinate data of the object, and updates the target LED segment based on the real-time position coordinate data, it is specifically used for: Continuously acquire real-time image sequences of the area below the target light strip; Edge detection analysis is performed on single-frame images in the real-time image sequence to obtain the real-time boundary information of the object; The real-time boundary information is compared with the boundary information by feature point comparison to determine the position offset vector of the object in the real-time image sequence. Based on the position offset vector, the position coordinate data is translated and corrected to obtain the real-time position coordinate data of the object; The real-time position coordinate data is mapped to the spatial coordinate system of the target light bar to obtain the updated mapped coordinates of the object; Based on the updated mapping coordinates, determine the set of LED positions on the target LED corresponding to the updated mapping coordinates, and define the continuous LED interval covered by the set of LED positions as the updated target LED segment.
9. A multi-segment programmable light strip brightness control system as described in claim 8, characterized in that, When the tracking and updating module performs feature point comparison between the real-time boundary information and the boundary information to determine the position offset vector of the object in the real-time image sequence, it is specifically used for: Key point detection is performed on the object contour in the real-time boundary information to identify the corner points and curvature convex points in the object contour, thereby obtaining the real-time feature point set of the object. The real-time image sequence of the object is backtracked to obtain the historical feature point set of the object; Using historical feature points in the historical feature point set as reference templates, grayscale similarity matching is performed on real-time feature points in the real-time feature point set to obtain the feature matching result of the real-time feature point set. Based on the feature matching results, a stable set of correspondences between the historical feature points and the real-time feature points is established. The coordinate changes of the stable correspondence pairs of concentrated feature points are analyzed by least squares fitting, and the two-dimensional translation vector in the analysis result is determined as the position offset vector of the real-time image sequence.
10. The multi-segment programmable light strip brightness control system as described in claim 1, characterized in that, When the instruction adjustment module performs targeted adjustments to the display control instructions for the target LED segment based on the updated target LED segment, and obtains the dynamic display control instructions for the target LED strip, it is specifically used for: Read the latest display drive signal in the updated target LED segment; The segment display control command is decoded and extracted to obtain the old brightness parameter data and old lamp segment identifier of the updated target lamp segment; The old brightness parameter data is compared and fused with the target brightness parameter in the latest display driving signal to obtain the fused brightness parameter data of the updated target LED segment; Based on the updated physical location range of the updated LED beads in the updated target LED bead segment, the corresponding updated segment identifier is regenerated, and a mapping relationship is established between the updated segment identifier and the fused brightness parameter data; Based on the mapping relationship, and according to the control data frame format of the target light bar, the fused brightness parameter data is encapsulated and encoded a second time to obtain the dynamic display control command of the target light bar.