Detection Method, Device, Equipment and Storage Medium for Epidermal Contour
By enhancing image and connecting breakpoints to the epidermal panoramic images in the ultrasound imaging system, combined with the preset contour detection algorithm, the problems of low efficiency and error-prone skin contour measurement in the ultrasound imaging system are solved, and high accuracy and high efficiency detection are achieved.
Patent Information
- Application Number
- CN202210363075.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-04-07
AI Technical Summary
When measuring the contour of the skin surface, existing ultrasound imaging systems require manual schema by doctors, resulting in inefficient measurement and prone to errors.
By obtaining the panoramic image of the epidermis, image enhancement is performed to eliminate aliasing boundaries and reduce noise. Then breakpoint connections are made based on preset structural elements to ensure continuous and no breakage of the skin surface tissue. Finally, contour detection is performed using the preset contour detection algorithm to obtain the contour coordinates of the panoramic image of the epidermis.
Effectively eliminate noise interference from isolated points, avoid defects in boundary outlines, improve detection accuracy, and do not require users to manually draw contours to improve detection efficiency.
Smart Images

Figure CN114757961B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and particularly to a method, device, equipment and storage medium for detecting an epidermal contour. Background Art
[0002] In some application scenarios of an ultrasonic imaging system, in order to assist a doctor in diagnostic analysis, it is necessary to measure the contour of the skin surface. At present, the ultrasonic imaging system provides traditional measurement tools. By manually tracing the contour of the target skin area and then automatically calculating the size of the contour using the traditional measurement tools of the ultrasonic imaging system, it is used to assist the doctor's analysis. However, the traditional measurement tools require the doctor to manually trace the contour of the skin surface, resulting in low measurement efficiency and prone to errors in manual measurement. Summary of the Invention
[0003] The present application provides a method, device, equipment and storage medium for detecting an epidermal contour to solve the technical problem of low detection efficiency of the current epidermal contour.
[0004] To solve the above technical problem, in a first aspect, the present application provides a method for detecting an epidermal contour, including:
[0005] Obtain a panoramic epidermal image, which is obtained by stitching multiple frames of sequential ultrasonic images;
[0006] Perform image enhancement on the panoramic epidermal image to obtain an enhanced epidermal image;
[0007] Based on a preset structural element, perform break point connection on the enhanced epidermal image to obtain a target epidermal image;
[0008] Use a preset contour detection algorithm to perform contour detection on the target epidermal image to obtain the contour coordinates of the panoramic epidermal image.
[0009] The present application performs image enhancement on the panoramic epidermal image to obtain an enhanced epidermal image, eliminates the jagged boundary problem caused by image stitching, and reduces image noise; then based on a preset structural element, performs break point connection on the enhanced epidermal image to obtain a target epidermal image to ensure that the skin surface tissues on the image are connected without breakage, thereby improving the image integrity; finally, uses a preset contour detection algorithm to perform contour detection on the target epidermal image to obtain the contour coordinates of the panoramic epidermal image. The present application can effectively exclude the interference of isolated point noise, avoid defects in boundary delineation, improve the detection accuracy, and at the same time, without the need for the user to manually trace the contour, improve the detection efficiency.
[0010] Preferably, performing image enhancement on the panoramic epidermal image to obtain an enhanced epidermal image includes:
[0011] Perform Gaussian smoothing on the epidermal panoramic image based on the tangential direction of the skin surface, and perform differential enhancement on the epidermal panoramic image based on the perpendicular direction of the skin surface to obtain an enhanced epidermal image.
[0012] Preferably, performing Gaussian smoothing on the epidermal panoramic image based on the tangential direction of the skin surface, and performing differential enhancement on the epidermal panoramic image based on the perpendicular direction of the skin surface to obtain an enhanced epidermal image, includes:
[0013] Perform horizontal gradient processing and vertical gradient processing on the epidermal panoramic image to obtain a horizontal gradient image and a vertical gradient image;
[0014] Based on the horizontal gradient image and the vertical gradient image, determine the tangential direction and the perpendicular direction of the skin surface;
[0015] Use a preset Gaussian smoothing filter to perform Gaussian smoothing on the epidermal panoramic image according to the tangential direction to obtain a first enhanced image;
[0016] Use a preset Laplacian sharpening filter to perform differential enhancement on the epidermal panoramic image according to the perpendicular direction to obtain a second enhanced image;
[0017] Fuse the first enhanced image and the second enhanced image to obtain an enhanced epidermal image.
[0018] Preferably, perform breakpoint connection on the enhanced epidermal image based on a preset structural element to obtain a target epidermal image, including:
[0019] Use a morphological dilation algorithm to perform breakpoint connection on the enhanced epidermal image according to the preset structural elements corresponding to multiple skin directions to obtain a target epidermal image.
[0020] Preferably, the preset structural element includes a first kernel function corresponding to the horizontal direction of the skin, a second kernel function corresponding to a first preset angle in the horizontal direction of the skin, and a third kernel function corresponding to a second preset angle in the horizontal direction of the skin, and the first preset angle and the second preset angle are horizontally symmetric.
[0021] Preferably, use a preset contour detection algorithm to perform contour detection on the target epidermal image to obtain the contour coordinates of the epidermal panoramic image, including:
[0022] Perform binarization on the target epidermal image to obtain the gray-scale data of the target epidermal image;
[0023] Use a preset mask to perform gray-scale search on the target epidermal image, and calculate the total gray-scale value within the image area covered by the preset mask according to the gray-scale data;
[0024] Determine the center point of each image region with a gray value sum greater than a preset threshold as the boundary point of the epidermal panoramic image, and obtain the contour coordinates of the epidermal panoramic image.
[0025] Preferably, use a preset mask to perform gray value search on the target epidermal image, and calculate the total gray value within the image region covered by the preset mask according to the gray value data, including:
[0026] Use multiple preset two-dimensional matrix masks to perform row-by-row search on the target epidermal image for each column of the target epidermal image, where each column corresponds to a preset two-dimensional matrix mask, and the mask width of the preset two-dimensional matrix mask is the width of one image pixel point;
[0027] For each preset two-dimensional matrix mask, calculate the total gray value of the preset two-dimensional matrix mask for each row.
[0028] In a second aspect, the present application provides a device for detecting an epidermal contour, including:
[0029] An acquisition module for acquiring an epidermal panoramic image, which is obtained by stitching multiple frames of sequential ultrasonic images;
[0030] An enhancement module for enhancing the epidermal panoramic image to obtain an epidermal enhanced image;
[0031] A connection module for connecting breakpoints of the epidermal enhanced image based on a preset structural element to obtain a target epidermal image;
[0032] A detection module for detecting the contour of the target epidermal image using a preset contour detection algorithm to obtain the contour coordinates of the epidermal panoramic image.
[0033] In a third aspect, the present application provides a computer device, including a processor and a memory, where the memory is used to store a computer program, and when the computer program is executed by the processor, it implements the method for detecting an epidermal contour as in the first aspect.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by the processor, it implements the method for detecting an epidermal contour as in the first aspect.
[0035] It should be noted that for the beneficial effects of the above second aspect to the fourth aspect, please refer to the relevant descriptions of the above first aspect, and will not be elaborated here. Description of the Drawings
[0036] Figure 1 It is a schematic flowchart of the method for detecting an epidermal contour shown in the embodiments of the present application;
[0037] Figure 2Schematic diagram of the epidermal panoramic image shown in the embodiment of the present application;
[0038] Figure 3 Schematic diagram of the epidermal enhanced image shown in the embodiment of the present application;
[0039] Figure 4 Schematic diagram of the epidermal image before breakpoint connection shown in the embodiment of the present application;
[0040] Figure 5 Schematic diagram of the target epidermal image after breakpoint connection shown in the embodiment of the present application;
[0041] Figure 6 Schematic diagram of the image after contour detection shown in the embodiment of the present application;
[0042] Figure 7 Schematic diagram of the structure of the detection device for the epidermal contour shown in the embodiment of the present application;
[0043] Figure 8 Schematic diagram of the structure of the computer device shown in the embodiment of the present application. Detailed implementation manners
[0044] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0045] As recorded in the related art, the ultrasonic imaging system provides traditional measurement tools. By manually tracing the contour of the target skin area and then automatically calculating the size of the contour using the traditional measurement tools of the ultrasonic imaging system, it assists the doctor's analysis. However, the traditional measurement tools require the doctor to manually trace the contour of the skin surface, with low measurement efficiency and prone to errors in manual measurement.
[0046] Therefore, the embodiment of the present application provides a method for detecting the epidermal contour. By obtaining the epidermal panoramic image, performing image enhancement on the epidermal panoramic image to obtain an epidermal enhanced image, eliminating the jagged boundary problem caused by image stitching and reducing image noise; then based on a preset structural element, performing breakpoint connection on the epidermal enhanced image to obtain a target epidermal image to ensure that the skin surface tissues on the image are connected without breaks, thereby improving the image integrity; finally, using a preset contour detection algorithm to perform contour detection on the target epidermal image to obtain the contour coordinates of the epidermal panoramic image. The present application can effectively exclude the interference of isolated point noise, avoid defects in boundary delineation, improve the detection accuracy, and at the same time, without the need for the user to manually trace the contour, improve the detection efficiency.
[0047] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a method for detecting an epidermal contour provided by an embodiment of the present application. The method for detecting an epidermal contour in the embodiment of the present application can be applied to a computer device, and the computer device includes, but is not limited to, devices such as ultrasonic devices, smartphones, laptop computers, tablet computers, desktop computers, physical servers, and cloud servers. As Figure 1 shown, the method for detecting an epidermal contour in this embodiment includes steps S101 to S104, which are described in detail as follows:
[0048] Step S101, obtain a panoramic epidermal image, where the panoramic epidermal image is obtained by stitching multiple frames of sequential ultrasonic images.
[0049] In this step, the sequential ultrasonic images are a series of images collected by an ultrasonic device through a probe. Optionally, the user moves the probe on the skin surface. During the movement of the probe, the probe continuously emits ultrasonic signals to the skin tissue and receives the corresponding echo signals, thereby obtaining a series of ultrasonic images. After stitching the ultrasonic images, a panoramic epidermal image is obtained.
[0050] Optionally, the panoramic epidermal image can be an image pre-stored in a preset database collected by the ultrasonic device, or an image collected in real time by the ultrasonic device.
[0051] Step S102, perform image enhancement on the panoramic epidermal image to obtain an enhanced epidermal image.
[0052] In this step, since sawtooth boundaries inevitably appear in different frames of sequential ultrasonic images during the stitching of the panoramic epidermal image, in order to eliminate the sawtooth boundary problem, the present application performs image enhancement on the panoramic epidermal image. Optionally, image enhancement includes, but is not limited to, processing methods such as image binarization, Gaussian smoothing, and differential enhancement.
[0053] Step S103, perform breakpoint connection on the enhanced epidermal image based on a preset structural element to obtain a target epidermal image.
[0054] In this step, the preset structural element is a basic structure with a certain definite shape in image morphological operations, and it generally has rotational invariance or mirror invariance, that is, the origin of the structural element is at its geometric center, and the surrounding pixels are symmetric about the origin.
[0055] Since in the field of image processing, binary processing is usually required, and for skin images, if there are weak echo regions in the skin tissue, the region after binary processing may have a gray value of 0, that is, there is a break in the skin tissue. Therefore, the present application performs endpoint connection on the target epidermal image to ensure the continuity of the skin tissue in the target epidermal image.
[0056] Optionally, there may be multiple preset structural elements.
[0057] Step S104, using a preset contour detection algorithm, perform contour detection on the target epidermal image to obtain the contour coordinates of the epidermal panoramic image.
[0058] In this step, the preset contour detection algorithm includes but is not limited to the level set method, the snake point method, and the gray scale statistical algorithm. The present application can effectively exclude the interference of isolated point noise, avoid defects in boundary delineation, improve the detection accuracy, and at the same time, it does not require the user to manually trace the contour, improving the detection efficiency.
[0059] In one embodiment, on the basis of the Figure 1 shown embodiment, the step S102 includes:
[0060] Perform Gaussian smoothing on the epidermal panoramic image based on the tangent direction of the skin surface, and perform differential enhancement on the epidermal panoramic image based on the perpendicular direction of the skin surface to obtain the epidermal enhanced image.
[0061] In this embodiment, as shown in the Figure 2 epidermal panoramic image, the skin surface contour on the epidermal panoramic image has a certain thickness. Therefore, the skin surface contour not only needs to have continuity in the horizontal direction, but also needs to have continuity with a certain thickness in the depth direction (longitudinal direction). For this reason, the present application performs Gaussian smoothing on the epidermal panoramic image based on the tangent direction of the skin surface, that is, in the horizontal direction, to improve the continuity of the skin surface contour in the horizontal direction; perform differential enhancement on the epidermal panoramic image based on the perpendicular direction of the skin surface, that is, in the depth direction, to improve the continuity of the skin surface contour in the depth direction.
[0062] It should be noted that the tangent direction and the perpendicular direction are perpendicular.
[0063] In an alternative embodiment, the image enhancement step includes:
[0064] Perform horizontal gradient processing and vertical gradient processing on the epidermal panoramic image to obtain a horizontal gradient image and a vertical gradient image;
[0065] Based on the horizontal gradient image and the vertical gradient image, determine the tangent direction and the perpendicular direction of the skin surface;
[0066] Using a preset Gaussian smoothing filter, perform Gaussian smoothing on the epidermal panoramic image according to the tangent direction to obtain a first enhanced image;
[0067] Using a preset Laplacian sharpening filter, perform differential enhancement on the epidermal panoramic image according to the perpendicular direction to obtain a second enhanced image;
[0068] Fuse the first enhanced image and the second enhanced image to obtain the epidermal enhanced image.
[0069] In this alternative embodiment, during the image stitching process, it is inevitable that there will be tiny jagged boundaries at the stitching gaps between frames. In a grayscale image, the jagged edges are not easily detected due to the unobvious gray level changes. However, when converting the grayscale image to a binary image, since the gray levels are only 0 and 1 and the changes are drastic, the jagged edges become very obvious. If the boundaries are outlined directly on such an image, the detection results will be very poor. Therefore, in this application, the jagged noise is removed in the grayscale image, including performing Gaussian smoothing along the tangent direction of the skin surface and performing differential enhancement on the gray level contrast in the direction perpendicular to the skin surface.
[0070] Exemplarily, calculate the gradients of the epidermal panoramic image horizontally and vertically respectively to obtain a horizontal gradient image GradX and a vertical gradient image GradY. The corresponding MATLAB pseudocode is: [GradX, GradY]=gradient(ImageIn);
[0071] According to the horizontal gradient image GradX and the vertical gradient image GradY, calculate the slope of each pixel point, that is, obtain the tangent direction. The corresponding MATLAB pseudocode is: Slope = GradX / Grad;
[0072] Use a set of one-dimensional Gaussian smoothing filters to perform Gaussian smoothing on the epidermal panoramic image:
[0073]
[0074] Use a set of one-dimensional Laplacian sharpening filters to perform differential enhancement on the epidermal panoramic image:
[0075]
[0076] Where SHARP is a parameter used to characterize the image edge sharpening intensity. The larger its value, the stronger the image edge sharpening. Its value is greater than 1 and usually can be 8 - 10. σ is the standard deviation and w is the order of the Laplacian sharpening filter.
[0077] Finally, fuse the first enhanced image and the second enhanced image to obtain the epidermal enhanced image:
[0078] ImgOut = kernelPerpendicular(kernelParallel(ImageIn)).
[0079] As Figure 3 shown in the epidermis enhancement image, not only is the edge region of the image processed as above smooth and continuous, but also the gray level and contrast can be improved.
[0080] In one embodiment, based on the embodiment shown in Figure 1 , connecting the breakpoints of the epidermis enhancement image based on the preset structural element to obtain the target epidermis image, including:
[0081] Using the morphological dilation algorithm, based on the preset structural elements corresponding to multiple skin directions, connecting the breakpoints of the epidermis enhancement image to obtain the target epidermis image.
[0082] In this embodiment, after the sawtooth processing, the image is binarized. According to the panoramic image feature, the region above the skin surface has a gray value of 0. After binarizing the image first, the tissue gray value is set to 1. Considering the particularity of the image gray level, in this application, only the image gray values greater than 1 are set to 1 to obtain an ideal binarized image, and other gray threshold segmentation algorithms such as the Otsu threshold segmentation method are also applicable. At this time, if there is a weak echo region in the tissue, the gray value may be 0. To ensure the continuity of the tissue on the skin surface without breakage. As Figure 4 shown in the schematic diagram of the epidermis image before breakpoint connection, Figure 5 shown in the schematic diagram of the target epidermis image after breakpoint connection, this application uses the morphological dilation algorithm to fill the image, which can ensure the continuity of the skin tissue.
[0083] Optionally, due to the particularity of the skin surface contour, three groups of linear kernel functions are designed in the embodiments of this application to connect the breakpoints according to the skin trend, that is, the kernel function direction is consistent with the skin trend.
[0084] The preset structural element includes a first kernel function corresponding to the skin horizontal direction, a second kernel function corresponding to a first preset angle in the skin horizontal direction, and a third kernel function corresponding to a second preset angle in the skin horizontal direction. The first preset angle and the second preset angle are horizontally symmetric.
[0085] Optionally, the first preset angle is 30°, and the second preset angle is -30°.
[0086] Exemplarily, the first kernel function Kernel1, the second kernel function Kernel2, and the third kernel function Kernel3 are as follows:
[0087]
[0088]
[0089]
[0090] In one embodiment, based on the embodiment shown, the method for detecting the contour of the target epidermal image by using a preset contour detection algorithm to obtain the contour coordinates of the epidermal panoramic image includes: Figure 1 Binarize the target epidermal image to obtain the gray-scale data of the target epidermal image;
[0091] Use a preset mask to perform gray-scale search on the target epidermal image, and calculate the total gray value within the image area covered by the preset mask according to the gray-scale data;
[0092] Determine the center point of each image area with the total gray value greater than the preset threshold as the boundary point of the epidermal panoramic image, so as to obtain the contour coordinates of the epidermal panoramic image.
[0093] In this embodiment, compared with the level set method and the snake point method, the energy function algorithm has the problems of time-consuming and difficult to find the convergence condition. The gray-scale statistical method adopted in this embodiment can save the algorithm processing time.
[0094] Optionally, the size of the preset mask is preferably an odd number, that is, the preset mask is composed of an odd number of pixel points. For example, if the size of the preset mask is width 1×height 5, the center point is the 3rd pixel point. It can be understood that when the size of the preset mask is an even number, it can be one of the two points close to the center. For example, if the size of the preset mask is width 1×height 6, the two points close to the center are the 3rd point and the 4th point, and one of the 3rd point and the 4th point is used as the center point.
[0095] In an alternative embodiment, the gray-scale search step:
[0096] Use a plurality of preset two-dimensional matrix masks to perform row-by-row search on each column of the target epidermal image, where each column corresponds to one of the preset two-dimensional matrix masks, and the mask width of the preset two-dimensional matrix mask is the width of one image pixel point;
[0097] For each of the preset two-dimensional matrix masks, calculate the total gray value of the preset two-dimensional matrix mask in each row.
[0098] In this alternative embodiment, as
[0099] Figure 6 Schematic diagram of the image after contour detection is shown. Exemplarily, a two-dimensional matrix mask template with an element of 1, a width equal to the image width, and a height of 5 is formulated. Search row by row from top to bottom. Each time it moves, it is necessary to sum the data in the area covered by each column of the mask template. When the sum value is greater than a certain threshold (usually 3), it is determined that this position is a boundary point.
[0100] At this time, the search of this column of the mask template stops, and the mask templates of other columns continue to search downward until the boundary points of each column of the mask template are found and the search stops. Connect the boundary coordinates searched by each column of the mask template in sequence to obtain the contour of the skin surface. This method can effectively exclude the interference of isolated point noise, avoid defects in boundary delineation, and at the same time, each column of the mask template is independent of each other during the search process, so all can be processed in parallel, saving the algorithm processing time.
[0101] In order to execute the detection method of the epidermal contour corresponding to the above method embodiment to achieve the corresponding functions and technical effects. Refer to Figure 7 , Figure 7 The structural block diagram of a detection device for epidermal contour provided by an embodiment of the present application is shown. For the convenience of description, only the parts related to this embodiment are shown. The detection device for epidermal contour provided by the embodiment of the present application includes:
[0102] An acquisition module 701, configured to acquire an epidermal panoramic image, where the epidermal panoramic image is obtained by stitching multiple frames of sequential ultrasound images;
[0103] An enhancement module 702, configured to perform image enhancement on the epidermal panoramic image to obtain an epidermal enhanced image;
[0104] A connection module 703, configured to perform break point connection on the epidermal enhanced image based on a preset structural element to obtain a target epidermal image;
[0105] A detection module 704, configured to perform contour detection on the target epidermal image by using a preset contour detection algorithm to obtain the contour coordinates of the epidermal panoramic image.
[0106] In one embodiment, based on the embodiment shown in Figure 7 the enhancement module 702 includes:
[0107] An enhancement unit, configured to perform Gaussian smoothing on the epidermal panoramic image based on the tangent direction of the skin surface, and perform differential enhancement on the epidermal panoramic image based on the perpendicular direction of the skin surface to obtain the epidermal enhanced image.
[0108] Optionally, the enhancement unit includes:
[0109] A processing subunit for performing horizontal gradient processing and vertical gradient processing on the epidermal panoramic image to obtain a horizontal gradient image and a vertical gradient image;
[0110] A determination subunit for determining the tangent direction and perpendicular direction of the skin surface based on the horizontal gradient image and the vertical gradient image;
[0111] A smoothing subunit for performing Gaussian smoothing on the epidermal panoramic image according to the tangent direction by using a preset Gaussian smoothing filter to obtain a first enhanced image;
[0112] A differential subunit for performing differential enhancement on the epidermal panoramic image according to the perpendicular direction by using a preset Laplacian sharpening filter to obtain a second enhanced image;
[0113] A fusion subunit for fusing the first enhanced image and the second enhanced image to obtain the epidermal enhanced image.
[0114] In one embodiment, based on the embodiment shown in Figure 7 the connection module 703 includes:
[0115] A connection unit for performing breakpoint connection on the epidermal enhanced image according to preset structural elements corresponding to multiple skin directions by using a morphological dilation algorithm to obtain the target epidermal image.
[0116] Optionally, the preset structural elements include a first kernel function corresponding to the skin horizontal direction, a second kernel function corresponding to a first preset angle in the skin horizontal direction, and a third kernel function corresponding to a second preset angle in the skin horizontal direction, and the first preset angle and the second preset angle are horizontally symmetric.
[0117] In one embodiment, based on the embodiment shown in Figure 7 the detection module 704 includes:
[0118] A binarization unit for binarizing the target epidermal image to obtain the gray-scale data of the target epidermal image;
[0119] A search unit for performing gray-scale search on the target epidermal image by using a preset mask and calculating the total gray-scale value within the image area covered by the preset mask according to the gray-scale data;
[0120] A determination unit for determining the center point of each image area with the total gray-scale value greater than a preset threshold as the boundary point of the epidermal panoramic image to obtain the contour coordinates of the epidermal panoramic image.
[0121] In one embodiment, based on the embodiment shown in Figure 7Based on the illustrated embodiments, the search unit includes:
[0122] A search subunit, configured to perform a row-by-row search on the target epidermal image on each column of the target epidermal image by using a plurality of preset two-dimensional matrix masks, where each column corresponds to one of the preset two-dimensional matrix masks, and the mask width of the preset two-dimensional matrix mask is the width of one image pixel point;
[0123] A calculation subunit, configured to calculate the total gray value of each preset two-dimensional matrix mask on each row for each of the preset two-dimensional matrix masks.
[0124] The above-described epidermal contour detection device can implement the epidermal contour detection method of the above method embodiment. The optional items in the above method embodiment are also applicable to this embodiment and will not be elaborated here. The remaining content of the embodiments of the present application can refer to the content of the above method embodiment and will not be repeated in this embodiment.
[0125] Figure 8 It is a schematic structural diagram of a terminal device provided in an embodiment of the present application. As Figure 8 shown, the terminal device 8 in this embodiment includes: at least one processor 80 ( Figure 8 only one is shown in the figure), a processor, a memory 81, and a computer program 82 stored in the memory 81 and executable on the at least one processor 80. When the processor 80 executes the computer program 82, the steps in any of the above method embodiments are implemented.
[0126] The terminal device 8 may be a computing device such as a smart phone, a tablet computer, a desktop computer, and a cloud server. The terminal device may include, but is not limited to, the processor 80 and the memory 81. Those skilled in the art can understand that Figure 8 merely examples of the terminal device 8 do not constitute a limitation on the terminal device 8, and may include more or fewer components than shown in the figure, or combine some components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0127] The so-called processor 80 may be a Central Processing Unit (CPU), and the processor 80 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0128] In some embodiments, the memory 81 may be an internal storage unit of the terminal device 8, such as the hard disk or memory of the terminal device 8. In other embodiments, the memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the terminal device 8. Further, the memory 81 may also include both the internal storage unit and the external storage device of the terminal device 8. The memory 81 is used to store an operating system, application programs, a BootLoader, data, and other programs, such as the program code of the computer program. The memory 81 may also be used to temporarily store data that has been output or is to be output.
[0129] In addition, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0130] An embodiment of the present application provides a computer program product, and when the computer program product runs on a terminal device, the terminal device is caused to implement the steps in each of the above method embodiments when executed.
[0131] In several embodiments provided in this application, it can be understood that each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, the program segment, or the part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in an order different from that marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
[0132] If the described functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a terminal device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0133] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are only specific embodiments of this application and are not used to limit the protection scope of this application. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.
Claims
1. A method for detecting the epidermal contour, characterized in that Comprising: Obtaining a panoramic epidermal image, which is obtained by stitching multiple frames of sequential ultrasonic images; Performing image enhancement on the panoramic epidermal image to obtain an enhanced epidermal image; specifically including: performing horizontal gradient processing and vertical gradient processing on the panoramic epidermal image to obtain a horizontal gradient image and a vertical gradient image; determining the tangent direction and the perpendicular direction of the skin surface based on the horizontal gradient image and the vertical gradient image; using a preset Gaussian smoothing filter to perform Gaussian smoothing on the panoramic epidermal image according to the tangent direction to obtain a first enhanced image; using a preset Laplacian sharpening filter to perform differential enhancement on the panoramic epidermal image according to the perpendicular direction to obtain a second enhanced image; fusing the first enhanced image and the second enhanced image to obtain the enhanced epidermal image; Based on a preset structural element, performing break point connection on the enhanced epidermal image to obtain a target epidermal image; specifically including: using a morphological dilation algorithm to perform break point connection on the enhanced epidermal image according to the preset structural elements corresponding to multiple skin directions to obtain the target epidermal image; the preset structural elements include a first kernel function corresponding to the horizontal direction of the skin, a second kernel function corresponding to a first preset angle in the horizontal direction of the skin, and a third kernel function corresponding to a second preset angle in the horizontal direction of the skin, and the first preset angle and the second preset angle are horizontally symmetric; Using a preset contour detection algorithm to perform contour detection on the target epidermal image to obtain the contour coordinates of the panoramic epidermal image.
2. The method for detecting the epidermal contour according to claim 1, characterized in that, The step of using a preset contour detection algorithm to perform contour detection on the target epidermal image to obtain the contour coordinates of the panoramic epidermal image includes: Performing binarization on the target epidermal image to obtain the gray scale data of the target epidermal image; Using a preset mask to perform gray scale search on the target epidermal image, and calculating the total gray scale value within the image area covered by the preset mask according to the gray scale data; Determining the center point of each image area with the total gray scale value greater than a preset threshold as the boundary point of the panoramic epidermal image to obtain the contour coordinates of the panoramic epidermal image.
3. The method for detecting the epidermal contour according to claim 2, wherein The step of using a preset mask to perform gray scale search on the target epidermal image and calculating the total gray scale value within the image area covered by the preset mask according to the gray scale data includes: Using multiple preset two-dimensional matrix masks to perform row-by-row search on the target epidermal image for each column of the target epidermal image, where each column corresponds to one of the preset two-dimensional matrix masks, and the mask width of the preset two-dimensional matrix mask is the width of one image pixel; For each of the preset two-dimensional matrix masks, calculating the total gray scale value of the preset two-dimensional matrix mask for each row.
4. A detection device for epidermal contour, characterized in that, Comprising: An acquisition module for acquiring a panoramic epidermal image, which is obtained by stitching multiple frames of sequential ultrasonic images; An enhancement module for enhancing the epidermal panoramic image to obtain an enhanced epidermal image; specifically including: performing horizontal gradient processing and vertical gradient processing on the epidermal panoramic image to obtain a horizontal gradient image and a vertical gradient image; determining the tangent direction and perpendicular direction of the skin surface based on the horizontal gradient image and the vertical gradient image; using a preset Gaussian smoothing filter to perform Gaussian smoothing on the epidermal panoramic image according to the tangent direction to obtain a first enhanced image; using a preset Laplacian sharpening filter to perform differential enhancement on the epidermal panoramic image according to the perpendicular direction to obtain a second enhanced image; fusing the first enhanced image and the second enhanced image to obtain the enhanced epidermal image; A connection module for connecting breakpoints of the enhanced epidermal image based on a preset structural element to obtain a target epidermal image; specifically including: using a morphological dilation algorithm to connect breakpoints of the enhanced epidermal image according to preset structural elements corresponding to multiple skin directions to obtain the target epidermal image; the preset structural elements include a first kernel function corresponding to the skin horizontal direction, a second kernel function corresponding to a first preset angle in the skin horizontal direction, and a third kernel function corresponding to a second preset angle in the skin horizontal direction, and the first preset angle and the second preset angle are horizontally symmetric; A detection module for detecting the contour of the target epidermal image by using a preset contour detection algorithm to obtain the contour coordinates of the epidermal panoramic image.
5. A computer device, characterized in that, It includes a processor and a memory, and the memory is used to store a computer program, and when the computer program is executed by the processor, it implements the method for detecting the epidermal contour according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, it implements the method for detecting the epidermal contour according to any one of claims 1 to 3.
Citation Information
Patent Citations
Extraction method of skin area in medical image
CN105590322A
Transmission line identification method and device
CN107103324A
A laser printed digital string recognition method for breaking adhesion
CN109086769A