Light area contour extraction method, device and equipment and storage medium

By addressing existing technical issues, constructing a brightness response map using gradient magnitude, expanding the boundaries of bright areas, and building a brightness mask map, this method solves the technical problems existing in the prior art. It possesses stronger structural adaptability and interference robustness, and can stably extract structural high-brightness region contour information from complex industrial images with multiple exposure interference, uneven illumination, and overexposure of bright areas, which are present in the prior art.

CN121074075APending Publication Date: 2025-12-05HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511168581.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing methods for extracting bright areas struggle to accurately extract the contours of bright areas in complex industrial images with multiple exposure interference, uneven lighting, and overexposure of bright areas. Traditional methods are prone to problems such as edge breakage, shape distortion, or structural loss.

Method used

A luminous response map is constructed by using gradient magnitude, the boundary of the luminous region is expanded, a luminous extraction threshold is constructed and a luminous mask map is generated, connected component filtering and closing operations are performed to obtain the contour of the luminous region.

Benefits of technology

In complex industrial images, it can stably extract the structural contours of bright areas, has stronger structural adaptability and interference robustness, and restores the true aggregate structure contours of bright areas, thus solving the technical problems existing in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074075A_ABST
    Figure CN121074075A_ABST
Patent Text Reader

Abstract

The invention discloses a light area contour extraction method and device, equipment and a storage medium. The method comprises the following steps: carrying out light area extraction on a high-exposure grayscale picture based on a gradient magnitude to obtain a light response diagram; performing light area boundary expansion on the light response diagram to obtain a boundary expansion diagram; a bright light extraction threshold value is constructed according to the boundary expansion graph, a bright light mask graph is constructed according to the bright light extraction threshold value, and the bright light mask graph comprises effective boundary points; and carrying out connected region filtering and closed operation on the bright light mask pattern to obtain a bright light region contour. A light response diagram and a self-adaptive extraction mechanism are constructed through gradient amplitudes, a real set structure contour of a highlight area can be recovered under the condition of not depending on edge closure and gradient continuity, and the method has higher structure adaptability and interference robustness and is suitable for large-scale popularization and application. Therefore, structural highlight area contour information is stably extracted from a complex industrial image with multiple exposure interferences, uneven illumination and bright area overexposure.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a bright area contour extraction method, device and equipment and storage medium. BACKGROUND

[0002] In the field of computer vision and image analysis, bright area contour extraction is an important basic task, which is widely used in industrial defect detection, metal reflection processing, optical image recognition and target detection processing scenes. Generally, the bright area presents a high gray value and has certain fuzzy edge and halo transition characteristics. Traditional bright area extraction includes edge detection method using Sobel or Canny operator, histogram distribution analysis method or deep learning method.

[0003] However, the edge detection method determines the region contour by extracting the edge with large gradient change in the image, but the bright area often has a smooth transition fuzzy boundary, which causes edge breakage and contour unclosed, seriously affecting the usability of the segmentation result; the histogram distribution analysis method analyzes the image gray histogram and uses Otsu or multi-threshold method for image segmentation, but such method is extremely sensitive to the proportion of bright area in the image, and often cannot adapt to the case where the bright area is small and the gray distribution change is not obvious; the deep learning method has strong adaptability, but it depends on a large number of labeled samples, and still has recognition deviation problem in the industrial image with fuzzy edge and serious brightness drift, and has large calculation overhead, which is not suitable for lightweight deployment. Therefore, the algorithm based on local threshold or edge operator in the traditional bright area extraction method is prone to edge breakage, shape distortion or structure loss. SUMMARY

[0004] The present application provides a bright area contour extraction method, device, equipment and storage medium to realize accurate extraction of bright area contour.

[0005] According to the first aspect of the present application, a bright area contour extraction method is provided, comprising: performing bright area extraction on a high-exposure gray picture based on gradient amplitude to obtain a bright response map;

[0006] Performing bright area boundary expansion on the bright response map to obtain a boundary expansion map;

[0007] Constructing a bright extraction threshold according to the boundary expansion map, and constructing a bright mask map according to the bright extraction threshold, wherein the bright mask map includes effective boundary points;

[0008] Performing connected region filtering and closing operation on the bright mask map to obtain a bright area contour.

[0009] According to another aspect of the present application, there is provided a bright area contour extraction device, comprising: a bright response map extraction module configured to perform bright area extraction on a high-exposure gray-scale picture based on gradient amplitude to obtain a bright response map;

[0010] a boundary-extended bright response map obtaining module configured to perform bright area boundary extension on the bright response map to obtain a boundary-extended map;

[0011] a bright mask map construction module configured to construct a bright extraction threshold according to the boundary-extended map, and construct a bright mask map according to the bright extraction threshold, wherein the bright mask map comprises effective boundary points;

[0012] a bright area contour obtaining module configured to perform connected region filtering and close operation on the bright mask map to obtain a bright area contour.

[0013] According to another aspect of the present application, there is provided an electronic device, comprising:

[0014] at least one processor; and

[0015] a memory connected to the at least one processor in communication; wherein,

[0016] 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 method according to any one of the embodiments of the present application.

[0017] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for enabling a processor to perform the method according to any one of the embodiments of the present application.

[0018] According to another aspect of the present application, there is provided a computer program product comprising a computer program executable by a processor to perform the method according to any one of the embodiments of the present application.

[0019] The present application has the beneficial technical effect that, by constructing a bright response map based on gradient amplitude and an adaptive extraction mechanism, the real set structure contour of a high-brightness area can be restored without relying on edge closure and gradient continuity, and the structure has stronger structure adaptability and interference robustness, so that the structural high-brightness area contour information can be stably extracted in a complex industrial image with multiple exposure interference, uneven illumination and overexposure of bright areas.

[0020] It is to be understood that the details set forth in the description contained herein do not limit the scope of the application. Other embodiments of the application will be readily apparent to those skilled in the art from the description herein. With reference to the drawings, embodiments of the application are herein described. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.

[0022] Figure 1 is a flow chart of a bright area contour extraction method according to the first embodiment of the present application;

[0023] Figure 2 is a flow chart of a bright area contour extraction method according to the second embodiment of the present application;

[0024] Figure 3 is a structural schematic diagram of a bright area contour extraction device according to the third embodiment of the present application;

[0025] Figure 4 is a structural schematic diagram of an electronic device according to the fourth embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the technical personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should belong to the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", and the like in the description and in the claims of the present application and the above-described accompanying drawings are used to distinguish similar objects, and do not necessarily have to be used 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 application described herein can be implemented in an order other than that 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 only 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. In addition, the collected information is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards of relevant countries and regions, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal

[0028] Embodiment one

[0029] Figure 1 A flowchart of a financial medium inspection method is provided for the first embodiment of the application. The present embodiment can be applied to the efficient inspection of financial media. The method can be executed by a financial medium inspection device, which can be implemented in the form of hardware and / or software. As shown in Figure 1 The method comprises the following steps:

[0030] In step S101, a highlight area of a high-exposure grayscale picture is extracted based on a gradient amplitude to obtain a highlight response map.

[0031] Optionally, the highlight area of the high-exposure grayscale picture is extracted based on the gradient amplitude to obtain the highlight response map, comprising: calculating the gradient amplitude of each point in the high-exposure grayscale picture; and extracting the highlight area of the high-exposure grayscale picture based on the gradient amplitude of each point to obtain the highlight response map.

[0032] In the present embodiment, the high-exposure grayscale picture can be a picture taken during part detection in industrial production, and the highlight profile information includes a long strip, a circle or an irregular shape. Since the highlight area usually spans multiple shapes, directions and positions, and the reflected light intensity changes greatly with position, the traditional local threshold or gradient extraction method lacks global recognition ability. Therefore, the profile extraction method based on gradient amplitude is proposed in the present embodiment.

[0033] Specifically, in the high-exposure grayscale image collected in the embodiment, most of the pixels are concentrated in the high-light area, for example, 150-255, and the dark part accounts for a low proportion, for example, only 5%, thus presenting a cliff-like distribution, and can be represented by , is an image coordinate position, After obtaining the high-exposure grayscale image, the first-order gradient of each point in the image is calculated by using the following formula (1):

[0034]

[0035] After obtaining the first-order gradient of each point, the gradient amplitude of each point is calculated by using the following formula (2):

[0036]

[0037] In the embodiment, the gradient amplitude can be approximately calculated by using a Sobel operator, which is used for subsequent structure perception. Of course, the embodiment is only an example and does not limit the specific calculation method of the gradient amplitude. After obtaining the gradient amplitude, the high-exposure grayscale image can be subjected to light area extraction according to the gradient amplitude of each point to obtain a light response map. In the light response map, the approximate outline of the light area is displayed by lines. The light response map can be specifically represented by using the following formula (3) light response function:

[0038]

[0039] wherein, is a high-exposure grayscale image; is a gradient amplitude; is a constant; controls the brightness guide flow intensity, .

[0040] In step S102, the light area boundary of the light response map is expanded to obtain a boundary expansion map.

[0041] Optionally, the light area boundary of the light response map is expanded to obtain a boundary expansion map, including: calculating a Gaussian convolution kernel of the light response map; performing Gaussian blur processing on the light area according to the Gaussian convolution kernel to expand the boundary of the light area; and obtaining a boundary expansion map according to the boundary expansion result of the light area.

[0042] Specifically, the Gaussian convolution kernel of the light response map is calculated by using the following formula (4) in the embodiment:

[0043]

[0044] wherein, For the diffusion radius, after obtaining the Gaussian convolution kernel, the Gaussian blur processing can be performed on the bright area according to the Gaussian convolution kernel to expand the boundary of the bright area, and the boundary expansion map is obtained according to the boundary expansion result of the bright area. Therefore, the boundary expansion map is roughly the same as the bright response map, but the region outline is more complete compared to the bright response map, and the boundary expansion map can be specifically expressed by the boundary expansion function of the following formula (5):

[0045]

[0046] In the embodiment, the above-mentioned bright response function has constructed a joint driving field of brightness and edge, which is used to highlight the real bright area in the image. In order to simulate the spatial expansion and gradual change characteristics of brightness, the above-mentioned bright response function is processed by Gaussian simulation in the above-mentioned manner, so that the obtained boundary expansion map can retain the core structure of the bright area while expanding the boundary area.

[0047] Step S103, constructing a bright extraction threshold according to the boundary expansion map, and constructing a bright mask map according to the bright extraction threshold.

[0048] Optionally, constructing a bright extraction threshold according to the boundary expansion map, and constructing a bright mask map according to the bright extraction threshold, comprising: calculating the mean and standard deviation of the boundary expansion map, and constructing the bright extraction threshold according to the mean and standard deviation; retaining the effective boundary points in the boundary expansion map that are greater than the extraction threshold to generate the bright mask map.

[0049] Specifically, in the embodiment, the adaptive bright extraction threshold is constructed using image statistics based on the boundary expansion map. First, the mean of the boundary expansion map is calculated by the following formula (6) in the embodiment:

[0050] (6)

[0051] Wherein, is the boundary expansion function, W is the image width, H is the image height, and N=WxH is the total number of image pixels. The mean of the boundary expansion map can obtain the average level of the bright response of the whole image. In addition, the standard deviation of the boundary expansion map is calculated by the following formula (7) in the embodiment:

[0052] (7)

[0053] The standard deviation of the boundary expansion map can obtain the brightness variation range of the whole image, that is, the difference between the bright area and the non-bright area. By the two statistical quantities, it can be judged which area is obviously brighter than the whole. After obtaining the mean and standard deviation of the boundary expansion map, the adaptive light extraction threshold can be constructed by using the following formula (8):

[0054]

[0055] The mean of the standard deviation of the boundary expansion map, is the standard deviation, is the offset control factor, which is usually set to [0.5, 1.5]. In this embodiment, the mean and standard deviation are used because the brightness distribution in the image is often non-uniform. Sometimes the background is very bright, and sometimes it is very dark. A fixed threshold cannot adapt to all images, so an adaptive judgment standard is needed. After the light extraction threshold is constructed, the effective boundary points in the boundary expansion map that are greater than the extraction threshold can be reserved to generate a light mask map by using the following formula (9):

[0056]

[0057] In the light mask map, all effective boundary points are included because the light mask map is a binary image that identifies the region contour.

[0058] In step S104, the light mask map is filtered by a connected region and a closed operation to obtain a light region contour.

[0059] Optionally, the light mask map is filtered by a connected region and a closed operation to obtain a light region contour, including: obtaining a mask region composed of effective boundary points in the light mask map, and a mask area of each mask region; obtaining a pre-set area threshold, and determining a target mask region whose mask area is greater than the area threshold; retaining the target mask region, and performing a closed operation on the target mask region to obtain a light region contour.

[0060] Optionally, the target mask region is closed to obtain a light region contour, including: filling and repairing missing points in the target mask region to obtain a repaired complete target mask region; extracting edge effective boundary points of the repaired complete target mask region, and connecting the edge effective boundary points to generate a light region contour.

[0061] Specifically, in this embodiment, a mask region composed of effective points in the light mask map is obtained. The light mask map in this embodiment can include multiple mask regions, which are not limited in this embodiment. The mask area of each mask region and the pre-set area threshold are obtained ​For example, 300 pixels, and the area of the ith connected region is , the target mask region satisfying wherein is retained. After obtaining the target mask region, a closing operation is performed on the target mask region to obtain a bright light region contour. The closing operation is mainly used to repair and close the incomplete structure in the bright light mask, so that the subsequent extracted contour region is more accurate, continuous and real. Therefore, the dilation and erosion techniques are used. If there are small 0 pixels, that is, small black dots, in the bright light region, the closing operation can fill them to prevent the formation of broken contours. For the bright light region with discontinuous edges or broken edges, the closing operation can connect the adjacent regions to obtain a complete closed structure to obtain a bright light region contour graph, so that the edge contour of the complete closed part is included in the bright light region contour graph.

[0062] In the embodiment, the structural high-light region edge information can be stably extracted in a complex industrial image with multiple exposure interference, uneven illumination and overexposure of bright areas. In particular, in the case where the target contour is in the form of a long strip, a circle or an irregular shape, the traditional algorithm based on local threshold or edge operator is prone to edge breakage, shape distortion or structure loss. In contrast, the present application can restore the real geometric structure contour of the high-light region without relying on edge closure and gradient continuity, thereby having stronger structural adaptability and interference robustness, and being suitable for pre-processing of industrial vision detection tasks under high exposure illumination conditions. The simulation output structure diagram is the edge contour information recognized by the method.

[0063] In the embodiment, the gradient amplitude is used to construct a bright light response graph and an adaptive extraction mechanism, which can restore the real set structure contour of the high-light region without relying on edge closure and gradient continuity, has stronger structural adaptability and interference robustness, and can stably extract the structural high-light region contour information in a complex industrial image with multiple exposure interference, uneven illumination and overexposure of bright areas.

[0064] Embodiment Two

[0065] Figure 2 A bright light region contour extraction method flowchart is provided for the second embodiment of the present application. Based on the above-mentioned embodiment, after filtering the connected regions of the bright light mask and performing a closing operation to obtain the bright light region contour, the bright light region contour is superimposed and displayed on the high-exposure gray-scale picture. As shown in Figure 2 , the method comprises:

[0066] Step S201, performing bright light region extraction based on the gradient amplitude to obtain a bright light response graph.

[0067] Optionally, the high-exposure gray picture is subjected to light area extraction based on the gradient amplitude to obtain a light response map, including: calculating the gradient amplitude of each point in the high-exposure gray picture; and performing light area extraction on the high-exposure gray picture according to the gradient amplitude of each point to obtain the light response map.

[0068] Step S202, the light response map is subjected to light area boundary expansion to obtain a boundary expansion map.

[0069] Optionally, the light response map is subjected to light area boundary expansion to obtain a boundary expansion map, including: calculating a Gaussian convolution kernel of the light response map; performing Gaussian blur processing on the light area according to the Gaussian convolution kernel to expand the boundary of the light area; and obtaining the boundary expansion map according to the boundary expansion result of the light area.

[0070] Step S203, constructing a light extraction threshold according to the boundary expansion map, and constructing a light mask map according to the light extraction threshold.

[0071] Optionally, the light extraction threshold is constructed according to the boundary expansion map, and the light mask map is constructed according to the light extraction threshold, including: calculating the mean and standard deviation of the boundary expansion map, and constructing the light extraction threshold according to the mean and standard deviation; and retaining the effective boundary points in the boundary expansion map that are greater than the extraction threshold to generate the light mask map.

[0072] Step S204, performing connected region filtering and closing operation on the light mask map to obtain a light area contour.

[0073] Optionally, the light mask map is subjected to connected region filtering and closing operation to obtain a light area contour, including: obtaining a mask area composed of effective boundary points in the light mask map, and a mask area of each mask area; obtaining a preset area threshold, and determining a target mask area whose mask area is greater than the area threshold; retaining the target mask area, and performing closing operation on the target mask area to obtain the light area contour.

[0074] Optionally, the target mask area is subjected to closing operation to obtain a light area contour, including: filling and repairing missing points in the target mask area to obtain a repaired complete target mask area; extracting edge effective boundary points of the repaired complete target mask area, and connecting the edge effective boundary points to generate the light area contour.

[0075] Step S205, superimposing and displaying the light area contour on the high-exposure gray picture.

[0076] Specifically, in the embodiment, after the bright area contour is acquired, the acquired bright area contour is superimposed on the high-exposure gray picture to acquire a contour superimposition picture. Of course, the embodiment is only an example and does not limit the specific acquisition manner of the contour superimposition picture, which is within the protection scope of the application.

[0077] It should be noted that when the contour is obviously unmatched with the bright area through superimposition, for example, the contour is only half of the area of the bright area, it is determined that the acquired bright area contour is incorrect, and an alarm prompt such as "the current contour is incorrect, please determine again" is given, so as to prompt the user to maintain the software or hardware device in time, thereby improving the bright area contour determination efficiency and accuracy.

[0078] In the embodiment of the application, the bright response map is constructed by the gradient amplitude and the adaptive extraction mechanism, the real set structure contour of the highlight area can be restored without relying on the edge closure and the gradient continuity, the structure adaptive ability and the interference robustness are stronger, and therefore the structural highlight area contour information can be stably extracted in the complex industrial image with multiple exposure interference, uneven illumination and overexposure of the bright area.

[0079] Embodiment three

[0080] Figure 3 A structure schematic diagram of a bright area contour extraction device provided for the embodiment three of the application is shown in FIG. 3. Figure 3 As shown in the figure, the device comprises a bright response map extraction module 310, a boundary extended bright response map acquisition module 320, a bright mask map construction module 330 and a bright area contour acquisition module 340.

[0081] The bright response map extraction module 310 is configured to perform bright area extraction based on the gradient amplitude of the high-exposure gray picture to acquire a bright response map.

[0082] The boundary extended bright response map acquisition module 320 is configured to perform bright area boundary extension on the bright response map to acquire a boundary extended map.

[0083] The bright mask map construction module 330 is configured to construct a bright extraction threshold according to the boundary extended map and construct a bright mask map according to the bright extraction threshold, wherein the bright mask map comprises effective boundary points.

[0084] The bright area contour acquisition module 340 is configured to perform connected region filtering and close operation on the bright mask map to acquire a bright area contour.

[0085] Optionally, the bright response map extraction module is configured to calculate the gradient amplitude of each point in the high-exposure gray picture.

[0086] According to the gradient amplitude of each point, a high-exposure gray picture is subjected to light region extraction to obtain a light response map.

[0087] Optionally, the boundary-extended light response map obtaining module is configured to calculate a Gaussian convolution kernel of the light response map.

[0088] The Gaussian blur processing is performed on the light region according to the Gaussian convolution kernel to extend the boundary of the light region.

[0089] The boundary-extended map is obtained according to the boundary extension result of the light region.

[0090] Optionally, the light mask map constructing module is configured to calculate the mean and standard deviation of the boundary-extended map, and construct a light extraction threshold according to the mean and standard deviation.

[0091] The effective boundary points greater than the extraction threshold in the boundary-extended map are reserved to generate the light mask map.

[0092] Optionally, the light region contour obtaining module is configured to obtain a mask region composed of the effective boundary points in the light mask map, and a mask area of each mask region.

[0093] An area threshold is obtained, and a target mask region with a mask area greater than the area threshold is determined.

[0094] The target mask region is reserved, and a closed operation is performed on the target mask region to obtain a light region contour.

[0095] Optionally, the light region contour obtaining module is configured to perform a filling repair on missing points in the target mask region to obtain a repaired target mask region.

[0096] An edge effective boundary point of the repaired target mask region is extracted, and the edge effective boundary point is connected to generate a light region contour.

[0097] The light region contour extraction device provided in the embodiments of the present application can execute the light region contour extraction method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0098] Embodiment Four

[0099] Figure 4A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0100] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0101] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0102] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of 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 suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the bright area contour extraction method.

[0103] In some embodiments, the application to the highlight region profile extraction 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 above-described highlight region profile extraction method can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the highlight region profile extraction method by other any suitable means, e.g., with the aid of firmware.

[0104] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), 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.

[0105] Computer programs used to implement the methods 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 and partially on a remote machine or entirely on a remote machine or server.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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. Servers can be cloud servers, also known as cloud computing servers or cloud hosts, which are a host product in the cloud computing service system to solve the defects of great management difficulty and weak business scalability in traditional physical hosts and VPS services.

[0110] Embodiment five

[0111] The embodiment of the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the bright area contour extraction method provided in any embodiment of the present application.

[0112] The computer program code in the computer program product may, and occasionally does, run entirely on the user's computer, in part on the user's computer, in part on the remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0113] It should be noted that in the embodiments of the present application, some software, components, models and the like of the prior art may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but does not mean that the applicant has or will necessarily use the scheme.

[0114] Note that the above are only the preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A bright area profile extraction method, characterized by, The method comprises: Performing light area extraction on a high-exposure gray picture based on gradient amplitude to obtain a light response map; Performing light area boundary expansion on the light response map to obtain a boundary expansion map; Constructing a light extraction threshold according to the boundary expansion map, and constructing a light mask map according to the light extraction threshold, wherein the light mask map comprises effective boundary points; Performing connected region filtering and closing operation on the light mask map to obtain a light area contour.

2. The method of claim 1, wherein, The light area extraction on the high-exposure gray picture based on the gradient amplitude to obtain the light response map comprises: Calculating the gradient amplitude of each point in the high-exposure gray picture; Performing light area extraction on the high-exposure gray picture according to the gradient amplitude of each point to obtain the light response map.

3. The method of claim 2, wherein, The light area boundary expansion on the light response map to obtain the boundary expansion map comprises: Calculating a Gaussian convolution kernel of the light response map; Performing Gaussian blur processing on the light area according to the Gaussian convolution kernel to perform boundary expansion on the light area; Obtaining the boundary expansion map according to the boundary expansion result of the light area.

4. The method of claim 1, wherein, The construction of the light extraction threshold according to the boundary expansion map, and the construction of the light mask map according to the light extraction threshold comprises: Calculating the mean and standard deviation of the boundary expansion map, and constructing the light extraction threshold according to the mean and the standard deviation; Reserving the effective boundary points in the boundary expansion map that are greater than the extraction threshold to generate the light mask map.

5. The method of claim 1, wherein, The connected region filtering and closing operation on the light mask map to obtain the light area contour comprises: Obtaining a mask area composed of the effective boundary points in the light mask map, and a mask area of each mask area; Obtaining a pre-set area threshold, and determining a target mask area whose mask area is greater than the area threshold; Reserving the target mask area, and performing closing operation on the target mask area to obtain the light area contour.

6. The method of claim 5, wherein, The closing operation on the target mask area to obtain the light area contour comprises: Filling and repairing missing points in the target mask area to obtain a repaired complete target mask area; Extracting edge effective boundary points of the repaired complete target mask area, and connecting the edge effective boundary points to generate the light area contour.

7. A highlight region contour extraction apparatus characterized by comprising: The device comprises: A light response map extraction module configured to perform light area extraction on a high-exposure gray picture based on gradient amplitude to obtain a light response map; A boundary expansion light response map obtaining module configured to perform light area boundary expansion on the light response map to obtain a boundary expansion map; A light mask map construction module configured to construct a light extraction threshold according to the boundary expansion map, and construct a light mask map according to the light extraction threshold, wherein the light mask map comprises effective boundary points; A light area contour obtaining module configured to perform connected region filtering and closing operation on the light mask map to obtain a light area contour.

8. An electronic device, comprising: The electronic device comprises: At least one processor; and A memory connected in communication with the at least one processor; wherein The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a processor to implement the method of any one of claims 1-6 when executed.

10. A computer program product, characterised in that, A computer program is included, the computer program being executed by a processor to implement the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Multispectral micro-imaging field depth extension method and system

    CN106327442A

  • Semitrailer surface welding slag optimization segmentation method based on image processing

    CN115760884A

  • Image highlight processing method

    CN118761943A

  • Contour extraction apparatus, contour extraction method, and computer program for contour extraction

    JP2018045488A

  • Shadow and highlight detection system and method of the same in surveillance camera and recording medium thereof

    US20090087025A1