An image preprocessing method for interactive cultural and travel content generation

By generating sample images and using a preset model for image segmentation and evaluation, the processing strategy is dynamically optimized, solving the problem of unsatisfactory image processing results in traditional methods, and realizing adaptive optimization and robustness improvement of cultural and tourism images.

CN120070279BActive Publication Date: 2026-02-06WUHAN UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510005138.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2026-02-06
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

Traditional image preprocessing methods cannot fully consider the specific circumstances of different types of cultural and tourism images, resulting in unsatisfactory processing results and even side effects such as contrast distortion.

Method used

By acquiring target cultural and tourism images, adding target noise to generate sample images, using a first preset model for image segmentation and a second preset model for training, an image evaluation model is obtained, noise information is output, and image optimization is performed based on the noise information, dynamically adjusting the processing strategy.

Benefits of technology

It achieves adaptive optimization processing for different types of cultural and tourism images, improves the image processing effect, reduces contrast distortion, ensures the consistency and stability of images at different sizes, and enhances the model's robustness to noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070279B_ABST
    Figure CN120070279B_ABST
Patent Text Reader

Abstract

The application provides an image preprocessing method for interactive travel content generation, and relates to the field of data processing. The method comprises the following steps: obtaining a target travel image, and obtaining a preprocessed image corresponding to the target travel image through preprocessing operation; adding target noise to the preprocessed image to obtain a sample image corresponding to the target travel image; inputting the sample image, and outputting a segmented image through a first preset model; inputting the segmented image, and obtaining an image evaluation model through a second preset model; inputting the target travel image, and outputting noise information through the image evaluation model; based on the noise information, performing image optimization on the target travel image, and outputting a target optimized image corresponding to the target travel image. The application solves the problem that when different types of travel images are optimized, the image processing effect is not ideal, and even side effects such as contrast distortion occur.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data processing, and in particular to an image preprocessing method for interactive cultural tourism content generation. BACKGROUND

[0002] Cultural tourism industry is an important part of the tourism industry. The economic backbone of many places is from the cultural tourism industry. The cultural tourism industry needs not only special geographical scenery, landscape, and culture, but also modern technology.

[0003] In interactive cultural tourism content generation, image preprocessing technology has a wide range of applications. For example, in virtual tourism scenarios, image preprocessing technology can improve the visual effect and realism of virtual scenarios; in cultural heritage digital display, image preprocessing technology can restore the original appearance and detailed features of cultural heritage; in tourism photo beautification, image preprocessing technology can remove noise and defects in photos to improve the overall aesthetic of the photos.

[0004] Traditional image resource preprocessing methods are relatively single, usually based on experience and mathematical models to process image pixels to improve image quality. At the same time, the traditional processing process relies on fixed algorithms and rules, and cannot fully consider the specific situation of the image, so when optimizing different types of cultural tourism images, the image processing effect is not ideal, and even contrast distortion and other side effects occur.

[0005] Therefore, there is an urgent need for an image preprocessing method for interactive cultural tourism content generation. SUMMARY

[0006] The present application provides an image preprocessing method and device for interactive cultural tourism content generation, which solves the problem of unsatisfactory image processing effect when optimizing different types of cultural tourism images according to their quality.

[0007] In a first aspect of the present application, an image preprocessing method for interactive cultural tourism content generation is provided, the method comprising:

[0008] Obtaining a target cultural tourism image, and obtaining a preprocessed image corresponding to the target cultural tourism image through preprocessing;

[0009] Adding target noise to the preprocessed image to obtain a sample image corresponding to the target cultural tourism image;

[0010] Inputting the sample image into a first preset model for image segmentation, and outputting a segmented image through the first preset model;

[0011] According to the segmented image, a second preset model is trained, and an image evaluation model is obtained through the second preset model after training;

[0012] The target travel image is input into the image evaluation model, and noise information corresponding to the target travel image is output through the image evaluation model;

[0013] Based on the noise information, the target travel image is image-optimized, and a target optimized image corresponding to the target travel image is output.

[0014] Optionally, the pre-processing image corresponding to the target travel image is obtained through pre-processing, specifically including:

[0015] The target travel image is scaled in a fixed aspect ratio to obtain a scaled image corresponding to the target travel image;

[0016] The scaled image is normalized to obtain the pre-processing image.

[0017] Optionally, the pre-processing image includes a first pre-processing image, a second pre-processing image, and a third pre-processing image, the sample image includes the first sample image, the second sample image, and the third sample image, and the target noise includes the first target noise, the second target noise, and the third target noise; the pre-processing image is added with target noise to obtain a sample image corresponding to the target travel image, specifically including:

[0018] The first pre-processing image is added with the first target noise to obtain the first sample image;

[0019] The second pre-processing image is added with the second target noise to obtain the second sample image;

[0020] The third pre-processing image is added with the third target noise to obtain the third sample image;

[0021] The types of the target noise include Gaussian noise, Rayleigh noise, salt and pepper noise, Poisson noise, and impulse noise, and the types of the first target noise, the second target noise, and the third target noise are all different.

[0022] Optionally, the first preset model includes a conversion layer, a segmentation module, and a noise detection module; the sample image is input into the first preset model for image segmentation, and a segmented image is output through the first preset model, specifically including:

[0023] mapping the first sample image, the second sample image and the third sample image through the conversion layer respectively to obtain a first converted sample image corresponding to the first sample image, a second converted sample image corresponding to the second sample image and a third converted sample image corresponding to the third sample image;

[0024] inputting the first converted sample image and the second converted sample image into the segmentation module for segmentation to obtain a first pre-segmentation image;

[0025] inputting the first converted sample image and the third converted sample image into the segmentation module for segmentation to obtain a second pre-segmentation image;

[0026] inputting the second converted sample image and the third converted sample image into the segmentation module for segmentation to obtain a third pre-segmentation image;

[0027] inputting the first pre-segmentation image, the second pre-segmentation image and the third pre-segmentation image into the noise detection module for noise detection, and the noise detection is used to calculate the existence probability of the corresponding target noise in the pre-segmentation image;

[0028] if the sum of the existence probabilities of the first target noise and the second target noise in the first pre-segmentation image is less than a segmentation noise threshold, adjusting the segmentation parameter in the segmentation module for re-segmentation until the existence probability of the corresponding target noise is greater than or equal to the segmentation noise threshold, and then taking the segmented first pre-segmentation image as a first segmentation image;

[0029] if the sum of the existence probabilities of the first target noise and the third target noise in the second pre-segmentation image is less than a segmentation noise threshold, adjusting the segmentation parameter in the segmentation module for re-segmentation until the existence probability of the corresponding target noise is greater than or equal to the segmentation noise threshold, and then taking the segmented second pre-segmentation image as a second segmentation image;

[0030] if the sum of the existence probabilities of the second target noise and the third target noise in the third pre-segmentation image is less than a segmentation noise threshold, adjusting the segmentation parameter in the segmentation module for re-segmentation until the existence probability of the corresponding target noise is greater than or equal to the segmentation noise threshold, and then taking the segmented third pre-segmentation image as a third segmentation image;

[0031] wherein the segmentation noise threshold is 0.7-0.8.

[0032] Optionally, the second preset model comprises a feature extraction module, a noise recognition module and a noise analysis module, the second preset model is trained according to the segmentation image, and a trained image evaluation model is obtained through the second preset model, and specifically comprising:

[0033] The feature extraction module is used for performing feature extraction on the first pre-segmentation image, the second pre-segmentation image and the third pre-segmentation image respectively, and obtaining first features in the first pre-segmentation image, second features in the second pre-segmentation image and third features in the third pre-segmentation image;

[0034] The first loss function corresponding to the first pre-segmentation image is obtained according to the first features, the second loss function corresponding to the second pre-segmentation image is obtained according to the second features, and the third loss function corresponding to the third pre-segmentation image is obtained according to the third features;

[0035] The first loss function, the second loss function and the third loss function are weighted and summed to obtain a multi-scale loss function, wherein the weight ratio of the first loss function, the second loss function and the third loss function is 3:2:1;

[0036] The noise recognition module and the noise analysis module are trained based on the multi-scale loss function to obtain the trained image evaluation model.

[0037] Optionally, the noise information includes a noise type and a signal-to-noise ratio, and the image evaluation model outputs the noise information corresponding to the target travel image, specifically including:

[0038] The image evaluation model analyzes the signal-to-noise ratio of the target travel image;

[0039] The image evaluation model identifies the noise type of the target travel image.

[0040] Optionally, the image evaluation model is used for image optimization based on the noise information, specifically including:

[0041] It is judged whether the signal-to-noise ratio of the target travel image is greater than or equal to a first preset signal-to-noise ratio;

[0042] If the corresponding signal-to-noise ratio is greater than or equal to the first preset signal-to-noise ratio, the target travel image is directly outputted;

[0043] The first preset signal-to-noise ratio is 62-68db.

[0044] Optionally, after judging whether the signal-to-noise ratio is greater than or equal to the first preset signal-to-noise ratio, the method further includes:

[0045] If the signal-to-noise ratio of the target travel image is less than the first preset signal-to-noise ratio, it is judged whether the corresponding signal-to-noise ratio is greater than or equal to a second preset signal-to-noise ratio;

[0046] if the corresponding signal-to-noise ratio value is greater than or equal to the second preset signal-to-noise ratio value, a noise type in the target travel image is obtained;

[0047] a denoising algorithm corresponding to the target travel image is determined according to the noise type, and the denoising algorithm includes a mean filter algorithm, a median filter algorithm, a Gaussian filter algorithm, and a bilateral filter algorithm;

[0048] the target travel image is denoised by using the denoising algorithm;

[0049] The second preset signal-to-noise ratio value is less than the first preset signal-to-noise ratio value, and the second preset signal-to-noise ratio value is 38-42db.

[0050] Optionally, after the method further includes:

[0051] if the corresponding signal-to-noise ratio value is less than the second preset signal-to-noise ratio value, it is determined whether the corresponding signal-to-noise ratio value is greater than or equal to a third preset signal-to-noise ratio value;

[0052] if the corresponding signal-to-noise ratio value is greater than or equal to the third preset signal-to-noise ratio value, the target travel image is image-enhanced, and the image-enhancing mode includes histogram equalization, contrast stretching, gray scale transformation, and Fourier transformation;

[0053] a noise type in the target travel image is obtained, and a denoising algorithm corresponding to the target travel image is determined according to the noise type;

[0054] the target travel image after image enhancement is denoised by using the denoising algorithm;

[0055] The third preset signal-to-noise ratio value is less than the second preset signal-to-noise ratio value, and the third preset signal-to-noise ratio value is 22-28db.

[0056] Optionally, after the method further includes:

[0057] if the corresponding signal-to-noise ratio value is less than the third preset signal-to-noise ratio value, the corresponding target travel image is rejected.

[0058] In a second aspect of the present application, an image preprocessing device for interactive travel content generation is provided, the device includes an acquisition module, a model construction module, and a processing module, wherein,

[0059] The acquisition module is configured to acquire a target travel image and acquire a preprocessed image corresponding to the target travel image through preprocessing.

[0060] The model construction module is configured to add target noise to the preprocessed image to obtain a sample image corresponding to the target travel image, input the sample image into a first preset model for image segmentation, and output a segmented image through the first preset model; perform model training on a second preset model according to the segmented image, and acquire a trained image evaluation model through the second preset model.

[0061] The processing module is configured to input the target travel image into the image evaluation model, and output noise information corresponding to the target travel image through the image evaluation model; perform image optimization on the target travel image based on the noise information, and output a target optimized image corresponding to the target travel image.

[0062] In a third aspect of the present application, an electronic device is provided, which includes a processor, a memory, a user interface and a network interface, the memory is configured to store instructions, the user interface and the network interface are configured to communicate with other devices, and the processor is configured to execute the instructions stored in the memory to enable the electronic device to perform the method of any one of the above aspects.

[0063] In a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to perform the method of any one of the above aspects.

[0064] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0065] 1. The target travel image is acquired and the preprocessed image corresponding to the target travel image is acquired through preprocessing, target noise is added to the preprocessed image to obtain a sample image corresponding to the target travel image, the sample image is input into a first preset model for image segmentation, and a segmented image is output through the first preset model, so that a second preset model is trained according to the segmented image, and a trained image evaluation model is acquired through the second preset model, the target travel image is input into the image evaluation model, and noise information corresponding to the target travel image is output through the image evaluation model, the target travel image is optimized based on the noise information, and a target optimized image corresponding to the target travel image is output, and then the image processing strategy is dynamically adjusted through the adaptive optimization algorithm combined with the content and quality characteristics of the target travel image, solving the problem that when different types of travel images are processed, the image processing effect is not ideal, and even the contrast distortion and other side effects occur.

[0066] 2、By scaling the target travel image in a fixed aspect ratio manner to obtain a scaled image corresponding to the target travel image, and normalizing the scaled image to obtain a preprocessed image, the consistency of the target travel image under different sizes is ensured, and the influence of the brightness and contrast difference between different images on subsequent processing is reduced through the standardized pixel value range, providing a more stable input for image segmentation and optimization.

[0067] 3、By adding different types of noise to the target travel image, various interferences that the target travel image may encounter in the real world can be simulated, which helps the model to learn to identify useful information from noise, thereby improving the robustness of the model to noise. BRIEF DESCRIPTION OF DRAWINGS

[0068] Figure 1 is a flowchart of an image preprocessing method for interactive travel content generation provided by an embodiment of the present application;

[0069] Figure 2 is a structural block diagram of a first preset model provided by an embodiment of the present application;

[0070] Figure 3 is a structural block diagram of a second preset model provided by an embodiment of the present application;

[0071] Figure 4 is a module schematic diagram of an image preprocessing device for interactive travel content generation provided by an embodiment of the present application;

[0072] Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application.

[0073] Legend: 21, conversion layer; 22, segmentation module; 23, noise detection module; 31, feature extraction module; 32, noise identification module; 33, noise analysis module; 41, acquisition module; 42, model construction module; 43, processing module; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION

[0074] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be described clearly and completely in conjunction with the drawings in the embodiments of the specification. Obviously, the described embodiments are only part of the embodiments of the present application, not all embodiments.

[0075] The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the description of the application, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or," as used herein, refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0076] Hereinafter, the terms "first", "second" are only for the purpose of description, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise specified.

[0077] In order for those skilled in the art to better understand the technical solutions of the present application, the present application will be further described in detail below with reference to the accompanying drawings.

[0078] Please refer to Figure 1 which shows a flowchart of an image preprocessing method for interactive travel content generation provided by an embodiment of the present application. The flowchart mainly includes the following steps: S101 to S106.

[0079] Step S101, obtaining a target travel image, and obtaining a preprocessed image corresponding to the target travel image through preprocessing.

[0080] Specifically, the camera collected can be a high-quality camera, including but not limited to a single-lens reflex camera, a mirrorless camera, or a high-end smartphone, etc. The entire shooting process needs to ensure that the image is clear and the color is accurate. The lens used for shooting can be appropriately selected according to the shooting theme, for example, for natural scenery, a wide-angle lens can be used; for characteristic cultural images, a telephoto lens can be used. The target travel image collected is saved through a sufficient storage card or external storage device.

[0081] Further, the target travel image is scaled in a fixed aspect ratio manner to obtain a scaled image corresponding to the target travel image; and the scaled image is normalized to obtain a preprocessed image. Assuming that the target travel image is represented by x, please refer to steps S111 to S112:

[0082] Step S111, scale the target travel image x in a fixed aspect ratio manner to scale the longest side to 256px, to obtain a scaled image: first, detect the original size of the target travel image x, including the width and height, determine whether the longest side of the image is the width or the height, then calculate the scaling ratio according to the longest side, and finally use the calculated scaling ratio to adjust the width and height of the image, while keeping the aspect ratio unchanged. If the longest side is the width, the new width is 256px and the new height is the result of the original height multiplied by the scaling ratio; if the longest side is the height, the new height is 256px and the new width is the result of the original width multiplied by the scaling ratio. Scaling the width and height of the image according to the original aspect ratio can maintain the original shape and proportion of the image, and can minimize distortion; scaling the image helps to reduce the storage space and loading time of the image file, and facilitates subsequent image processing.

[0083] Step S112, normalize the scaled image to obtain a normalized image: select a suitable normalization method according to actual needs, for example, min-max normalization and Z-score standardization, where the min-max normalization method is preferred, calculate the minimum and maximum values of the image pixel values, and use these parameters in the normalization formula; the normalized image pixel values are limited in the range of [0, 1], which helps to eliminate the pixel value differences between different images, making them more easily compared and analyzed. For each pixel value X in the scaled image, its normalized pixel value X' can be calculated by the following formula:

[0084]

[0085] Where min(X image ) is the minimum value of all pixel values in the entire image, and max(X image ) is the maximum value of all pixel values in the entire image.

[0086] Step S102, add target noise to the preprocessed image to obtain a sample image corresponding to the target travel image.

[0087] Specifically, the preprocessed image G(x) is divided into three independent groups of images, i.e., a first preprocessed image G(x1), a second preprocessed image G(x2), and a third preprocessed image G(x3). The first target noise z1 is added to the first preprocessed image G(x1) to obtain a first sample image G(x1, z1). The second target noise z2 is added to the second preprocessed image G(x2) to obtain a second sample image G(x2, z2). The third target noise is added to the third preprocessed image G(x3) to obtain a third sample image G(x3, z3). The first sample image G(x1, z1), the second sample image G(x2, z2), and the third sample image G(x3, z3) are used as the sample image G(x, z). It should be noted that, in the embodiments provided in the present application, the first target noise, the second target noise, and the third target noise are the target noise, and the target noise z includes but is not limited to Gaussian noise, Rayleigh noise, salt and pepper noise, Poisson noise, and impulse noise. The parameters of different noises are determined, a random number generator is used to simulate the distribution of the noise, and the generated noise image is superimposed on the corresponding first preprocessed image G(x1), second preprocessed image G(x2), and third preprocessed image G(x3) in a pixel value addition manner to obtain the first sample image G(x1, z1), the second sample image G(x2, z2), and the third sample image G(x3, z3). By adding the target noise z to the preprocessed image G(x), the diversity of the image data can be increased, and thus the generalization ability of the model can be improved.

[0088] In step S103, the sample image is input into the first preset model for image segmentation, and a segmented image is output by the first preset model.

[0089] Specifically, please refer to Figure 2, the first preset model provided by the embodiment of the present application is shown, wherein the first preset model comprises a conversion layer 21, a segmentation module 22 and a noise detection module 23, the first sample image, the second sample image and the third sample image are respectively converted and mapped through the conversion layer 21, so as to obtain a first conversion sample image corresponding to the first sample image, a second conversion sample image corresponding to the second sample image and a third conversion sample image corresponding to the third sample image; the first conversion sample image and the second conversion sample image are input into the segmentation module 22 for segmentation, so as to obtain a corresponding first pre-segmentation image; the first conversion sample image and the third conversion sample image are input into the segmentation module 22 for segmentation, so as to obtain a corresponding second pre-segmentation image; the second conversion sample image and the third conversion sample image are input into the segmentation module 22 for segmentation, so as to obtain a corresponding third pre-segmentation image; the first pre-segmentation image, the second pre-segmentation image and the third pre-segmentation image are respectively input into the noise detection module 23 for noise detection, the noise detection is used for calculating the existence probability of the corresponding target noise in the pre-segmentation image; if it is confirmed that the sum of the first target noise and the existence probability of the first target noise in the first pre-segmentation image is greater than or equal to 0.75, the first pre-segmentation image is directly taken as the first segmentation image, if it is confirmed that the existence probability is less than 0.75, the segmentation parameter in the noise detection module 23 is adjusted, and re-segmentation is performed until the existence probability of the corresponding target noise is greater than or equal to 0.75; the confirmation of the second segmentation image and the third segmentation image is the same as the processing mode of the first segmentation image, and the whole process can prevent the corresponding conversion sample image from being segmented too small, and avoid the added target noise from being damaged. Please refer to steps S131 to S133.

[0090] In step S131, the first sample image G(x1, z1), the second sample image G(x2, z2) and the third sample image G(x3, z3) are processed through the conversion layer 21, so as to obtain a first conversion sample image, a second conversion sample image and a third conversion sample image: in the embodiment, the function and characteristics of the conversion layer 21 are defined according to actual requirements, the conversion layer 21 can be a neural network layer, an image processing algorithm or any other module capable of transforming an image, which is not limited in the present application. For each sample image, G(x i ,z i ) is taken as an example, the sample image can be converted through the following formula:

[0091] T(G(x i ,z i ))=σ(W*G(x i ,z i )+b);

[0092] Wherein, T represents conversion of the sample image, G(x i ,zi ) is the i-th input sample image, b is the bias term, and σ is the activation function used to introduce nonlinearity, common activation functions include ReLU, sigmoid, tanh, etc. The first sample image G(x1, z1), the second sample image G(x2, z2), and the third sample image G(x3, z3) are input into the conversion layer 21 respectively to perform specified transformation or mapping; the conversion layer 21 can perform contrast enhancement, color correction, and image repair on the input image. Among them, contrast enhancement can use histogram equalization, contrast stretching, etc. to enhance the contrast of the image; color correction can use color space conversion, color balance, etc. to correct the color of the image; image repair can use image repair algorithms to repair defects or damaged parts in the image.

[0093] Step S132, input the first converted sample image and the second converted sample image into the segmentation module 22 for segmentation to obtain the first pre-segmentation image; input the first converted sample image and the third converted sample image into the segmentation module 22 for segmentation to obtain the second pre-segmentation image; input the second converted sample image and the third converted sample image into the segmentation module 22 for segmentation to obtain the third pre-segmentation image; according to actual needs, select a suitable image segmentation algorithm or model as the segmentation module 22, the image segmentation algorithm includes threshold-based segmentation, edge-based segmentation, region-based segmentation, and deep learning-based segmentation, which is not limited in the present application. The first converted sample image and the second converted sample image are input into the segmentation module 22 for image segmentation processing, the segmentation module 22 divides the image according to the preset algorithm or model, and outputs the first pre-segmentation image; the first converted sample image and the third converted sample image are simultaneously input into the segmentation module 22, the segmentation module 22 respectively segments each image in the first converted sample image and the third converted sample image, and outputs the second pre-segmentation image; the second converted sample image and the third converted sample image are simultaneously input into the segmentation module 22, the segmentation module 22 respectively segments each image in the second converted sample image and the third converted sample image, and outputs the third pre-segmentation image; the segmented images can present different characteristics and styles, and can be used as input data for subsequent image processing or machine learning tasks.

[0094] Step S133, a suitable noise detection algorithm or model is selected as the noise detection module 23; the first pre-segmentation image, the second pre-segmentation image and the third pre-segmentation image are sequentially input into the noise detection module 23 for detection, the noise detection module 23 analyzes each image and outputs a value representing the noise probability, if the detected probability of the corresponding target noise is less than 0.75, the segmentation parameters f1, f2, f3 of the segmentation module are adjusted, and the corresponding image is re-segmented; if the probability of detecting noise is not less than 0.75, the corresponding first segmentation image F(G(x1, z1)), the second segmentation image F(G(x2, z2)), and the third segmentation image F(G(x3, z3)) are output. For each pre-segmentation image, if the noise probability output by the noise detection module 23 is less than 0.75, it is considered that the image segmentation does not meet the requirements, in this case, the corresponding segmentation parameters f1, f2, f3 (corresponding to the first, second and third pre-segmentation images respectively) of the segmentation module need to be adjusted, these parameters include the segmentation threshold, the weight in the segmentation algorithm, and the number of iterations; after adjusting the parameters, the corresponding pre-segmentation image is re-segmented to obtain a new pre-segmentation image, and noise detection is performed again; if the noise probability output by the noise detection module 23 is not less than 0.75, the corresponding first segmentation image F(G(x1, z1)), the second segmentation image F(G(x2, z2)), and the third segmentation image F(G(x3, z3)) are directly output, these segmentation images are the final output results and can be used for subsequent image processing or analysis tasks. This processing process enhances the adaptability and robustness of the segmentation module to different types of input images through iterative adjustment of segmentation parameters and re-segmentation, which enables the segmentation module to better handle images with different characteristics and styles; at the same time, it can also provide better input data for subsequent image processing or analysis tasks.

[0095] Step S104, model training is performed on the second pre-set model according to the segmentation image, and a trained image evaluation model is obtained through the second pre-set model.

[0096] Specifically, please refer to Figure 3The second preset model provided by the embodiment of the application is shown in the structural block diagram, the second preset model includes a feature extraction module 31, a noise identification module 32 and a noise analysis module 33, the feature extraction module 31 is used for performing feature extraction operations on the first pre-segmentation image, the second pre-segmentation image and the third pre-segmentation image respectively, and first features in the first pre-segmentation image, second features in the second pre-segmentation image and third features in the third pre-segmentation image are obtained; a first loss function corresponding to the first pre-segmentation image is obtained according to the first features, a second loss function corresponding to the second pre-segmentation image is obtained according to the second features, and a third loss function corresponding to the third pre-segmentation image is obtained according to the third features; the first loss function, the second loss function and the third loss function are weighted and summed to obtain a multi-scale loss function, wherein the weight ratio of the first loss function, the second loss function and the third loss function is 3:2:1; the noise identification module 32 and the noise analysis module 33 are trained based on the multi-scale loss function to obtain a trained image evaluation model. Please refer to steps S141 to S144.

[0097] Step S141: the first segmentation image F(G(x1, z1)), the second segmentation image F(G(x2, z2)), and the third segmentation image F(G(x3, z3)) are sequentially input to the feature extraction module 31 for feature extraction to obtain first features, second features and third features: a suitable feature extraction algorithm or model is selected as the feature extraction module 31, the feature extraction algorithm includes a local feature description algorithm (such as SIFT, SURF, HOG) and a deep learning-based method, and the application does not limit this module, which can analyze the input segmentation image and extract representative, distinctive and stable features; the first segmentation image F(G(x1, z1)), the second segmentation image F(G(x2, z2)) and the third segmentation image F(G(x3, z3)) are sequentially input to the feature extraction module 31 for processing; the feature extraction module 31 analyzes each segmentation image, extracts features in the image according to the characteristics of the selected algorithm or model, and the features include color features, texture features, shape features, gradient features and optical flow features of the image; after the feature extraction module 31 is processed, the first features, the second features and the third features are output, which can quantitatively describe the input segmentation image and can be used for subsequent image processing, classification, identification or matching tasks.

[0098] Step S142, the first segmentation image F(G(x1, z1)), the second segmentation image F(G(x2, z2)), and the third segmentation image F(G(x3, z3)) are sequentially input to the feature extraction module 31 for feature extraction to obtain the first feature, the second feature, and the third feature: according to the specific requirements of the image and the characteristics of the image, a suitable loss function type is selected, and the loss function includes cross-entropy loss, Dice loss, and IOU loss, which are not limited in the present application. According to the formula or definition, the corresponding loss function is defined for the first segmentation image, the second segmentation image, and the third segmentation image; the prediction result and the actual result of the segmentation image are input into the corresponding loss function, and the loss value is calculated; according to the calculated loss value, the model parameters are optimized through the back propagation algorithm multiple iterations until the loss value reaches a predetermined threshold or no longer decreases significantly. By calculating the loss value and optimizing the model parameters, the model can have stronger adaptability and robustness to different types of input images.

[0099] Step S143, the first loss function, the second loss function, and the third loss function are weighted and summed to obtain a multi-scale loss function, wherein the weight ratio of the first loss function, the second loss function, and the third loss function is 3:2:1.

[0100] Step S144, training the noise recognition module 32 and the noise analysis module 33 based on the multi-scale loss function: in this embodiment, the first loss function, the second loss function, and the third loss function are weighted and summed to obtain a multi-scale loss function by using a set weight ratio; the specific formula is: total L Ⅰ = 3 × L Ⅱ + 2 × L Ⅲ + 1 × L Ⅰ , L Ⅱ , and L Ⅲ represent the values of the first loss function, the second loss function, and the third loss function, respectively. The multi-scale loss function is used as the objective function for model optimization, and the model parameters are updated multiple times through the back propagation algorithm to minimize the total loss. The multi-scale loss function can reduce the dependence of the model on single-scale information, making the model more adaptable and robust when facing input images of different scales. At the same time, this weight distribution can balance the contribution of different loss functions to model optimization, helping the model to converge to the optimal solution more quickly.

[0101] In addition, the design of the multi-scale loss function enables the model to learn information at different scales, thereby improving the generalization ability of the model, so that the model can still perform well when facing unseen noise types or signal environments. By training the noise recognition module 32, the noise type and location in the input data can be more accurately identified, which helps to remove noise in subsequent image analysis and improve data quality. By training the noise analysis module 33, the characteristics and sources of noise can be analyzed in depth, providing strong support for noise elimination or suppression, which helps to extract useful information in complex signal environments and improve the accuracy and efficiency of signal processing.

[0102] In step S105, the target travel image is input into the image evaluation model, and the noise information corresponding to the target travel image is output by the image evaluation model.

[0103] Specifically, the travel image is obtained by the trained noise recognition module 32 and noise analysis module 33. The noise recognition module 32 is a kind of classifier based on machine learning, including support vector machine (SVM), random forest, neural network, and the classifier can output the noise type s1 in the travel image x according to the input features and the trained model. In noise analysis, a suitable filter and parameter are selected to separate the noise signal from the travel image x, and the signal-to-noise ratio s2 is calculated according to the separated noise signal and the original image signal, wherein the signal-to-noise ratio s2 can be calculated by comparing the mean square error (MSE) of the original image and the noise image, or using the peak signal-to-noise ratio (PSNR) as the evaluation standard. By identifying the noise type s1 and calculating the signal-to-noise ratio s2, subsequent image denoising, enhancement and other processing operations can be guided, which helps to improve the quality of the travel image, making it clearer and more realistic, and helps to improve user experience and visual effect. For the trained regeneration recognition module: a classifier based on machine learning is used as the core, which supports multiple algorithms such as support vector machine (SM), random forest and neural network. In actual application, according to the image features and the size of the data set, the most suitable classification algorithm is selected for training to ensure that the noise type in the image can be accurately identified; for the noise analysis module 33: the noise analysis module 33 selects a suitable filter and parameter to accurately separate the noise signal from the image, after separating the noise signal, the noise analysis module 33 compares and analyzes the original image signal with the noise signal, and calculates the signal-to-noise ratio s2, which can be obtained by comparing the mean square error (MSE) of the original image and the noise image, or selecting the peak signal-to-noise ratio (PSNR) as the evaluation standard. The specific formula is as follows, the mean square error formula:

[0104]

[0105] where MSE is the mean square error, I(i,j) represents the pixel value in the original image, K(i,j) represents the pixel value in the noise image, and m and n represent the number of rows and columns in the image, respectively. The peak signal-to-noise ratio formula is:

[0106]

[0107] where MAX I represents the maximum possible pixel value in the image, MSE is the mean square error, and PSNR is the peak signal-to-noise ratio. For different noise types (such as Gaussian noise, salt and pepper noise, etc.), the corresponding denoising algorithm will be selected for processing. The denoising algorithm includes but is not limited to: mean filter algorithm, median filter algorithm, Gaussian filter algorithm, and bilateral filter algorithm. The appropriate denoising algorithm can be selected according to the actual processing situation. For example, for Gaussian noise, a Gaussian filter can be used for smoothing; while for salt and pepper noise, a median filter is more suitable for denoising. According to the calculated signal-to-noise ratio s2, the noise level of the image can be evaluated, and whether further denoising or enhancement processing is needed can be determined accordingly. For example, when the signal-to-noise ratio is low, a more powerful denoising algorithm or multiple iterations can be used to improve the image quality. At the same time, the signal-to-noise ratio s2 can be used as an optimization target to adjust the parameters of the denoising algorithm or select different algorithm combinations to seek the best image denoising and enhancement effect.

[0108] Step S106, based on the noise information, the target travel image is optimized, and the target optimization image corresponding to the target travel image is output.

[0109] Specifically, the image evaluation model is used to calculate the target travel image according to the noise information, which includes the signal-to-noise ratio and the noise type. If the signal-to-noise ratio is greater than or equal to 65db, the target travel image is directly output as the target optimization image. If the signal-to-noise ratio is less than 65db, it is determined whether the signal-to-noise ratio is greater than or equal to 40db; if the signal-to-noise ratio is greater than or equal to 40db, the noise type information in the target travel image is obtained, and the corresponding denoising algorithm is obtained according to the noise type information; the target travel image is denoised by the denoising algorithm, and the target optimization image corresponding to the target travel image is output. If the signal-to-noise ratio is less than 40db, it is determined whether the signal-to-noise ratio is greater than or equal to 25db; if the signal-to-noise ratio is greater than or equal to 25db, the target travel image is enhanced according to the signal-to-noise ratio, and the target travel image is denoised by the corresponding denoising algorithm; the target optimization image corresponding to the target travel image is output. Please refer to steps S161 to S164.

[0110] Step S161, when the signal-to-noise ratio s2 of the travel image x is greater than or equal to 65db, directly output the corresponding image, that is, directly output the target travel image as the target optimized image.

[0111] Step S162, when the signal-to-noise ratio s2 of the travel image x is less than 65db, then determine whether the signal-to-noise ratio s2 is greater than or equal to 45db; if yes, determine the denoising algorithm according to the noise type s1, and process the travel image x through the denoising algorithm to obtain the optimized image, otherwise go to the next step.

[0112] Step S163, when the signal-to-noise ratio s2 of the travel image x is less than 45db, then determine whether the signal-to-noise ratio s2 is greater than or equal to 25db; if yes, first perform image enhancement on the travel image x according to the signal-to-noise ratio s2, then determine the denoising algorithm according to the noise type s1, and then process the travel image x through the denoising algorithm to obtain the optimized image, otherwise go to the next step.

[0113] Step S164, when the signal-to-noise ratio s2 of the travel image x is less than 25db, then eliminate the target travel image.

[0114] The denoising algorithm includes mean filter, median filter, Gaussian filter and bilateral filter. The image enhancement method for the travel image x includes histogram equalization, contrast stretching, gray scale transformation and Fourier transformation. When the signal-to-noise ratio s2 of the travel image x reaches or exceeds 65dB, the image quality is usually very high and the noise level is extremely low, so it is not necessary to perform any processing and can be directly output, which ensures the fast transmission and use of high-quality images and avoids unnecessary processing time and resource consumption. When the signal-to-noise ratio s2 of the travel image x is between 45dB and 65dB, although the image quality is still high, there may be a certain degree of noise, at this time, according to the noise type s1 (such as Gaussian noise, salt and pepper noise, etc.), a suitable denoising algorithm is selected for processing, which can effectively reduce the noise level while maintaining the details and clarity of the image; this helps to improve the visual quality of the image and the accuracy of subsequent processing. When the signal-to-noise ratio s2 of the travel image x is between 25dB and 45dB, the image quality has decreased significantly and the noise level is high; at this time, first perform image enhancement processing to improve the brightness and contrast of the image, making the image clearer and easier to identify; then, according to the noise type s1, a suitable denoising algorithm is selected for processing, which can further reduce the noise level; this combined processing strategy helps to maintain image details while significantly improving the overall quality of the image. When the signal-to-noise ratio s2 of the travel image x is less than 25dB, the image quality is extremely poor and the noise level is extremely high, and almost no useful information can be obtained from it; at this time, eliminating these images can avoid their interference with subsequent processing or analysis, while saving processing time and resources; this is an effective quality control measure to ensure that only qualified images are used for subsequent processing or analysis.

[0115] By adopting the method, the target travel image is acquired by a high-quality camera, and a pretreatment image corresponding to the target travel image is acquired by a pretreatment operation, target noise is added to the pretreatment image to obtain a sample image corresponding to the target travel image, the sample image is input into a first preset model for image segmentation, and a segmented image is output by the first preset model, so as to train a second preset model according to the segmented image, and obtain a trained image evaluation model by the second preset model, input the target travel image into the image evaluation model, and output noise information corresponding to the target travel image by the image evaluation model, based on the noise information, the target travel image is image-optimized, and a target optimized image corresponding to the target travel image is output, and then the image processing strategy is dynamically adjusted by combining the content and quality characteristics of the target travel image through the adaptive optimization algorithm, and the problems of unsatisfactory image processing effect and even contrast distortion and other side effects when different types of travel images are subjected to optimization processing corresponding to their quality are solved.

[0116] Please refer to Figure 4 which shows a module schematic diagram of an image pretreatment device for interactive travel content generation provided by an embodiment of the present application, the device includes an acquisition module 41, a model construction module 42, and a processing module 43, wherein,

[0117] The acquisition module 41 is configured to acquire a target travel image, and acquire a pretreatment image corresponding to the target travel image through a pretreatment operation.

[0118] The model construction module 42 adds target noise to the pretreatment image to obtain a sample image corresponding to the target travel image, inputs the sample image into a first preset model for image segmentation, and outputs a segmented image by the first preset model, trains a second preset model according to the segmented image, and obtains a trained image evaluation model by the second preset model.

[0119] The processing module 43 is configured to input the target travel image into the image evaluation model, and output noise information corresponding to the target travel image by the image evaluation model, based on the noise information, the target travel image is image-optimized, and a target optimized image corresponding to the target travel image is output.

[0120] In a possible implementation, the acquisition module 41 is configured to acquire the pretreatment image corresponding to the target travel image through the pretreatment operation, specifically including: scaling the target travel image in a fixed aspect ratio to obtain a scaled image corresponding to the target travel image; and performing normalization processing on the scaled image to obtain the pretreatment image.

[0121] In a possible implementation, the preprocessed images include a first preprocessed image, a second preprocessed image, and a third preprocessed image, the model construction module 42 is configured to add target noise to the preprocessed images to obtain sample images corresponding to the target travel images, and specifically includes: adding target noise to the first preprocessed image to obtain a first sample image, the first target noise being Gaussian noise, the first target noise being Rayleigh noise, and the first target noise being salt and pepper noise; adding target noise to the second preprocessed image to obtain a second sample image; adding target noise to the third preprocessed image to obtain a third sample image; and taking the first sample image, the second sample image, and the third sample image as the sample images.

[0122] In a possible implementation, the model construction module 42 is configured to input the sample images into a first preset model for image segmentation, and output segmented images through the first preset model, and specifically includes: performing conversion mapping on the first sample image, the second sample image, and the third sample image through a conversion layer to obtain a first converted sample image corresponding to the first sample image, a second converted sample image corresponding to the second sample image, and a third converted sample image corresponding to the third sample image; inputting the first converted sample image and the first converted sample image into a segmentation module for segmentation to obtain a corresponding first pre-segmented image; inputting the first converted sample image and the third converted sample image into the segmentation module for segmentation to obtain a corresponding second pre-segmented image; inputting the second converted sample image and the third converted sample image into the segmentation module for segmentation to obtain a corresponding third pre-segmented image; inputting the first pre-segmented image, the second pre-segmented image, and the third pre-segmented image into a noise detection module for noise detection, the noise detection being configured to calculate a probability of existence of corresponding target noise in the pre-segmented image; if it is confirmed that the corresponding target noise is less than a segmentation noise threshold, adjusting a segmentation parameter in the noise detection module until the requirement is met, and finally taking the qualified first pre-segmented image, the second pre-segmented image, and the third pre-segmented image as the segmented images output by the first preset model.

[0123] In a possible implementation, the model construction module 42 is configured to perform model training on the second preset model according to the segmented images, and obtain the trained image evaluation model through the second preset model. Specifically, the model construction module 42 is configured to perform feature extraction on the first, second and third pre-segmented images through the feature extraction module, and obtain the first, second and third features in the first, second and third pre-segmented images, respectively; obtain a first loss function corresponding to the first pre-segmented image according to the first feature, a second loss function corresponding to the second pre-segmented image according to the second feature, and a third loss function corresponding to the third pre-segmented image according to the third feature; perform weighted summation on the first, second and third loss functions to obtain a multi-scale loss function, wherein the weight ratio of the first, second and third loss functions is 3:2:1; and train the noise recognition module and the noise analysis module based on the multi-scale loss function to obtain the trained image evaluation model.

[0124] In a possible implementation, the processing module 43 is configured to perform image optimization on the target travel image based on the noise information, and output a target optimized image corresponding to the target travel image. Specifically, the processing module 43 is configured to calculate the noise information of the target travel image through the image evaluation model, wherein the noise information includes a corresponding signal-to-noise ratio value and a noise type; determine whether the signal-to-noise ratio value is greater than or equal to a first preset signal-to-noise ratio value; if the signal-to-noise ratio value is greater than or equal to the preset signal-to-noise ratio value, directly output the target travel image as the target optimized image.

[0125] In a possible implementation, after determining whether the signal-to-noise ratio value is greater than or equal to the first preset signal-to-noise ratio value, if the signal-to-noise ratio value is less than the first preset signal-to-noise ratio value, the processing module 43 is configured to determine whether the signal-to-noise ratio value is greater than or equal to a second preset signal-to-noise ratio value, wherein the first preset signal-to-noise ratio value is greater than the second preset signal-to-noise ratio value; if the signal-to-noise ratio value is greater than or equal to the second preset signal-to-noise ratio value, obtain the noise type information in the noise information; obtain a denoising algorithm corresponding to the target travel image according to the noise type information, wherein the denoising algorithm includes a mean filter algorithm, a median filter algorithm, a Gaussian filter algorithm and a bilateral filter algorithm; perform denoising processing on the target travel image through the denoising algorithm, and output a target optimized image corresponding to the target travel image.

[0126] In a possible implementation, if the signal-to-noise ratio value is less than the second preset signal-to-noise ratio value, the processing module 43 is configured to determine whether the signal-to-noise ratio value is greater than or equal to a third preset signal-to-noise ratio value, wherein the second preset signal-to-noise ratio value is greater than the third preset signal-to-noise ratio value; if the signal-to-noise ratio value is greater than or equal to the third preset signal-to-noise ratio value, perform image enhancement processing on the target travel image, then perform denoising processing on the target travel image based on the noise type, and finally output a target optimized image corresponding to the target travel image.

[0127] In a possible implementation, the processing module 43 is configured to directly discard the target travel image if the signal-to-noise ratio value is less than a third preset signal-to-noise ratio value.

[0128] It should be noted that, when the apparatus provided in the above examples implements its functions, only the above-mentioned division of functional modules is taken as an example for illustration, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above-described functions. In addition, the apparatus and method examples provided in the above examples belong to the same concept, and the specific implementation process is detailed in the method examples, which will not be described here.

[0129] The present application also provides an electronic device. Referring to Figure 5 , Figure 5 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device can include at least one processor 501, at least one communication bus 502, a user interface 503, at least one network interface 504, and a memory 505.

[0130] The communication bus 502 is configured to realize the connection and communication between the components.

[0131] The user interface 503 can include a display screen (Display) and a camera (Camera), and optionally the user interface 503 can further include a standard wired interface and a wireless interface.

[0132] The network interface 504 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0133] The processor 501 can include one or more processing cores. The processor 501 connects various parts within the server through various interfaces and lines, performs various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Alternatively, the processor 501 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 501 can integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes operating systems, user interfaces, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 501, but can be realized by a separate chip.

[0134] The memory 505 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 505 can also be at least one storage device located away from the aforementioned processor 501. Referring to Figure 5 The memory 505 as a computer storage medium can include an operating system, a network communication module, a user interface module, and an image preprocessing application program for generating interactive travel content.

[0135] In Figure 5In the electronic device shown, the user interface 503 is mainly used to provide an interface for the user to input, and obtain data input by the user; and the processor 501 can be used to call an image preprocessing application program stored in the storage 505 for interactive travel content generation, and when executed by one or more processors 501, causes the electronic device to perform the method described in one or more of the above embodiments. It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0136] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors, causes the electronic device to perform the method described in one or more of the above embodiments.

[0137] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0138] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented by other means. For example, the device embodiments described above are only illustrative, and the division of units is only a logical function division. In actual implementation, another division mode can be adopted, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some service interface, device or unit, which can be electrical or other forms.

[0139] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.

[0140] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0141] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable memory. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned memory includes: a U disk, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0142] The above is only exemplary embodiments of the present application, and cannot limit the scope of the present application. That is, any equivalent changes and modifications made in accordance with the teachings of the present application are still within the scope of the present application. Other embodiments of the present application will be readily apparent to those skilled in the art upon considering the specification and the practical true disclosure.

[0143] The present application is intended to cover any variations, uses or adaptive changes of the present application, which follow the general principles of the present application and include common knowledge or conventional technical means in the art that are not disclosed in the present application.

Claims

1. An image preprocessing method for interactive travel content generation, characterized in that, The method comprises: acquiring a target travel image, and acquiring a pretreatment image corresponding to the target travel image through pretreatment; adding target noise to the pretreatment image to obtain a sample image corresponding to the target travel image, specifically including: the pretreatment image includes a first pretreatment image, a second pretreatment image and a third pretreatment image, the sample image includes a first sample image, a second sample image and a third sample image, and the target noise includes a first target noise, a second target noise and a third target noise; adding the first target noise to the first pretreatment image to obtain the first sample image; adding the second target noise to the second pretreatment image to obtain the second sample image; adding the third target noise to the third pretreatment image to obtain the third sample image; inputting the sample image into a first preset model for image segmentation, and outputting a segmented image through the first preset model, specifically including: the first preset model includes a transformation layer, a segmentation module and a noise detection module; the first sample image, the second sample image and the third sample image are respectively mapped through the transformation layer to obtain a first transformed sample image corresponding to the first sample image, a second transformed sample image corresponding to the second sample image and a third transformed sample image corresponding to the third sample image; the first transformed sample image and the second transformed sample image are input into the segmentation module for segmentation to obtain a first pre-segmented image; the first transformed sample image and the third transformed sample image are input into the segmentation module for segmentation to obtain a second pre-segmented image; the second transformed sample image and the third transformed sample image are input into the segmentation module for segmentation to obtain a third pre-segmented image; the first pre-segmented image, the second pre-segmented image and the third pre-segmented image are respectively input into the noise detection module for noise detection, and the noise detection is used to calculate the existence probability of the corresponding target noise in the pre-segmented image; if the sum of the existence probabilities of the first target noise and the second target noise in the first pre-segmented image is less than a segmentation noise threshold, the segmentation parameters in the segmentation module are adjusted and re-segmented until the existence probability of the corresponding target noise is greater than or equal to the segmentation noise threshold, then the segmented first pre-segmented image is taken as a first segmented image; if the sum of the existence probabilities of the first target noise and the third target noise in the second pre-segmented image is less than the segmentation noise threshold, the segmentation parameters in the segmentation module are adjusted and re-segmented until the existence probability of the corresponding target noise is greater than or equal to the segmentation noise threshold, then the segmented second pre-segmented image is taken as a second segmented image; if the sum of the existence probabilities of the second target noise and the third target noise in the third pre-segmented image is less than the segmentation noise threshold, the segmentation parameters in the segmentation module are adjusted and re-segmented until the existence probability of the corresponding target noise is greater than or equal to the segmentation noise threshold, then the segmented third pre-segmented image is taken as a third segmented image; wherein the segmentation noise threshold is 0.7-0.

8. According to the segmented image, a second preset model is trained, and an image evaluation model is obtained through the second preset model; The target travel image is input into the image evaluation model, and noise information corresponding to the target travel image is output through the image evaluation model; Based on the noise information, the target travel image is optimized, and a target optimized image corresponding to the target travel image is output.

2. The method of claim 1, wherein, The preprocessed image corresponding to the target travel image is obtained through preprocessing, specifically including: The target travel image is scaled in a fixed aspect ratio to obtain a scaled image corresponding to the target travel image; The scaled image is normalized to obtain the preprocessed image.

3. The method of claim 1, wherein, The types of the target noise include Gaussian noise, Rayleigh noise, salt and pepper noise, Poisson noise, and impulse noise, and the types of the first target noise, the second target noise, and the third target noise are all different.

4. The method of claim 1, wherein, The second preset model includes a feature extraction module, a noise recognition module, and a noise analysis module, and the second preset model is trained according to the segmented image, and the trained image evaluation model is obtained through the second preset model, specifically including: The feature extraction module is used to extract features from the first, second, and third pre-segmented images, and obtain first, second, and third features from the first, second, and third pre-segmented images, respectively; According to the first feature, a first loss function corresponding to the first pre-segmented image is obtained, according to the second feature, a second loss function corresponding to the second pre-segmented image is obtained, and according to the third feature, a third loss function corresponding to the third pre-segmented image is obtained; The first, second, and third loss functions are weighted and summed to obtain a multi-scale loss function, wherein the weight ratio of the first, second, and third loss functions is 3:2:1; The noise recognition module and the noise analysis module are trained based on the multi-scale loss function to obtain the trained image evaluation model.

5. The method of claim 1, wherein, The noise information includes noise type and signal-to-noise ratio, and the noise information corresponding to the target travel image is output through the image evaluation model, specifically including: The signal-to-noise ratio of the target travel image is analyzed through the image evaluation model; The noise type of the target travel image is identified through the image evaluation model.

6. The method of claim 5, wherein, Based on the noise information, the target travel image is optimized, specifically including: Determine whether the signal-to-noise ratio of the target travel image is greater than or equal to a first preset signal-to-noise ratio; If the corresponding signal-to-noise ratio is greater than or equal to the first preset signal-to-noise ratio, the target travel image is directly outputted. The first preset signal-to-noise ratio is 62-68db.

7. The method of claim 6, wherein, After determining whether the signal-to-noise ratio of the target travel image is greater than or equal to the first preset signal-to-noise ratio, the method further includes: If the signal-to-noise ratio of the target travel image is less than the first preset signal-to-noise ratio, it is judged whether the corresponding signal-to-noise ratio is greater than or equal to a second preset signal-to-noise ratio; If the corresponding signal-to-noise ratio is greater than or equal to the second preset signal-to-noise ratio, the noise type in the target travel image is obtained; According to the noise type, the denoising algorithm corresponding to the target travel image is confirmed, and the denoising algorithm includes mean filtering algorithm, median filtering algorithm, Gaussian filtering algorithm and bilateral filtering algorithm; The target travel image is denoised by the denoising algorithm; The second preset signal-to-noise ratio is less than the first preset signal-to-noise ratio, and the second preset signal-to-noise ratio is 38-42db.

8. The method of claim 7, wherein, After the method further includes: If the corresponding signal-to-noise ratio is less than the second preset signal-to-noise ratio, it is judged whether the corresponding signal-to-noise ratio is greater than or equal to a third preset signal-to-noise ratio; If the corresponding signal-to-noise ratio is greater than or equal to the third preset signal-to-noise ratio, the target travel image is image enhanced, and the image enhancement mode includes histogram equalization, contrast stretching, gray scale transformation and Fourier transformation; The noise type in the target travel image is obtained, and the denoising algorithm corresponding to the target travel image is confirmed according to the noise type; The target travel image after image enhancement is denoised by the denoising algorithm; The third preset signal-to-noise ratio is less than the second preset signal-to-noise ratio, and the third preset signal-to-noise ratio is 22-28db.

9. The method of claim 8, wherein, After the method further includes: If the corresponding signal-to-noise ratio is less than the third preset signal-to-noise ratio, the corresponding target travel image is rejected.

Citation Information

Patent Citations

  • Image analysis method and system based on deep learning

    CN118429242A

  • Image processing apparatus, image processing method, and program

    JP2013110528A

  • Patient-specific deep learning image denoising methods and systems

    US20200065940A1