Scalp image processing method and device and electronic equipment

By displaying and processing continuous multi-frame scalp images in real time on the terminal device, pre-processing, motion compensation and image fusion, the problem of poor scalp image quality in the prior art is solved, and efficient and clear scalp image processing effect is achieved.

CN120111355APending Publication Date: 2025-06-06BEIJING YONGHE MEDICAL INVESTMENT MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510256452.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The scalp image quality captured by existing scalp image acquisition devices on the computer is poor, mainly due to the jitter of the handle, resulting in blurred photos.

Method used

By displaying the scalp images captured by the handle on the terminal device in real time, accumulating continuous multi-frame images at the corresponding moment of the photo instruction, performing preprocessing and motion compensation alignment, scoring and image fusion, to generate an optimized scalp image.

Benefits of technology

Significantly improves the processing efficiency and diagnostic accuracy of scalp images, ensuring that the final generated optimized image is both clear and reliable, and reducing blur and artifacts due to handle jitter or displacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120111355A_ABST
    Figure CN120111355A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a scalp image processing method and device and electronic equipment, the method is applied to scalp image acquisition equipment, the equipment comprises a handle configured with a lens and terminal equipment connected with the handle, and the method comprises the following steps: displaying a scalp image acquired by the handle on the terminal equipment in real time; when the terminal equipment receives a photographing instruction from the handle, acquiring continuous multi-frame scalp images at the moment corresponding to the photographing instruction; preprocessing the plurality of frames of scalp images to obtain a plurality of first intermediate state images; eliminating the displacement of each first intermediate-state image through a motion compensation and alignment technology to obtain a plurality of aligned second intermediate-state images; performing definition scoring on each second intermediate state image to obtain a scoring result; and carrying out image fusion on the second intermediate state image according to a scoring result to obtain a scalp optimization image corresponding to the photographing instruction. The method improves the processing efficiency and diagnosis accuracy of the scalp image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a scalp image processing method, device and electronic equipment. Background Art

[0002] At present, the principle of taking pictures of scalp image acquisition devices is to press the photo button to take a picture of the scalp after receiving the photo command sent by the handle, and then transmit the taken picture to the computer. The computer receives the picture and takes a screenshot of the picture. Due to the operation shaking of the handle at this time, the picture may be blurred.

[0003] Therefore, the image quality of the scalp image captured on the computer side is poor. Summary of the invention

[0004] The purpose of the present invention is to provide a scalp image processing method, device and electronic device to alleviate the technical problem of poor image quality of scalp images captured on a computer side and improve the image quality.

[0005] In a first aspect, an embodiment of the present invention provides a scalp image processing method, which is applied to a scalp image acquisition device, wherein the scalp image acquisition device includes a handle configured with a preset magnification lens and a terminal device connected to the handle, and the method includes: displaying the scalp image acquired by the handle on the terminal device in real time; when the terminal device receives a photo-taking instruction from the handle, acquiring a continuous plurality of scalp images at a time corresponding to the photo-taking instruction; preprocessing the plurality of scalp images to obtain a plurality of first intermediate state images; eliminating the displacement of each of the first intermediate state images through motion compensation and alignment technology to obtain a plurality of aligned second intermediate state images; performing clarity scoring on each of the second intermediate state images to obtain a scoring result; and performing image fusion on the second intermediate state images according to the scoring result to obtain a scalp optimized image corresponding to the photo-taking instruction.

[0006] In a preferred embodiment of the present invention, the step of performing clarity scoring on each of the above-mentioned second intermediate state images to obtain a scoring result includes: performing global clarity scoring on the above-mentioned second intermediate state images to obtain a global clarity score for each of the above-mentioned second intermediate state images; screening target second intermediate state images with a value greater than a preset threshold from the above-mentioned global clarity scores; dividing each of the above-mentioned target second intermediate state images into a plurality of sub-images based on preset parameters; performing local clarity scoring on each of the above-mentioned multiple sub-images to obtain a local clarity score for each of the above-mentioned sub-images; and performing image fusion on the above-mentioned second intermediate state images according to the above-mentioned scoring results to obtain a scalp optimized image corresponding to the above-mentioned photographing instruction. The step includes: performing image fusion on the above-mentioned target second intermediate state images according to each of the above-mentioned sub-images and the local clarity score of each of the above-mentioned sub-images to obtain a scalp optimized image corresponding to the above-mentioned photographing instruction.

[0007] In a preferred embodiment of the present invention, the step of performing image fusion on the target second intermediate state image according to each of the above-mentioned sub-images and the local clarity score of each of the above-mentioned sub-images to obtain the scalp optimized image corresponding to the above-mentioned photographing instruction includes: selecting, from the above-mentioned sub-images, the first target sub-image with the highest local clarity score corresponding to each of the above-mentioned image positions according to the image positions in the above-mentioned target second intermediate state image corresponding to the above-mentioned sub-images; splicing the above-mentioned first target sub-images corresponding to each of the above-mentioned image positions, and performing Poisson fusion on the splicing boundaries of each of the above-mentioned first target sub-images to obtain the scalp optimized image corresponding to the above-mentioned photographing instruction.

[0008] In a preferred embodiment of the present invention, the step of performing image fusion on the target second intermediate state image according to each of the above-mentioned sub-images and the local clarity score of each of the above-mentioned sub-images to obtain a scalp optimized image corresponding to the above-mentioned photographing instruction includes: setting weight coefficients for the above-mentioned sub-images according to the local clarity scores of the above-mentioned sub-images; performing weighted averaging on the above-mentioned weight coefficients according to the number of frames corresponding to the above-mentioned sub-images to obtain a normalized weight coefficient; and synthesizing the pixel value of each of the above-mentioned image positions according to the above-mentioned normalized weight coefficients and the pixel values ​​of the above-mentioned sub-images to obtain the scalp optimized image corresponding to the above-mentioned photographing instruction.

[0009] In a preferred embodiment of the present invention, the step of synthesizing the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain the scalp optimized image corresponding to the photographing instruction includes: synthesizing the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain a preliminary processed image; performing motion detection on the preliminary processed image to obtain an image jitter area; and performing median filtering on the image jitter area to obtain the scalp optimized image corresponding to the photographing instruction.

[0010] In a preferred embodiment of the present invention, after the step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photographing instruction, the method further comprises: performing sharpening enhancement on the scalp optimized image to obtain an enhanced image; adjusting the contrast of the enhanced image based on contrast limited histogram equalization to obtain a contrast enhanced image; and adjusting the resolution of the contrast enhanced image by super-resolution reconstruction technology to output a resolution enhanced image.

[0011] In a preferred embodiment of the present invention, the step of adjusting the resolution of the contrast-enhanced image by super-resolution reconstruction technology and outputting the resolution-enhanced image includes: adjusting the resolution of the contrast-enhanced image based on a pre-trained super-resolution convolutional neural network and an improved version of the super-resolution convolutional neural network, and outputting the resolution-enhanced image.

[0012] In a preferred embodiment of the present invention, after the step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photo taking instruction, the method further includes: performing quality assessment on the scalp optimized image based on a preset image quality assessment index, and outputting a quality assessment result.

[0013] In a second aspect, an embodiment of the present invention further provides a scalp image processing device, which is applied to a scalp image acquisition device, which includes a handle equipped with a preset magnification lens and a terminal device connected to the handle, and the device includes: a display module, which is used to display the scalp image acquired by the handle in real time on the terminal device; an acquisition module, which is used to acquire multiple continuous frames of scalp images at the moment corresponding to the photo-taking instruction when the terminal device receives a photo-taking instruction from the handle; an anti-shake processing module, which is used to pre-process the multiple frames of scalp images to obtain multiple first intermediate state images; eliminate the displacement of each of the first intermediate state images through motion compensation and alignment technology to obtain multiple aligned second intermediate state images; perform clarity scoring on each of the second intermediate state images to obtain a scoring result; and perform image fusion on the second intermediate state images according to the scoring result to obtain a scalp optimized image corresponding to the photo-taking instruction.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the scalp image processing method.

[0015] The embodiments of the present invention have the following beneficial technical effects:

[0016] The embodiment of the present invention provides a scalp image processing method, device and electronic device, the method is applied to a scalp image acquisition device, the scalp image acquisition device includes a handle equipped with a preset magnification lens and a terminal device connected to the handle, the method includes: displaying the scalp image acquired by the handle in real time on the terminal device; when the terminal device receives a photo command from the handle, obtaining a continuous multi-frame scalp image at the corresponding moment of the photo command; preprocessing the multi-frame scalp image to obtain a plurality of first intermediate state images; eliminating the displacement of each of the first intermediate state images by motion compensation and alignment technology to obtain a plurality of aligned second intermediate state images; performing clarity scoring on each of the second intermediate state images to obtain a scoring result; performing image fusion on the second intermediate state images according to the scoring result to obtain a scalp optimized image corresponding to the photo command. The method significantly improves the processing efficiency and diagnostic accuracy of scalp images through multi-frame image acquisition, real-time preprocessing, motion compensation alignment, clarity scoring and image fusion, and ensures that the optimized image finally generated is both clear and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic flow chart of a scalp image processing method provided by an embodiment of the present invention;

[0019] Figure 2 A schematic flow chart of another scalp image processing method provided by an embodiment of the present invention;

[0020] Figure 3 A schematic structural diagram of a scalp image processing device provided by an embodiment of the present invention;

[0021] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0022] Icons: 31 - display module; 32 - acquisition module; 33 - anti-shake processing module; 41 - memory; 42 - processor; 43 - bus; 44 - communication interface. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0024] The current scalp image acquisition process is as follows: when the handle issues a photo command, the user presses the photo button to take a photo of the scalp, and the image is then transmitted to the computer. The computer receives the photo and takes a screenshot. However, during this process, the operation of the handle may cause shaking, resulting in blurry photos. Therefore, the scalp image quality finally obtained on the computer is poor.

[0025] Based on this, the embodiments of the present invention provide a scalp image processing method, device and electronic device, which significantly improves the processing efficiency and diagnostic accuracy of scalp images through multi-frame image acquisition, real-time preprocessing, motion compensation alignment, clarity scoring and image fusion, ensuring that the optimized image finally generated is both clear and reliable. For ease of understanding, a scalp image processing method is first introduced.

[0026] Example 1

[0027] In this embodiment, Figure 1 A schematic flow chart of a scalp image processing method provided by an embodiment of the present invention.

[0028] The method is applied to a scalp image acquisition device, which includes a handle equipped with a lens with a preset magnification and a terminal device connected to the handle.

[0029] Here, the above-mentioned preset magnification lenses include: 1x lens, 50x lens and 200x lens.

[0030] Depend on Figure 1 As can be seen, the above methods include:

[0031] Step S101: Displaying the scalp image collected by the handle in real time on the terminal device.

[0032] Step S102: When the terminal device receives a photographing instruction from the handle, a plurality of continuous frames of scalp images at a time corresponding to the photographing instruction are obtained.

[0033] When the terminal device receives the photo command sent by the handle, the above device will immediately start capturing multiple frames of scalp images at that moment. This means that at the moment the photo button is pressed, the device will not only take a static image, but will continuously capture multiple images in a very short time (for example, within a few milliseconds). Doing so can capture more details, and through subsequent processing steps (such as alignment, clarity scoring, and image fusion), the best parts can be extracted from these multiple frames to generate a high-quality scalp optimized image. This process ensures clear and accurate images even in the case of slight shaking or movement.

[0034] Step S103: pre-processing the multiple frames of scalp images to obtain multiple first intermediate state images.

[0035] In actual operation, the process of preprocessing the above-mentioned multiple frames of scalp images may include: first, converting the received continuous multiple frames of color scalp images into grayscale images to reduce the interference of color information and focus on the image structure features; then, using a Gaussian filter to remove random noise in each grayscale image to improve the image quality; then, enhancing the image contrast through a histogram equalization method to make the fine structure of the scalp more obvious; then, adjusting all images to a uniform standard size to ensure the consistency of subsequent processing; finally, cropping the image according to the field of view of the handle lens, retaining the main observation area, and removing irrelevant parts.

[0036] After these steps, multiple first intermediate state images are finally obtained. These images have removed noise, enhanced contrast, and have consistent sizes, laying a good foundation for subsequent motion compensation and alignment processing.

[0037] Step S104: eliminating the displacement of each of the first intermediate state images by motion compensation and alignment technology to obtain a plurality of aligned second intermediate state images.

[0038] In actual operation, in order to eliminate the displacement in each first intermediate state image, the motion compensation algorithm is first used to analyze the pixel changes between adjacent frames, identify and estimate the slight movement or jitter that the handle may produce during the shooting process. Then, through feature point matching and affine transformation technology, each frame of the image is aligned with the reference frame (usually a frame or an average of multiple frames in the sequence) to ensure that all images are spatially consistent. For example, when processing 5 first intermediate state images, the displacement parameters of each image relative to the reference frame are calculated, and these parameters are applied for precise adjustment.

[0039] After this series of operations, multiple aligned second intermediate state images are finally obtained. These images not only eliminate the displacement caused by handle shaking, but also maintain high resolution and clarity, providing a reliable basis for subsequent clarity scoring and image fusion.

[0040] Step S105: performing clarity scoring on each of the second intermediate state images to obtain a scoring result.

[0041] In the actual application process, in order to score the clarity of each second intermediate state image, a variety of image quality assessment algorithms (such as Laplacian operator, edge gradient detection, etc.) are used to automatically analyze the sharpness and detail retention of the image. For example, when processing 5 aligned second intermediate state images, the clarity score of each image is calculated separately. Assume that the scoring results are: Image 1 is 85 points, Image 2 is 90 points, Image 3 is 88 points, Image 4 is 92 points, and Image 5 is 87 points.

[0042] These scores reflect the clarity level of each image after motion compensation and alignment, where a higher score indicates a clearer image with richer details. In this way, not only can the quality of each image be quantified, but it also provides a basis for subsequent selection of the best image or image fusion.

[0043] Step S106: performing image fusion on the second intermediate state image according to the scoring result to obtain a scalp optimized image corresponding to the photographing instruction.

[0044] According to the above scoring results, the second intermediate state image will be fused to generate a high-quality scalp optimized image.

[0045] Specifically, based on the previously calculated clarity scores (for example: 85 points for the first image, 90 points for the second image, 88 points for the third image, 92 points for the fourth image, and 87 points for the fifth image), the image with the higher score will be selected as the main fusion object, and the advantages of other images will be combined. Through multi-frame synthesis technology, the areas with the highest clarity and richest details in each image are extracted, and then seamlessly stitched together to ensure that the final scalp-optimized image not only has higher resolution and better detail performance, but also effectively eliminates blur and artifacts caused by handle jitter or displacement.

[0046] Alternatively, the second intermediate image is processed by a weighted average fusion method to generate a high-quality scalp optimized image. Specifically, based on the previously calculated clarity score (for example: 85 points for the first image, 90 points for the second image, 88 points for the third image, 92 points for the fourth image, and 87 points for the fifth image), a weight is assigned to each image, and the weight is proportional to the clarity score. This means that images with higher scores account for a larger proportion in the fusion process. Through the weighted average fusion technology, each frame of the image is synthesized according to its weight, ensuring that the final scalp optimized image not only has a higher resolution and better detail expression, but also effectively reduces blur and artifacts. This process fully takes into account the quality differences of each image, ensuring that the fused image achieves the best effect overall, and provides high-quality data support for subsequent medical diagnosis or research.

[0047] The embodiment of the present invention provides a scalp image processing method, which is applied to a scalp image acquisition device, which includes a handle equipped with a preset magnification lens and a terminal device connected to the handle, and the method includes: displaying the scalp image acquired by the handle in real time on the terminal device; when the terminal device receives a photo command from the handle, obtaining a continuous multi-frame scalp image at the corresponding moment of the photo command; preprocessing the multi-frame scalp image to obtain a plurality of first intermediate state images; eliminating the displacement of each of the first intermediate state images by motion compensation and alignment technology to obtain a plurality of aligned second intermediate state images; performing clarity scoring on each of the second intermediate state images to obtain a scoring result; performing image fusion on the second intermediate state images according to the scoring result to obtain a scalp optimized image corresponding to the photo command. The method significantly improves the processing efficiency and diagnostic accuracy of scalp images through multi-frame image acquisition, real-time preprocessing, motion compensation alignment, clarity scoring and image fusion, and ensures that the optimized image finally generated is both clear and reliable.

[0048] Example 2

[0049] Based on the above embodiments, Figure 2 A schematic flow chart of another scalp image processing method provided by an embodiment of the present invention.

[0050] The method is applied to a scalp image acquisition device, which includes a handle equipped with a lens with a preset magnification and a terminal device connected to the handle.

[0051] Depend on Figure 2 As can be seen, the above methods include:

[0052] Step S201: Displaying the scalp image collected by the handle in real time on the terminal device.

[0053] Step S202: When the terminal device receives a photographing instruction from the handle, a plurality of continuous frames of scalp images at a time corresponding to the photographing instruction are obtained.

[0054] Step S203: pre-processing the multiple frames of scalp images to obtain multiple first intermediate state images.

[0055] Step S204: eliminating the displacement of each of the first intermediate state images by motion compensation and alignment technology to obtain a plurality of aligned second intermediate state images.

[0056] Step S205: performing a global clarity score on the second intermediate state images to obtain a global clarity score for each of the second intermediate state images.

[0057] Here, in order to evaluate the overall quality of each second intermediate state image, the device will perform a global clarity score on these images. For example, assuming that we have 5 aligned second intermediate state images, the device first calculates the global clarity score of each image. The global clarity score is determined by analyzing the overall sharpness, contrast, and noise level of the image. Specifically, a series of image processing algorithms, such as edge detection and frequency domain analysis, are used to quantify the clarity of each image. For the first image, a score of 85 may be obtained, indicating that the image has a higher clarity; while the second image may be scored as 78, indicating that its clarity is slightly lower. In this way, a global clarity score is assigned to each second intermediate state image, which not only reflects the overall quality of the image, but also provides a basis for the subsequent selection of the optimal sub-image, ensuring that the final scalp optimized image has the best quality and detail retention.

[0058] Step S206: Filtering target second intermediate state images whose clarity scores are greater than a preset threshold from the global clarity scores.

[0059] Step S207: based on preset parameters, dividing each of the above target second intermediate state images into a plurality of sub-images.

[0060] Step S208: performing a local clarity score on each of the plurality of sub-images to obtain a local clarity score for each of the plurality of sub-images.

[0061] Step S209: performing image fusion on the target second intermediate state image according to each of the sub-images and the local clarity score of each of the sub-images to obtain a scalp optimized image corresponding to the photographing instruction.

[0062] In some of the examples, the step S209 includes: selecting, from the sub-images, the first target sub-image corresponding to each image position and having the highest local clarity score, according to the image position in the target second intermediate state image corresponding to the sub-images; splicing the first target sub-images corresponding to each image position, and performing Poisson fusion on the splicing boundaries of each first target sub-image to obtain a scalp optimized image corresponding to the photo-taking instruction.

[0063] For ease of understanding, the present application is illustrated by the following examples. For example, when processing a set of aligned second intermediate state images, it is assumed that each large image is divided into multiple sub-regions, and the clarity score of each sub-region is calculated separately. For each sub-region, the sub-image with the highest score is selected as the first target sub-image at that position. Next, these first target sub-images are spliced ​​according to their original positions, and the Poisson fusion technique is used to smooth the splicing boundaries of each first target sub-image to ensure a natural transition without obvious splicing marks. In this way, the scalp optimized image finally generated not only retains the clearest part of each sub-image, but also effectively eliminates the blur and artifacts caused by handle jitter or displacement.

[0064] In some other possible examples, the step S209 includes: setting a weight coefficient for the sub-image according to the local clarity score of the sub-image; performing weighted averaging on the weight coefficient according to the number of frames corresponding to the sub-image to obtain a normalized weight coefficient; synthesizing the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain a scalp optimized image corresponding to the photo instruction.

[0065] In order to generate a high-quality scalp-optimized image, the weight coefficients are first set according to the local clarity scores of the sub-images. For example, suppose there are 5 aligned second intermediate state images, each of which is divided into multiple sub-regions, and each sub-region has a clarity score. Based on these scores, a weight coefficient is assigned to each sub-region, and the weight is proportional to the score. Next, these weight coefficients are weighted averaged according to the number of frames corresponding to the sub-image to obtain the normalized weight coefficients. This means that for each sub-region, the sum of the weight coefficients of all frames is equal to 1, ensuring fairness in the fusion process. Finally, the pixel value of each image position is synthesized based on the above normalized weight coefficients and the pixel values ​​of the sub-images. Specifically, the pixel values ​​of the corresponding positions in each frame are weighted and summed according to their normalized weight coefficients to generate the final pixel value. In this way, the advantages of each frame image can be effectively integrated, blur and artifacts can be eliminated, and finally a high-quality scalp-optimized image can be generated.

[0066] In order to generate a high-quality scalp optimized image, the step of synthesizing the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain the scalp optimized image corresponding to the photo instruction includes: synthesizing the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain a preliminary processed image; performing motion detection on the preliminary processed image to obtain an image jitter area; and performing median filtering on the image jitter area to obtain the scalp optimized image corresponding to the photo instruction.

[0067] Specifically, first, according to the normalized weight coefficient and the pixel value of the sub-image, the pixel value of each image position is synthesized to obtain a preliminary processed image. For example, suppose we have 5 aligned second intermediate state images, each image is divided into multiple sub-regions, and each sub-region has a normalized weight coefficient. The pixel values ​​of the corresponding positions in each frame are weighted and summed according to their normalized weight coefficients to generate a preliminary processed image. Next, motion detection is performed on the preliminary processed image to identify the jittering areas in the image. This step determines which areas have motion artifacts or jitters by analyzing the differences between adjacent frames. Finally, median filtering is applied to these jittering areas to eliminate blur and noise caused by handle jitter or other factors. After this series of processing, the final scalp optimized image not only retains the clearest part of each sub-image, but also effectively eliminates the impact of jitter, ensuring the optimal image quality.

[0068] Furthermore, after the step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photo taking instruction, the method further includes: performing sharpening enhancement on the scalp optimized image to obtain an enhanced image; adjusting the contrast of the enhanced image based on contrast limited histogram equalization to obtain a contrast enhanced image; and adjusting the resolution of the contrast enhanced image through super-resolution reconstruction technology to output a resolution enhanced image.

[0069] Among them, the step of adjusting the resolution of the above-mentioned contrast-enhanced image by super-resolution reconstruction technology and outputting the resolution-enhanced image includes: adjusting the resolution of the above-mentioned contrast-enhanced image based on a pre-trained super-resolution convolutional neural network and an improved version of the above-mentioned super-resolution convolutional neural network, and outputting the resolution-enhanced image.

[0070] In order to further improve the resolution of the contrast-enhanced image, a pre-trained super-resolution convolutional neural network (SRCNN) and its improved version are used for processing. For example, assume that a preliminary optimized scalp image has been obtained through contrast enhancement technology. Next, this image is input into the pre-trained SRCNN, which can effectively restore the image's detail information by learning the mapping relationship between a large number of low-resolution and high-resolution image pairs. In addition, an improved version of SRCNN is also used, which is optimized in network structure and training method, and can better capture high-frequency details in the image, such as hair follicle structure and tiny skin texture. After processing by these two models, an image with significantly enhanced resolution is output. The final resolution-enhanced image is not only visually clearer and sharper, but also retains more detail information. This process ensures comprehensive optimization from contrast enhancement to resolution improvement, effectively improving the overall quality of the image.

[0071] Finally, after the step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photo taking instruction, the method further includes: performing quality assessment on the scalp optimized image based on a preset image quality assessment index, and outputting a quality assessment result.

[0072] An embodiment of the present invention provides a scalp image processing method, which is applied to a scalp image acquisition device, wherein the scalp image acquisition device includes a handle configured with a preset magnification lens and a terminal device connected to the handle, and the method includes: displaying the scalp image acquired by the handle in real time on the terminal device; when the terminal device receives a photo-taking instruction from the handle, acquiring a plurality of continuous frames of scalp images at the time corresponding to the photo-taking instruction; pre-processing the plurality of frames of scalp images to obtain a plurality of first intermediate state images; eliminating the displacement of each of the first intermediate state images by motion compensation and alignment technology to obtain a plurality of aligned scalp images; and The second intermediate state image; the second intermediate state image is scored for global clarity to obtain a global clarity score for each second intermediate state image; the target second intermediate state image with a score greater than a preset threshold is selected from the global clarity score; each target second intermediate state image is divided into multiple sub-images based on preset parameters; each of the multiple sub-images is scored for local clarity to obtain a local clarity score for each sub-image; the target second intermediate state image is fused according to each sub-image and the local clarity score of each sub-image to obtain a scalp optimized image corresponding to the photo taking instruction. The scalp image processing method effectively improves the quality and detail retention of the finally generated scalp optimized image through the acquisition, alignment, global and local clarity scoring and image fusion based on the scores of multiple frames of images, ensures the high clarity and accuracy of the image, and thus provides reliable data support for medical diagnosis.

[0073] Example 3

[0074] Based on the above embodiments, Figure 3 A schematic diagram of the structure of a scalp image processing device provided by an embodiment of the present invention.

[0075] Among them, the above-mentioned device is applied to a scalp image acquisition device, and the above-mentioned scalp image acquisition device includes a handle configured with a preset magnification lens and a terminal device connected to the above-mentioned handle.

[0076] Depend on Figure 3 As can be seen, the device includes:

[0077] The display module 31 is used to display the scalp image collected by the handle in real time on the terminal device.

[0078] The acquisition module 32 is used to acquire a plurality of continuous frames of scalp images at a time corresponding to the photographing instruction when the terminal device receives the photographing instruction from the handle.

[0079] The anti-shake processing module 33 is used to pre-process the above-mentioned multiple frames of scalp images to obtain multiple first intermediate state images; eliminate the displacement of each of the above-mentioned first intermediate state images through motion compensation and alignment technology to obtain multiple aligned second intermediate state images; perform clarity scoring on each of the above-mentioned second intermediate state images to obtain a scoring result; and perform image fusion on the above-mentioned second intermediate state images according to the above-mentioned scoring result to obtain a scalp optimized image corresponding to the above-mentioned photo shooting instruction.

[0080] The display module 31 , the acquisition module 32 and the anti-shake processing module 33 are connected in sequence.

[0081] In one embodiment, the anti-shake processing module 33 is used to perform a global clarity score on the second intermediate state image to obtain a global clarity score for each of the second intermediate state images; filter out target second intermediate state images with a score greater than a preset threshold from the global clarity score; divide each of the target second intermediate state images into multiple sub-images based on preset parameters; perform a local clarity score on each of the multiple sub-images to obtain a local clarity score for each of the sub-images; perform image fusion on the target second intermediate state images according to each of the sub-images and the local clarity score of each of the sub-images to obtain a scalp optimized image corresponding to the photo-taking instruction.

[0082] In one embodiment, the anti-shake processing module 33 is further used to select the first target sub-image with the highest local clarity score corresponding to each image position from the sub-images according to the image position in the target second intermediate state image corresponding to the sub-image; splice the first target sub-images corresponding to each image position, and perform Poisson fusion on the splicing boundaries of each first target sub-image to obtain a scalp optimized image corresponding to the photo instruction.

[0083] In one embodiment, the anti-shake processing module 33 is further used to set a weight coefficient for the sub-image according to the local clarity score of the sub-image; perform weighted averaging on the weight coefficient according to the number of frames corresponding to the sub-image to obtain a normalized weight coefficient; synthesize the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain a scalp optimized image corresponding to the photo instruction.

[0084] In one embodiment, the anti-shake processing module 33 is further used to synthesize the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain a preliminary processed image; perform motion detection on the preliminary processed image to obtain an image shaking area; perform median filtering on the image shaking area to obtain a scalp optimized image corresponding to the photo instruction.

[0085] In one embodiment, the anti-shake processing module 33 is further used to sharpen and enhance the scalp optimized image to obtain an enhanced image; adjust the contrast of the enhanced image based on contrast limited histogram equalization to obtain a contrast enhanced image; and adjust the resolution of the contrast enhanced image through super-resolution reconstruction technology to output a resolution enhanced image.

[0086] In one embodiment, the anti-shake processing module 33 is further used to adjust the resolution of the contrast-enhanced image based on a pre-trained super-resolution convolutional neural network and an improved version of the super-resolution convolutional neural network, and output a resolution-enhanced image.

[0087] In one embodiment, the anti-shake processing module 33 is further used to perform quality assessment on the scalp optimized image based on a preset image quality assessment index and output a quality assessment result.

[0088] The scalp image processing device provided in the embodiment of the present invention has the same technical features as the scalp image processing method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the above method embodiment, and will not be repeated here.

[0089] Example 4

[0090] This embodiment provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the scalp image processing method.

[0091] This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the scalp image processing method are implemented.

[0092] See also Figure 4 The structure diagram of an electronic device shown in the figure comprises: a memory 41 and a processor 42. The memory 41 stores a computer program that can be run on the processor 42. When the processor executes the computer program, the steps provided by the above-mentioned scalp image processing method are implemented.

[0093] like Figure 4 As shown, the device further includes: a bus 43 and a communication interface 44, a processor 42, a communication interface 44 and a memory 41 are connected via the bus 43; the processor 42 is used to execute executable modules stored in the memory 41, such as computer programs.

[0094] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the device network element and at least one other network element is realized through at least one communication interface 44 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0095] The bus 43 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0096] The memory 41 is used to store programs, and the processor 42 executes the programs after receiving the execution instructions. The method performed by the scalp image processing device disclosed in any embodiment of the present invention can be applied to the processor 42 or implemented by the processor 42. The processor 42 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 42 or the instructions in the form of software. The above processor 42 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 42 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.

[0097] Furthermore, an embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 42, the machine-executable instructions prompt the processor 42 to implement the above-mentioned scalp image processing method.

[0098] The electronic device and computer-readable storage medium provided by the embodiments of the present invention have the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0099] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0100] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

Claims

1. A scalp image processing method, characterized in that: The method is applied to a scalp image acquisition device, the scalp image acquisition device comprising a handle equipped with a preset magnification lens and a terminal device connected to the handle, and the method comprises: Displaying the scalp image collected by the handle in real time on the terminal device; When the terminal device receives a photographing instruction from the handle, a plurality of continuous frames of scalp images at a time corresponding to the photographing instruction are acquired; Preprocessing the multiple frames of scalp images to obtain multiple first intermediate state images; Eliminating the displacement of each of the first intermediate state images by motion compensation and alignment technology to obtain a plurality of aligned second intermediate state images; Performing a clarity score on each of the second intermediate state images to obtain a score result; The second intermediate state image is fused according to the scoring result to obtain a scalp optimized image corresponding to the photographing instruction.

2. The scalp image processing method according to claim 1, characterized in that: The step of scoring the clarity of each of the second intermediate state images to obtain a scoring result comprises: Performing a global clarity score on the second intermediate state images to obtain a global clarity score for each second intermediate state image; Selecting a target second intermediate state image with a clarity score greater than a preset threshold from the global clarity score; Based on preset parameters, each of the target second intermediate state images is divided into a plurality of sub-images; Performing a local clarity score on each of the multiple sub-images to obtain a local clarity score for each of the sub-images; The step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photographing instruction includes: The target second intermediate state image is subjected to image fusion according to each of the sub-images and the local clarity score of each of the sub-images to obtain a scalp optimized image corresponding to the photographing instruction.

3. The scalp image processing method according to claim 2, characterized in that: The step of performing image fusion on the target second intermediate state image according to each of the sub-images and the local clarity score of each of the sub-images to obtain a scalp optimized image corresponding to the photographing instruction includes: According to the image positions in the target second intermediate state image corresponding to the sub-images, selecting the first target sub-image with the highest local clarity score corresponding to each image position from the sub-images; The first target sub-images corresponding to each of the image positions are spliced, and Poisson fusion is performed on the splicing boundary of each of the first target sub-images to obtain a scalp optimized image corresponding to the photographing instruction.

4. The scalp image processing method according to claim 3, characterized in that: The step of performing image fusion on the target second intermediate state image according to each of the sub-images and the local clarity score of each of the sub-images to obtain a scalp optimized image corresponding to the photographing instruction includes: Setting a weight coefficient for the sub-image according to the local clarity score of the sub-image; According to the number of frames corresponding to the sub-images, the weight coefficients are weighted averaged to obtain normalized weight coefficients; The pixel value of each image position is synthesized according to the normalized weight coefficient and the pixel value of the sub-image to obtain a scalp optimized image corresponding to the photographing instruction.

5. The scalp image processing method according to claim 4, characterized in that: The step of synthesizing the pixel value of each image position according to the normalized weight coefficient and the pixel value of the sub-image to obtain the scalp optimized image corresponding to the photographing instruction comprises: According to the normalized weight coefficient and the pixel value of the sub-image, the pixel value of each image position is synthesized to obtain a preliminary processed image; Performing motion detection on the preliminarily processed image to obtain an image shaking area; Perform median filtering on the jittered area of ​​the image to obtain a scalp optimized image corresponding to the photographing instruction.

6. The scalp image processing method according to claim 1, characterized in that: After the step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photographing instruction, the method further includes: Performing sharpening and enhancement on the scalp optimized image to obtain an enhanced image; Based on contrast limited histogram equalization, adjusting the contrast of the enhanced image to obtain a contrast enhanced image; The resolution of the contrast-enhanced image is adjusted by super-resolution reconstruction technology to output a resolution-enhanced image.

7. The scalp image processing method according to claim 6, characterized in that: The step of adjusting the resolution of the contrast-enhanced image by super-resolution reconstruction technology and outputting a resolution-enhanced image comprises: Based on a pre-trained super-resolution convolutional neural network and an improved version of the super-resolution convolutional neural network, the resolution of the contrast-enhanced image is adjusted and a resolution-enhanced image is output.

8. The scalp image processing method according to claim 1, characterized in that: After the step of performing image fusion on the second intermediate state image according to the scoring result to obtain the scalp optimized image corresponding to the photographing instruction, the method further includes: The scalp optimized image is quality evaluated based on a preset image quality evaluation index, and a quality evaluation result is output.

9. A scalp image processing device, characterized in that: The device is applied to a scalp image acquisition device, the scalp image acquisition device comprises a handle equipped with a preset magnification lens and a terminal device connected to the handle, and the device comprises: A display module, used for displaying the scalp image collected by the handle in real time on the terminal device; An acquisition module, configured to acquire a plurality of continuous frames of scalp images at a time corresponding to the photographing instruction when the terminal device receives the photographing instruction from the handle; The anti-shake processing module is used to pre-process the multiple frames of scalp images to obtain multiple first intermediate state images; eliminate the displacement of each of the first intermediate state images through motion compensation and alignment technology to obtain multiple aligned second intermediate state images; perform clarity scoring on each of the second intermediate state images to obtain a scoring result; and perform image fusion on the second intermediate state images according to the scoring result to obtain a scalp optimized image corresponding to the photo taking instruction.

10. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the scalp image processing method according to any one of claims 1 to 8.