A light spot detection method and device, electronic equipment and storage medium
By performing wavy diffusion processing and connected component detection on the device screen image, the problem of low efficiency and accuracy of manual observation of light spots is solved, and efficient and accurate automated light spot detection is achieved.
Patent Information
- Application Number
- CN202210997552.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-08-19
AI Technical Summary
Manual observation of light spots is greatly affected by subjective factors, resulting in low efficiency and accuracy.
By performing a wavy diffusion pattern on the screen image of the device under test, the position of the light spot is determined using connected component detection, and an automated machine detection method is adopted.
It improves the accuracy and efficiency of spot detection, reduces human interference, and achieves automated detection.
Smart Images

Figure CN115358992B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information processing, and in particular to a light spot detection method and device, electronic equipment and a storage medium. BACKGROUND
[0002] When using a smart device, the main means of human-computer interaction with the smart device is achieved through the screen of the smart device, and the quality of the device screen directly affects the device use experience. For example, the device screen light spot will affect the device use experience. In related solutions, more is to determine whether there is a light spot through manual observation by relevant personnel. The manual observation method is greatly disturbed by subjective factors, and has high labor cost, low efficiency and low accuracy. SUMMARY
[0003] The present application provides a light spot detection method, device, electronic equipment and storage medium to solve the problem that manual observation of light spots is greatly disturbed by subjective factors and has low efficiency and accuracy.
[0004] According to an aspect of the present application, a light spot detection method is provided, the method comprising:
[0005] determining a to-be-tested device screen image of a to-be-tested device;
[0006] performing light spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image;
[0007] determining a light spot position on the to-be-tested device screen image by performing connected domain detection on the processed device screen image.
[0008] According to another aspect of the present application, a light spot detection device is provided, comprising:
[0009] a screen image determination module configured to determine a to-be-tested device screen image of a to-be-tested device;
[0010] a screen image processing module configured to perform light spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image;
[0011] a light spot position determination module configured to determine a light spot position on the to-be-tested device screen image by performing connected domain detection on the processed device screen image.
[0012] According to another aspect of the present application, an electronic device is provided, comprising:
[0013] at least one processor; and
[0014] a memory in communication with the at least one processor; wherein
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the spot detection method according to any one of the embodiments of the application.
[0016] According to another aspect of the application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to implement the spot detection method according to any one of the embodiments of the application when executed by the processor.
[0017] The technical solution of the embodiments of the application comprises: determining a to-be-tested device screen image of a to-be-tested device; performing spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image; and determining a spot position on the to-be-tested device screen image by performing connected domain detection on the processed device screen image. The technical solution extracts the ripple diffusion feature of the spot by performing spot ripple diffusion processing on the to-be-tested device screen image. Since other abnormal positions in the to-be-tested device screen image do not have the feature, the spot and the other abnormal positions in the to-be-tested device screen image can be distinguished according to the feature, and thus the accuracy of spot detection is improved. Moreover, the technical solution automatically detects the spot by machine, and thus the efficiency of spot detection is improved.
[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort.
[0020] Figure 1 is a flowchart of a spot detection method according to the first embodiment of the application;
[0021] Figure 2 is a spot schematic diagram of a spot detection method according to the first embodiment of the application;
[0022] Figure 3 is a spot schematic diagram of a spot after spot ripple diffusion processing according to the first embodiment of the application;
[0023] Figure 4 is a flowchart of a spot detection method according to the second embodiment of the application;
[0024] Figure 5 is a structural schematic diagram of a light spot detection device according to an embodiment of the present application;
[0025] Figure 6 is a structural schematic diagram of an electronic device for implementing a light spot detection method according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", "target" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0028] Embodiment one
[0029] Figure 1 A flowchart of a light spot detection method according to an embodiment of the present application is provided, the embodiment can be applicable to the case of detecting screen light spots, the method can be executed by a light spot detection device, the light spot detection device can be realized in the form of hardware and / or software, and the light spot detection device can be configured in an electronic device with data processing capability. As shown in the figure, the method comprises: Figure 1
[0030] S110, determining a to-be-tested device screen image of a to-be-tested device.
[0031] The technical solution of the embodiment of the present application can be executed by a light spot detection device, which can automatically detect the screen light spot of the to-be-tested device, and can meet the case of detecting the screen light spot in large quantities. The to-be-tested device includes but is not limited to mobile phones, tablet computers, smart watches, displays, etc.
[0032] Specifically, the embodiment of the present application can obtain a screen image of the to-be-tested device through a shooting device, and perform operations such as cropping, rotating, and noise reduction on the screen image to determine the screen image of the to-be-tested device. Further, the screen image of the to-be-tested device can include a screen part of the to-be-tested device and other parts, and the screen part of the to-be-tested device should account for as large a proportion as possible to reduce the probability of misjudgment of the light spot in the subsequent steps.
[0033] In the embodiment of the present application, optionally, determining the screen image of the to-be-tested device of the to-be-tested device includes: obtaining a candidate device screen image of the to-be-tested device; performing image preprocessing on the candidate device screen image to obtain the screen image of the to-be-tested device of the to-be-tested device; and the image preprocessing includes at least one of the following: graying, erosion, dilation, and filtering.
[0034] In the present solution, due to instability of shooting and interference of other factors, the obtained candidate device screen image can be abnormal, and the candidate device screen image needs to be preprocessed to reduce additional interference factors. Specifically, at least one of graying, erosion, dilation, and filtering is adaptively selected for image preprocessing according to the specific problems of the candidate device screen image.
[0035] S120, performing light spot wave-like diffusion processing on the screen image of the to-be-tested device to obtain a processed device screen image.
[0036] In the embodiment of the present application, as shown in Figure 2 The light spot has the characteristics of high middle brightness and low edge brightness, and the brightness of the light spot gradually decreases from the center of the light spot to the edge of the light spot. In the screen image of the to-be-tested device, other abnormal parts do not have the above characteristics of the light spot. According to the difference between the light spot and other abnormal parts in the screen image of the to-be-tested device, the screen image of the to-be-tested device is processed by light spot wave-like diffusion processing, and the wave-like diffusion characteristics of the light spot are extracted to accurately determine the position of the light spot in the subsequent steps. As shown in Figure 3 After the screen image of the to-be-tested device is processed by light spot wave-like diffusion processing, the image of the light spot part is in a wave-like diffusion state.
[0037] S130, determining the position of the light spot on the screen image of the to-be-tested device by performing connected component detection on the processed device screen image.
[0038] Specifically, the processed device screen image is subjected to connected component detection to obtain connected components of the light spot and other abnormal parts, and the connected components with the wave-like diffusion characteristics of the light spot are screened out, and then the position of the light spot on the screen image of the to-be-tested device can be determined. The connected component detection is a prior art, and the embodiment of the present application will not be described here.
[0039] The technical scheme of the embodiment of the application comprises: determining a to-be-tested device screen image of a to-be-tested device; performing spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image; and determining a spot position on the to-be-tested device screen image by performing connected domain detection on the processed device screen image. The technical scheme extracts the ripple diffusion feature of the spot by performing spot ripple diffusion processing on the to-be-tested device screen image. Since other abnormal parts in the to-be-tested device screen image do not have the feature, the spot and the other abnormal parts in the to-be-tested device screen image can be distinguished according to the feature, and thus the accuracy of spot detection is improved. Moreover, the technical scheme automatically detects the spot by machine, and thus the efficiency of spot detection is improved.
[0040] In the embodiment of the application, the connected domain detection on the processed device screen image to determine the spot position on the to-be-tested device screen image comprises:
[0041] Step A1: determining at least one to-be-tested connected domain from the processed device screen image and marking.
[0042] In the scheme, the determination of at least one to-be-tested connected domain from the processed device screen image and the marking can obtain the to-be-tested connected domains of the spot and other abnormal parts in the processed device screen image. For example, the to-be-tested connected domains are obtained according to a low-to-high or high-to-low threshold range, and the threshold start value, the threshold end value and the threshold step length can be configured. For example, the threshold start value is set to 180, the threshold end value is set to 220, and the threshold step length is set to 10. Then, the connected domains of pixel points between 180 and 190, the connected domains of pixel points between 190 and 200, the connected domains of pixel points between 200 and 210, and the connected domains of pixel points between 210 and 220 are obtained respectively. Through this step, a list of all to-be-tested connected domains can be obtained.
[0043] Step A2: detecting whether the brightness distribution of the pixel points in the marked to-be-tested connected domain meets preset spot pixel point brightness distribution condition information; the preset spot pixel point brightness distribution condition information comprises the nesting layer number of the ripple pixel point distribution when the to-be-tested connected domain has a spot and the area size limitation condition of each layer of the ripple pixel point distribution; and the brightness of each pixel point in the same layer of the ripple pixel point distribution is the same.
[0044] In the scheme, the pixel point brightness distribution of the spot in the processed device screen image is in a nested distribution, the pixel point brightness of the spot decreases layer by layer from the center of the spot outward, and each layer of the ripple pixel point is approximately a circular ring. According to the pixel point brightness distribution characteristics of the spot, the preset spot pixel point brightness distribution condition information comprises the nesting layer number of the ripple pixel point distribution when the to-be-tested connected domain has a spot and the area size limitation condition of each layer of the ripple pixel point distribution.
[0045] Specifically, the number of nested layers of the corrugated pixel point distribution and the area size of each layer of the corrugated pixel point distribution can be determined according to actual conditions, and the embodiments of the present application do not limit this. For example, the number of nested layers of the corrugated pixel point distribution is 3 or more, and the area size of each layer of the corrugated pixel point distribution is adaptively determined according to the area size of the to-be-measured connected domain and the number of nested layers of the corrugated pixel point distribution. If the area of the to-be-measured connected domain is small and the number of nested layers is large, the area of each layer of the corrugated pixel point distribution is small. If the area of the to-be-measured connected domain is large and the number of nested layers is small, the area of each layer of the corrugated pixel point distribution is large.
[0046] Step A3, if the preset light spot pixel point brightness distribution condition information is satisfied, it is determined that there is a light spot in the marked to-be-measured connected domain, and the position of the to-be-measured connected domain is taken as the light spot position.
[0047] For example, if the number of nested layers of the corrugated pixel point distribution is 3, the minimum area of the to-be-measured connected domain is greater than or equal to 10, and the maximum area is less than or equal to 200, the to-be-measured connected domain meeting the condition can be determined as the light spot position.
[0048] In the present scheme, the to-be-measured connected domain meeting the condition is determined through the preset light spot pixel point brightness distribution condition information, and then the light spot position is determined, thereby improving the accuracy of light spot detection.
[0049] Embodiment two
[0050] Figure 4 A flowchart of a light spot detection method provided for the second embodiment of the present application is provided, and the present embodiment is optimized based on the above-mentioned embodiments. The specific optimization is as follows: performing light spot corrugated diffusion processing on the to-be-measured device screen image to obtain a processed device screen image, including: determining at least two preset brightness intervals required by the to-be-measured device screen image; wherein each preset brightness interval is pre-divided according to brightness from low to high or from high to low, and each preset brightness interval is correspondingly configured with a preset brightness value; the to-be-measured device screen image is a gray-scale image; performing brightness matching on each to-be-measured pixel point brightness in the to-be-measured device screen image with the at least two preset brightness intervals to obtain a processed device screen image subjected to light spot corrugated diffusion processing.
[0051] As shown in Figure 4 , the method of the present embodiment specifically includes the following steps:
[0052] S210, determining a to-be-measured device screen image of a to-be-measured device.
[0053] S220, determining at least two preset brightness intervals required by the to-be-measured device screen image.
[0054] Each of the preset luminance intervals is obtained by pre-dividing from low to high or from high to low, and each preset luminance interval corresponds to a preset luminance value; the screen image of the to-be-tested device is a gray image.
[0055] In the embodiment of the application, the screen image of the to-be-tested device is converted into a gray image, so that the luminance of the pixel points is between 0 and 255, facilitating subsequent processing of the luminance of the pixel points.
[0056] Specifically, at least two preset luminance intervals are pre-divided from low to high or from high to low, and a luminance value in each preset luminance interval is taken as the preset luminance value corresponding to the preset luminance interval. For example, the step of setting the preset luminance interval is set to 5, and the luminance range is set to 10 to 255, so that the preset luminance intervals are (10, 15], (15, 20], (20, 25], (25, 30] and the like. The preset luminance value corresponding to each preset luminance interval can be 11, 16, 21, 26 and the like. It should be noted that the luminance of the pixel points less than or equal to 10 can be set to black to reduce the interference of the tiny luminance points.
[0057] In the embodiment of the application, the preset luminance value corresponding to each preset luminance interval can be the lowest luminance, the highest luminance or the intermediate luminance value in the preset luminance interval.
[0058] In the embodiment of the application, the preset luminance value corresponding to each preset luminance interval can be the lowest luminance, the highest luminance or the intermediate luminance value in the preset luminance interval, so that the difference between the preset luminance values corresponding to two adjacent preset luminance intervals is a fixed value, facilitating subsequent processing of the luminance of the pixel points.
[0059] S230, the luminance of each to-be-tested pixel point in the screen image of the to-be-tested device is matched with the at least two preset luminance intervals to obtain a processed device screen image processed by the spot wavy diffusion.
[0060] Specifically, the luminance of each to-be-tested pixel point in the screen image of the to-be-tested device is matched with the at least two preset luminance intervals, each pixel point is associated with the preset luminance interval corresponding to the pixel point, and a processed device screen image processed by the spot wavy diffusion is obtained. In the subsequent step, the association information of each pixel point and the preset luminance interval corresponding to the pixel point can be used to determine the position of the spot.
[0061] In the embodiment of the application, the luminance of each to-be-tested pixel point in the screen image of the to-be-tested device is matched with the at least two preset luminance intervals to obtain a processed device screen image processed by the spot wavy diffusion, including:
[0062] Step B1, for each of the at least two preset luminance intervals, determining a target pixel point with luminance in the preset luminance interval from each of the to-be-tested pixel points of the to-be-tested device screen image; the minimum luminance value of the at least two preset luminance intervals is determined based on the luminance of the pixel points in the preset sample image.
[0063] In the scheme, the interval step and the interval range of the at least two preset luminance intervals should be determined according to actual conditions, which can be determined by counting the minimum luminance value of each preset luminance interval based on the luminance information of the pixel points in the sample image, and then determining the interval step and the interval range of the at least two preset luminance intervals.
[0064] Specifically, for each of the at least two preset luminance intervals, a target pixel point with luminance in the preset luminance interval is determined from each of the to-be-tested pixel points of the to-be-tested device screen image. One specific implementation can be that all pixel points of the to-be-tested device screen image are traversed to determine in which preset luminance interval the luminance of each pixel point is located; another specific implementation can be that for a certain preset luminance interval, all pixel points of the to-be-tested device screen image are traversed to filter out the pixel points belonging to the preset luminance interval, and the above steps are repeated for the remaining preset luminance intervals.
[0065] Step B2, adjusting the luminance value of the target pixel point to the preset luminance value of the preset luminance interval.
[0066] For example, if the preset luminance interval is [10, 20] and the preset luminance value corresponding to the preset luminance interval is 15, the luminance value of the target pixel point in the preset luminance interval is adjusted to 15.
[0067] Step B3, obtaining a processed device screen image subjected to spot ripple diffusion processing according to the target pixel points corresponding to each preset luminance interval whose luminance is adjusted.
[0068] In the scheme, the processed device screen image with clear spot ripples is obtained, which facilitates subsequent spot detection. The spot in the image is shown in FIG. 2. Figure 3
[0069] Step B4, determining the position of the spot on the to-be-tested device screen image by performing connected domain detection on the processed device screen image.
[0070] The technical scheme of the embodiment of the present application divides the screen image of the to-be-tested device into at least two preset luminance intervals, and performs luminance matching on the luminance of each to-be-tested pixel point in the screen image of the to-be-tested device and the at least two preset luminance intervals, thereby obtaining the processed device screen image processed by the spot ripple diffusion, so that the processed device screen image can reflect the change of the luminance of the pixel point, and further reflect the spot ripple diffusion feature, thereby facilitating subsequent spot detection and improving the spot detection accuracy.
[0071] Embodiment three
[0072] Figure 5 A structure diagram of a spot detection device provided by the third embodiment of the present application is shown in FIG. 3. The device can perform the spot detection method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method. As shown in FIG. 3, the device comprises: Figure 5
[0073] A screen image determination module 310 is configured to determine a to-be-tested device screen image of a to-be-tested device.
[0074] A screen image processing module 320 is configured to perform spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image.
[0075] A spot position determination module 330 is configured to determine the position of a spot on the to-be-tested device screen image by performing connected domain detection on the processed device screen image.
[0076] Optionally, the screen image determination module 310 comprises:
[0077] An acquisition unit is configured to acquire a candidate device screen image of the to-be-tested device.
[0078] A preprocessing unit is configured to perform image preprocessing on the candidate device screen image to obtain the to-be-tested device screen image of the to-be-tested device. The image preprocessing comprises at least one of the following: graying, erosion, dilation, and filtering.
[0079] Optionally, the screen image processing module 320 comprises:
[0080] A preset luminance interval determination unit is configured to determine at least two preset luminance intervals required by the to-be-tested device screen image. Each of the preset luminance intervals is obtained by pre-dividing the luminance from low to high or from high to low, and each preset luminance interval is configured with a preset luminance value. The to-be-tested device screen image is a gray-scale image.
[0081] A luminance matching unit is configured to perform luminance matching on the luminance of each to-be-tested pixel point in the to-be-tested device screen image and the at least two preset luminance intervals, thereby obtaining the processed device screen image processed by the spot ripple diffusion.
[0082] Further, the luminance matching unit comprises:
[0083] a target pixel point determination subunit configured to determine, for each of at least two preset luminance intervals, a target pixel point with luminance in the preset luminance interval from each of the to-be-tested pixel points of the to-be-tested device screen image, and determine minimum luminance values of the at least two preset luminance intervals based on luminance of pixel points in a preset sample image;
[0084] a luminance value adjustment subunit configured to adjust the luminance value of the target pixel point to a preset luminance value of the preset luminance interval;
[0085] a device screen image determination subunit configured to obtain a processed device screen image subjected to spot ripple diffusion processing according to the target pixel point corresponding to each of the preset luminance intervals with adjusted luminance.
[0086] Specifically, the preset luminance value corresponding to each preset luminance interval is configured to be the lowest luminance, the highest luminance or the intermediate luminance value in the preset luminance interval.
[0087] Optionally, the spot position determination module 330 comprises:
[0088] a to-be-tested connected domain determination unit configured to determine at least one to-be-tested connected domain from the processed device screen image and mark the to-be-tested connected domain;
[0089] a judgment unit configured to detect whether the luminance distribution of pixel points in the marked to-be-tested connected domain meets preset spot pixel point luminance distribution condition information, wherein the preset spot pixel point luminance distribution condition information comprises a nesting layer number of ripple pixel point distribution when the spot exists in the to-be-tested connected domain and an area size limit condition of each layer of ripple pixel point distribution, and the luminance of each pixel point in the same layer of ripple pixel point distribution is the same;
[0090] a spot position determination unit configured to determine that the spot exists in the marked to-be-tested connected domain and take the position of the to-be-tested connected domain as the spot position if the preset spot pixel point luminance distribution condition information is met.
[0091] The spot detection device provided in the embodiment of the present application can execute the spot detection method provided in any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0092] Embodiment four
[0093] Figure 6A structural diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0094] As shown, Figure 6 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected in communication with the at least one processor 11, where the memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded into the random access memory (RAM) 13 from the storage unit 18. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, speakers, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0096] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the light spot detection method.
[0097] In some embodiments, the light spot detection method can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 18. In some embodiments, parts or all of the computer program can be loaded and / or installed onto electronic device 10 via, e.g., ROM 12 and / or communication unit 19. When the computer program is loaded onto RAM 13 and executed by processor 11, one or more steps of the light spot detection method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the light spot detection method by other means, e.g., with the aid of firmware.
[0098] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0099] Computer programs used to implement the processes of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0100] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0102] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0104] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.
[0105] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A light spot detection method, characterized by, The method comprises the following steps: determining a to-be-tested device screen image of a to-be-tested device; performing spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image; determining a spot position on the to-be-tested device screen image by performing connected domain detection on the processed device screen image; wherein the spot ripple diffusion processing on the to-be-tested device screen image to obtain the processed device screen image comprises: determining at least two preset luminance intervals required by the to-be-tested device screen image; wherein each of the preset luminance intervals is pre-divided according to luminance from low to high or from high to low, and each preset luminance interval is configured with a preset luminance value; the to-be-tested device screen image is a grayscale image; performing luminance matching between luminance of each to-be-tested pixel point in the to-be-tested device screen image and the at least two preset luminance intervals to obtain the processed device screen image subjected to the spot ripple diffusion processing.
2. The method of claim 1, wherein, The method comprises the following steps: obtaining a candidate device screen image of the to-be-tested device; performing image preprocessing on the candidate device screen image to obtain the to-be-tested device screen image of the to-be-tested device; the image preprocessing comprises at least one of the following: graying, erosion, dilation and filtering.
3. The method of claim 1, wherein, The method comprises the following steps: for each of the at least two preset luminance intervals, determining target pixel points with luminance in the preset luminance interval from each to-be-tested pixel point of the to-be-tested device screen image; the minimum luminance value of the at least two preset luminance intervals is determined based on statistics of pixel point luminance in a preset sample image; adjusting the luminance value of the target pixel points to the preset luminance value of the preset luminance interval; obtaining the processed device screen image subjected to the spot ripple diffusion processing according to the target pixel points corresponding to each preset luminance interval with adjusted luminance.
4. The method of claim 3, wherein, The preset luminance value corresponding to each preset luminance interval is the lowest luminance, the highest luminance or the intermediate luminance value in the preset luminance interval.
5. The method of claim 1, wherein, The method comprises the following steps: determining at least one to-be-tested connected domain from the processed device screen image and marking the to-be-tested connected domain; detecting whether the luminance distribution of pixel points in the marked to-be-tested connected domain meets preset spot pixel point luminance distribution condition information; the preset spot pixel point luminance distribution condition information comprises the nesting layer number of ripple pixel point distribution and the area size limitation condition of each layer of ripple pixel point distribution when the to-be-tested connected domain has a spot; the luminance of each pixel point in the same layer of ripple pixel point distribution is the same; if the preset spot pixel point luminance distribution condition information is met, it is determined that the to-be-tested connected domain has a spot, and the position of the to-be-tested connected domain is taken as the spot position.
6. A light spot detection apparatus characterized by comprising: The device comprises: a screen image determination module configured to determine a to-be-tested device screen image of a to-be-tested device; a screen image processing module configured to perform spot ripple diffusion processing on the to-be-tested device screen image to obtain a processed device screen image. The spot position determination module is configured to determine the spot position on the screen image of the to-be-tested device by performing connected domain detection on the processed screen image of the device. The screen image processing module comprises: A preset brightness interval determination unit is configured to determine at least two preset brightness intervals required by the screen image of the to-be-tested device, wherein each of the preset brightness intervals is pre-divided according to brightness from low to high or from high to low, and each preset brightness interval is configured with a preset brightness value; the screen image of the to-be-tested device belongs to a gray-scale image; A brightness matching unit is configured to perform brightness matching between the brightness of each to-be-tested pixel point in the screen image of the to-be-tested device and the at least two preset brightness intervals, so as to obtain the processed screen image of the device subjected to spot wave-shaped diffusion processing.
7. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the spot detection method of any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the spot detection method of any one of claims 1-5 when executed.
Citation Information
Patent Citations
Laser spot center position and contour acquisition method
CN110533601A
Equipment screen light spot detection method and device
CN114332016A