A method and system for visual image processing
By collecting and analyzing videos in the visual image processing system, extracting target features and environmental features, calculating correlations and performing fusion processing, the video security and accuracy problems are solved, and the security verification of videos and the clarity of results are improved.
Patent Information
- Application Number
- CN202410420694.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The existing visual image processing technology has failed to effectively solve the security and accuracy of videos in target positioning, especially in terms of security verification of video sources and clarity improvement of image processing results.
By collecting videos from different sources, separating image frames and extracting target features, calculating the correlation of environment features. If the correlation exceeds the preset value, fusion processing is performed; if it does not exceed it, calculate the security of the video source based on the target feature attributes and determine the authenticity of the video and return the response. The system includes video acquisition, feature extraction, image processing and security processing modules, and uses classification submodels and convolutional neural networks to judge video categories and feature extraction to achieve security verification and clarity improvement of video.
The security verification of video is realized, the security of uploading videos is ensured, and the accuracy and clarity of visual image processing results are improved.
Smart Images

Figure CN118429854B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method and system for visual image processing. Background Art
[0002] Visual image detection is to use machines to replace human eyes to make measurements and judgments. Machine vision system refers to the system that converts the captured target into image signals through machine vision products, transmits them to a dedicated image processing system, and converts them into digital signals based on pixel distribution, brightness, color and other information; image intelligent recognition system software and other systems analyze these signals to perform various operations to extract the characteristics of the target, and then control the equipment on site based on the results of the judgment.
[0003] The current visual image processing methods used in target positioning usually extract target features from visual images and then track the target without further processing the video, and also without considering the possible security issues of the video. Therefore, the existing technical solutions have many problems that need to be solved in terms of security and accuracy. Based on this, the present invention constructs a method and system for visual image processing Summary of the invention
[0004] The present invention provides a method for visual image processing, comprising:
[0005] Collect videos from different sources;
[0006] Separate image frames from each video, extract image frames including target features from the image frames, and record corresponding target feature attributes;
[0007] According to the target feature attributes, a target feature image frame within a preset range is obtained, and the environmental features are separated from the target feature image frame;
[0008] Calculate the correlation between the acquired environmental features;
[0009] If the correlation exceeds the preset value, the corresponding target feature image frame is fused;
[0010] If the correlation does not exceed the preset value, the corresponding video source security is calculated according to the target feature attributes, the authenticity of the video is determined based on the video source security, and a corresponding response is returned to the video source.
[0011] A method for visual image processing as described above, wherein, after collecting videos from different sources, it also includes initializing and screening the videos to determine the category to which the collected videos belong.
[0012] The method for visual image processing as described above, wherein the video acquisition method specifically includes the following sub-steps:
[0013] Obtain type features under different section categories from the platform's historical data to form a category feature set;
[0014] Build corresponding classification sub-models for different platform attributes, and input the category feature sets into the corresponding classification sub-models for training;
[0015] Estimate the optimal classification set of each classification sub-model according to the classification results of each classification sub-model;
[0016] Determine the comprehensive classification model according to each classification sub-model and the corresponding optimal classification set;
[0017] The image frames separated from the captured video are input into the comprehensive classification model to output the video category.
[0018] A method for visual image processing as described above, wherein, after separating a target feature from an image frame, features other than the target feature with specific reference value are selected as environmental features, and all background images except the target feature are used as environmental features.
[0019] The method for visual image processing as described above, wherein the corresponding target feature image frames are fused, specifically comprises the following sub-steps:
[0020] Locate the target feature sub-image in the target feature image frame, scale the target feature sub-image to the same proportion and put it into the same coordinate system;
[0021] Calculate the clarity of each target feature sub-graph, obtain the target feature sub-graph whose clarity is greater than the average clarity, and assign corresponding weights to the target feature sub-graph whose clarity is greater than the average clarity;
[0022] According to the grayscale value and corresponding weight of the target feature of the same pixel in each target feature sub-image, the fused grayscale value of the corresponding pixel is calculated to obtain the fused image.
[0023] The present invention also provides a system for visual image processing, comprising:
[0024] Video acquisition module, used to collect videos from different sources;
[0025] A feature extraction module is used to separate image frames from each video, extract image frames including target features from the image frames, and record corresponding target feature attributes; according to the target feature attributes, obtain target feature image frames within a preset range, and separate environmental features from the target feature image frames;
[0026] The image processing module is used to calculate the correlation between the acquired environmental features; if the correlation exceeds a preset value, the corresponding target feature image frame is fused;
[0027] The security processing module is used to calculate the corresponding video source security according to the target feature attributes when the correlation does not exceed the preset value, determine the authenticity of the video according to the video source security, and return a corresponding response to the video source.
[0028] A visual image processing system as described above, wherein, after collecting videos from different sources, it also includes initializing and screening the videos to determine the category to which the collected videos belong.
[0029] A visual image processing system as described above, wherein the video acquisition module specifically includes: obtaining type features under different section categories from the platform historical data to form a category feature set; building corresponding classification sub-models for the attributes of different section of the platform, and inputting the category feature set into the corresponding classification sub-model for training; estimating the optimal classification set of each classification sub-model based on the classification results of each classification sub-model; determining a comprehensive classification model based on each classification sub-model and the corresponding optimal classification set; inputting the image frames separated from the acquired video into the comprehensive classification model, and outputting the video category.
[0030] A visual image processing system as described above, wherein, after separating the target feature from an image frame, other features of specific reference value other than the target feature are selected as environmental features, and all background images other than the target feature are used as environmental features.
[0031] A visual image processing system as described above, wherein the image processing module specifically includes: locating the target feature sub-image in the target feature image frame, scaling the target feature sub-image to the same proportion and placing it in the same coordinate system; calculating the clarity of each target feature sub-image, obtaining the target feature sub-image whose clarity is greater than the average clarity, and assigning corresponding weights to the target feature sub-image whose clarity is greater than the average clarity; calculating the fused gray value of the corresponding pixel point according to the gray value and corresponding weight of the target feature of the same pixel point of each target feature sub-image, and obtaining a fused image.
[0032] The beneficial effects achieved by the present invention are as follows: by adopting the technical solution of the present invention, it is possible to perform security verification on the video, ensure the security of the uploaded video, and ensure that the visual image processing results are more accurate and clear. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0034] Figure 1It is a flow chart of a method for visual image processing provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION
[0035] The following is a clear and complete description of the technical solutions in the embodiments of the present invention 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0036] Embodiment 1
[0037] like Figure 1 As shown, the first embodiment of the present invention provides a method for visual image processing, which is applied to a visual image processing platform. The visual image processing platform will receive videos uploaded by different clients. For example, a smart city platform will receive city status videos uploaded by different users through mobile phones. Since there may be security issues with videos uploaded by different clients, the visual image processing platform needs to verify the authenticity of the videos. In addition, there are also problems such as different angles or unclear videos uploaded by different clients, so the visual image processing platform needs to process the clarity of the videos. Including:
[0038] Step 110: Collect videos from different sources;
[0039] Specifically, the visual image processing platform receives videos uploaded by different clients and performs initial identification on the videos. Initial identification specifically refers to determining the category to which the collected videos belong. For example, in the smart city platform, the videos are divided into multiple sections, such as the environment section and the traffic section. Since the image feature points contained in different sections are different, in order to improve the efficiency of subsequent image processing, the platform performs preliminary identification on the video content uploaded by the client and classifies the videos uploaded by the client into different sections for subsequent visual image operations.
[0040] The video acquisition method specifically includes the following sub-steps:
[0041] Step 111: Obtain type features under different section categories from the platform historical data to form a category feature set;
[0042] Obtain classified data from different sections from the platform's historical data, extract type features from these data, and form a category feature set in, represents m types of section categories, m represents the total number of categories, (a 11 ,a 12 ,a 13 …),(a 21 ,a 22 ,a23 …)…(a n1 ,a n2 ,a n3 …)、(b 11 ,b 12 ,b 13 …),(b 21 ,b 22 ,b 23 …)…(b n1 ,b n2 ,b n3 …), (β 11 ,β 12 ,β 13 …),(β 21 ,β 22 ,β 23 …)…(β n1 ,β n2 ,β n3 …) respectively represent The type features under the category, the extracted features of each section are different.
[0043] Step 112: construct different classification sub-models, and input the category feature sets into different classification sub-models for training.
[0044] Since different sections have different attributes, multiple classification sub-models are set for different section attributes. For example, for text section classification, you can choose to set a naive Bayes model, for the version that needs to be predicted and classified, you can choose to use a logistic regression model, and for sections that require multiple classification problems, you can choose to use a random forest model.
[0045] Step 113, estimating the optimal allocation set of each classification sub-model according to the classification results of each classification sub-model;
[0046] Use the category feature set to train different classification sub-models f t (x), and then use the classification sub-model f t (x) The classification result of classifying the category feature set is obtained using the formula Estimate the optimal allocation set {μ 1 , μ 2 , μ 3 ......μ T}, where f t (s j ) is the classification result output by the t-th classification sub-model input into the j-th column of the category feature set, and the value of j ranges from 1 to m. It represents the mean of the classification results output by the t-th classification sub-model input in the j-th column. It represents the output result of inputting the mean of the classification results of the jth column into the sub-classification model for training again, λ j represents the weight assigned to the mean of the classification results of the jth column, δ t represents the bias of the t-th classification sub-model, μ t is the optimal allocation for the t-th classification sub-model.
[0047] Step 114: Determine a comprehensive classification model according to each classification sub-model and the corresponding optimal allocation set;
[0048] Step 115: Input the image frames separated from the collected video into a comprehensive classification model, and output the video category.
[0049] Return to see Figure 1 , step 120, separating image frames from each video, extracting image frames including target features from the image frames, and recording corresponding target feature attributes;
[0050] Each video is composed of image frames. Each video is separated into multiple image frames, and then image frames including target features are extracted from these image frames. Extracting target feature image frames from image frames specifically includes the following sub-steps:
[0051] Step 121, obtaining all image frames corresponding to each video;
[0052] Step 122, segmenting the image frame to obtain a foreground and a background;
[0053] Step 123: Use a convolutional neural network to separate features of different dimensions from the image frame, extract key features from the foreground, and use the key features that match the video category as target features.
[0054] Step 124: Record the corresponding target feature attributes of the image frame containing the target feature.
[0055] The target characteristic attributes include time, location, client information, etc. The time indicates the time when the video was uploaded, and different image frames have continuous time attributes. The location indicates the location where the video was uploaded. The client information is the attributes of the client that uploaded the video, including but not limited to the IP address, client security level, etc.
[0056] Return to see Figure 1 , step 130, obtaining a target feature image frame within a preset range according to the target feature attribute, and separating the environmental feature from the target feature image frame;
[0057] The preset scope specifically refers to the time attribute being within the preset range (taking into account the time difference between different devices) and the location being within the preset range (taking into account the positioning deviation of different devices). Generally, for videos that have not been tampered with, the time and location of videos uploaded by different clients for the same target feature are not much different. However, considering the security of the video itself, although the time and location are within the preset range, the images may contain the target feature, but the environmental features they reflect are different. Therefore, secondary identification is performed based on the environmental features.
[0058] Among them, after separating the target features from an image frame, other features of specific reference value except the target features can be used as environmental features. Environmental features are environmental parameters with characteristic points, including, for example, buildings, objects, signs, etc. In addition, to ensure the integrity of environmental features, the environmental features here also include all background images except the target features.
[0059] Specifically, separating environmental features from target feature image frames includes the following sub-steps:
[0060] Step 131, dividing the background of the image frame into regions to obtain a plurality of sub-background images;
[0061] Step 132: extract all the focus features from each sub-background image;
[0062] Step 133, select and classify the focus features to obtain environmental features;
[0063] Specifically, there are many focus features extracted from each sub-background image, and classification is performed from the focus features according to feature attributes. For example, if the focus feature is a building, the building feature in each sub-background image is classified into one category as one of the environmental features.
[0064] Step 140, calculating the correlation between the acquired environmental features, if the correlation exceeds a preset value, performing fusion processing on the corresponding target feature image frame, if the correlation does not exceed the preset value, executing step 150;
[0065] The correlation calculation is performed on the environmental features of the target feature image frames within the preset scope to determine whether these image frames indicate the conditions in the same scene. For example, the correlation between image frame 1 and image frame 2 is compared. The specific formula is: Calculate the correlation between environmental features, where G represents the correlation between environmental features, p v is the similarity between the vth sub-background image of image frame 1 and all sub-background images of image frame 2, Represents similarity p v The weight of v≥p′ (similarity setting value) is substituted into the formula to calculate the relevance, x v Represents the pixel point of the vth sub-background image of image frame 1, y k Represents a pixel in image frame 2.
[0066] If the correlation exceeds a preset value (the value is set after a lot of calculations and analysis), it means that these image frames indicate the same scene condition. In order to improve the clarity of the image, these image frames are fused, which specifically includes the following sub-steps:
[0067] Step 141, locate the target feature sub-image in the target feature image frame, scale the target feature sub-image to the same proportion and put it into the same coordinate system;
[0068] Step 142, calculating the clarity of each target feature sub-graph, obtaining the target feature sub-graph whose clarity is greater than the average clarity, and assigning corresponding weights to the target feature sub-graph whose clarity is greater than the average clarity;
[0069] Specifically, when performing multi-image fusion processing, the present application sets corresponding weights for different images, and the weights are determined by the clarity of the image. In addition, the present application selects sub-images with clarity greater than the average clarity from the images that preliminarily meet the above conditions, and only uses these sub-images as images to be fused, thereby further improving the clarity of image fusion.
[0070] Step 143: Calculate the fused grayscale value of the corresponding pixel point according to the grayscale value of the target feature of the same pixel point in each target feature sub-image and the corresponding weight to obtain a fused image.
[0071] Return to see Figure 1 , step 150, calculating the corresponding video source security according to the target feature attribute, determining the authenticity of the video according to the video source security, and returning a corresponding response to the video source.
[0072] This application takes into account that although devices with low video source security may have unstable videos, it cannot be directly determined that there must be problems with the device's last video. If the video uploaded by the device and the videos of other devices can be verified for the above-mentioned correlation, the video uploaded by the device and the videos of other devices will be used together as the basis for processing the clarity of the target features. If the last video of the device is different from the videos of other devices in the correlation verification, then the video with a safe video source is retained, and a response is returned to the video source party and other video source parties, so that the video source party can provide new evidence, or the device with low video source security can make an evidence appeal, etc., and the security level of the video source party will be updated based on the evidence verification of the video source party for the next security calculation.
[0073] The specific formula Calculate the security of the video source, where SE represents the security of the video source, θ represents whether the client has real-name authentication, if real-name authentication is performed, θ = 1, if not, θ takes a value between 0 and 1, H IP Indicates whether the video source is an illegal security domain. If it is an illegal security domain, H IP =0, if it is a legal security domain, then H IP =1, W is the security level of the platform for the video source, which is determined by multiple factors, including but not limited to whether the video source has transmitted unsafe content, the security value set by the video source according to the registration information when registering, etc.; Y r is the rth security factor of the video source. This security factor is sent to the platform along with the video when it is uploaded to the platform, that is, the video attribute mentioned above. The value of r is R, R is the total number of all security factors, τ r is the impact factor of the rth security factor on the security of the video source.
[0074] After calculating the security of the video source, if the security is higher than the set value, the video source is considered safe and trustworthy, so the video of this source is retained for image fusion processing, the unsafe video source sends a response to it, and the security level of the source is updated again.
[0075] Embodiment 2
[0076] Embodiment 2 of the present invention provides a system for visual image processing, including:
[0077] Video acquisition module, used to collect videos from different sources;
[0078] Specifically, the visual image processing platform receives videos uploaded by different clients and performs initial identification on the videos. Initial identification specifically refers to determining the category to which the collected videos belong. For example, in the smart city platform, the videos are divided into multiple sections, such as the environment section and the traffic section. Since the image feature points contained in different sections are different, in order to improve the efficiency of subsequent image processing, the platform performs preliminary identification on the video content uploaded by the client and classifies the videos uploaded by the client into different sections for subsequent visual image operations.
[0079] Video acquisition specifically includes the following sub-steps:
[0080] Obtain type features under different section categories from the platform's historical data to form a category feature set;
[0081] Obtain classified data from different sections from the platform's historical data, extract type features from these data, and form a category feature set in, represents m types of section categories, m represents the total number of categories, (a 11 ,a 12 ,a 13 …),(a 21 ,a 22 ,a 23 …)…(a n1 ,a n2 ,a n3 …)、(b 11 ,b 12 ,b 13 …),(b 21 ,b 22 ,b 23 …)…(b n1 ,b n2 ,b n3 …), (β 11 ,β 12 ,β 13 …),(β 21 ,β 22 ,β 23 …)…(β n1 ,β n2 ,β n3 …) respectively represent The type features under the category, the extracted features of each section are different.
[0082] Construct different classification sub-models and input the category feature sets into different classification sub-models for training.
[0083] Since different sections have different attributes, multiple classification sub-models are set for different section attributes. For example, for text section classification, you can choose to set a naive Bayes model, for the version that needs to be predicted and classified, you can choose to use a logistic regression model, and for sections that require multiple classification problems, you can choose to use a random forest model.
[0084] Estimate the optimal allocation set of each classification sub-model according to the classification results of each classification sub-model;
[0085] Use the category feature set to train different classification sub-models f t (x), and then use the classification sub-model f t (x) The classification result of classifying the category feature set is obtained using the formula Estimate the optimal allocation set {μ 1 , μ 2 , μ 3 ......μ T}, where f t (s j) is the classification result output by the t-th classification sub-model input into the j-th column of the category feature set, and the value of j ranges from 1 to m. It represents the mean of the classification results output by the t-th classification sub-model input in the j-th column. It represents the output result of inputting the mean of the classification results of the jth column into the sub-classification model for training again, λ j represents the weight assigned to the mean of the classification results of the jth column, δ t represents the bias of the t-th classification sub-model, μ t is the optimal allocation for the t-th classification sub-model.
[0086] Determine a comprehensive classification model based on each classification sub-model and the corresponding optimal allocation set;
[0087] The image frames separated from the captured video are input into the comprehensive classification model to output the video category.
[0088] A feature extraction module is used to separate image frames from each video, extract image frames including target features from the image frames, and record corresponding target feature attributes; according to the target feature attributes, obtain target feature image frames within a preset range, and separate environmental features from the target feature image frames;
[0089] Each video is composed of image frames. Each video is separated into multiple image frames, and then the image frames containing target features are extracted from these image frames. Extracting target feature image frames from image frames specifically includes: obtaining all image frames corresponding to each video; performing image segmentation on the image frames to obtain foreground and background; using convolutional neural networks to separate features of different dimensions from the image frames, extracting key features from the foreground, and taking the key features that meet the video category as target features; and recording the corresponding target feature attributes of the image frames containing the target features.
[0090] The target characteristic attributes include time, location, client information, etc. The time indicates the time when the video was uploaded, and different image frames have continuous time attributes. The location indicates the location where the video was uploaded. The client information is the attributes of the client that uploaded the video, including but not limited to the IP address, client security level, etc.
[0091] The preset scope specifically refers to the time attribute being within the preset range (taking into account the time difference between different devices) and the location being within the preset range (taking into account the positioning deviation of different devices). Generally, for videos that have not been tampered with, the time and location of videos uploaded by different clients for the same target feature are not much different. However, considering the security of the video itself, although the time and location are within the preset range, the images may contain the target feature, but the environmental features they reflect are different. Therefore, secondary identification is performed based on the environmental features.
[0092] Among them, after separating the target features from an image frame, other features of specific reference value except the target features can be used as environmental features. Environmental features are environmental parameters with characteristic points, including, for example, buildings, objects, signs, etc. In addition, to ensure the integrity of environmental features, the environmental features here also include all background images except the target features.
[0093] Specifically, environmental features are separated from target feature image frames, including: dividing the background of the image frame into regions to obtain multiple sub-background images; extracting all focus features from each sub-background image; selecting and classifying the focus features to obtain environmental features; there are many focus features extracted from each sub-background image, and the focus features are selected and classified according to feature attributes. For example, if the focus feature is a building, the building features in each sub-background image are classified into one category as one of the environmental features.
[0094] The image processing module is used to calculate the correlation between the acquired environmental features; if the correlation exceeds a preset value, the corresponding target feature image frame is fused;
[0095] The correlation calculation is performed on the environmental features of the target feature image frames within the preset scope to determine whether these image frames indicate the conditions in the same scene. For example, the correlation between image frame 1 and image frame 2 is compared. The specific formula is: Calculate the correlation between environmental features, where G represents the correlation between environmental features, p v is the similarity between the vth sub-background image of image frame 1 and all sub-background images of image frame 2, Represents similarity p v The weight of v ≥p′ (similarity setting value) is substituted into the formula to calculate the relevance, x v Represents the pixel point of the vth sub-background image of image frame 1, y k Represents a pixel in image frame 2.
[0096] If the correlation exceeds the preset value (the value is set after a lot of calculations and analysis), it means that these image frames indicate the same scene condition. In order to improve the clarity of the image, these image frames are fused, specifically including: locating the target feature sub-image in the target feature image frame, scaling the target feature sub-image to the same proportion and placing it in the same coordinate system; calculating the clarity of each target feature sub-image, obtaining the target feature sub-image with a clarity greater than the average clarity, and assigning corresponding weights to the target feature sub-image with a clarity greater than the average clarity; specifically, when performing multi-image fusion processing, the present application sets corresponding weights for different images, and the weight is determined by the clarity of the image, and the present application selects sub-images with a clarity greater than the average clarity from the images that preliminarily meet the above conditions, and only uses these sub-images as images to be fused, further improving the clarity of image fusion. According to the grayscale value and corresponding weight of the target feature of the same pixel point of each target feature sub-image, the fusion grayscale value of the corresponding pixel point is calculated to obtain a fused image.
[0097] The security processing module is used to calculate the corresponding video source security according to the target feature attributes when the correlation does not exceed the preset value, determine the authenticity of the video according to the video source security, and return a corresponding response to the video source.
[0098] This application takes into account that although devices with low video source security may have unstable videos, it cannot be directly determined that there must be problems with the device's last video. If the video uploaded by the device and the videos of other devices can be verified for the above-mentioned correlation, the video uploaded by the device and the videos of other devices will be used together as the basis for processing the clarity of the target features. If the last video of the device is different from the videos of other devices in the correlation verification, then the video with a safe video source is retained, and a response is returned to the video source party and other video source parties, so that the video source party can provide new evidence, or the device with low video source security can make an evidence appeal, etc., and the security level of the video source party will be updated based on the evidence verification of the video source party for the next security calculation.
[0099] The specific formula Calculate the security of the video source, where SE represents the security of the video source, θ represents whether the client has real-name authentication, if real-name authentication is performed, θ = 1, if not, θ takes a value between 0 and 1, H IP Indicates whether the video source is an illegal security domain. If it is an illegal security domain, H IP =0, if it is a legal security domain, then H IP =1, W is the security level of the platform for the video source, which is determined by multiple factors, including but not limited to whether the video source has transmitted unsafe content, the security value set by the video source according to the registration information when registering, etc.; Yr is the rth security factor of the video source. This security factor is sent to the platform along with the video when it is uploaded to the platform, that is, the video attribute mentioned above. The value of r is R, R is the total number of all security factors, τ r is the impact factor of the rth security factor on the security of the video source.
[0100] After calculating the security of the video source, if the security is higher than the set value, the video source is considered safe and trustworthy, so the video of this source is retained for image fusion processing, the unsafe video source sends a response to it, and the security level of the source is updated again.
[0101] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for visual image processing, characterized in that: include: Collect videos from different sources; Separate image frames from each video, extract image frames including target features from the image frames, and record corresponding target feature attributes; According to the target feature attributes, a target feature image frame within a preset range is obtained, and the environmental features are separated from the target feature image frame; Calculate the correlation between the acquired environmental features; If the correlation exceeds the preset value, the corresponding target feature image frame is fused; If the correlation does not exceed the preset value, the corresponding video source security is calculated according to the target feature attributes, the authenticity of the video is determined according to the video source security, and a corresponding response is returned to the video source; Calculate the correlation between the acquired environmental features, including: The correlation calculation is performed on the environmental features of the target feature image frames within the preset scope to determine whether these image frames indicate the conditions in the same scene. Specifically, the correlation between image frame 1 and image frame 2 is compared, and the formula is used. Calculate the correlation between environmental features, where G represents the correlation between environmental features, is the first v The similarity between the sub-background image and all the sub-background images of image frame 2, Indicates similarity The weight of Substitute the similarity of into the formula to calculate the correlation, Set a value for similarity, Represents the first v The number of pixels of the sub-background image, Represents a pixel in image frame 2; If the correlation exceeds the preset value, it means that the image frames indicate the same scene condition. In order to improve the clarity of the image, the image frames are fused, which specifically includes the following sub-steps: Step 141, locate the target feature sub-image in the target feature image frame, scale the target feature sub-image to the same proportion and put it into the same coordinate system; Step 142, calculating the clarity of each target feature sub-graph, obtaining the target feature sub-graph whose clarity is greater than the average clarity, and assigning corresponding weights to the target feature sub-graph whose clarity is greater than the average clarity; Step 143, according to the grayscale value of the target feature of the same pixel in each target feature sub-image and the corresponding weight, calculate the fused grayscale value of the corresponding pixel to obtain a fused image; Calculate the security of the video source, including: using the formula Calculate the security of the video source, where Indicates the security of the video source. Indicates whether the client is real-name authenticated. If so, If real-name authentication is not performed, Takes a value from 0 to 1, Indicates whether the video source is an illegal security domain. If it is an illegal security domain, then , if it is a legal security domain, then , The security level of the video source assigned by the platform. This value is determined by multiple factors, including whether the video source has transmitted unsafe content and the security value set by the video source based on the registration information when registering. is the rth security factor of the video source. This security factor is sent to the platform along with the video when it is uploaded to the platform. The value of r is R, where R is the total number of all security factors. is the impact factor of the rth security factor on the security of the video source; after calculating the security of the video source, if the security is higher than the set value, the video source is considered to be safe and trustworthy, then the video of this source is retained for image fusion processing, the unsafe video source sends a response to it, and the security level of the source is updated again.
2. A method for visual image processing as claimed in claim 1, characterized in that: After collecting videos from different sources, the process also includes initializing the video identification to determine the category to which the collected video belongs.
3. A method for visual image processing as claimed in claim 2, characterized in that: The video acquisition method specifically includes the following sub-steps: Obtain type features under different section categories from the platform's historical data to form a category feature set; Build corresponding classification sub-models for different platform attributes, and input the category feature sets into the corresponding classification sub-models for training; Estimate the optimal classification set of each classification sub-model according to the classification results of each classification sub-model; Determine the comprehensive classification model according to each classification sub-model and the corresponding optimal classification set; The image frames separated from the captured video are input into the comprehensive classification model to output the video category.
4. A method for visual image processing as claimed in claim 1, characterized in that: After separating the target feature from an image frame, other features with specific reference values except the target feature are selected as environmental features, and all background images except the target feature are taken as environmental features.
5. A system for visual image processing, characterized in that: include: Video acquisition module, used to collect videos from different sources; A feature extraction module is used to separate image frames from each video, extract image frames including target features from the image frames, and record corresponding target feature attributes; According to the target feature attributes, a target feature image frame within a preset range is obtained, and the environmental features are separated from the target feature image frame; An image processing module, used to calculate the correlation between the acquired environmental features; If the correlation exceeds the preset value, the corresponding target feature image frame is fused; A security processing module is used to calculate the security of the corresponding video source according to the target feature attribute when the correlation does not exceed the preset value, determine the authenticity of the video according to the security of the video source, and return a corresponding response to the video source; Calculate the correlation between the acquired environmental features, including: The correlation calculation is performed on the environmental features of the target feature image frames within the preset scope to determine whether these image frames indicate the conditions in the same scene. Specifically, the correlation between image frame 1 and image frame 2 is compared, and the formula is used. Calculate the correlation between environmental features, where G represents the correlation between environmental features, is the similarity between the vth sub-background image of image frame 1 and all sub-background images of image frame 2, Indicates similarity The weight of Substitute the similarity of into the formula to calculate the correlation, Set a value for similarity, Represents the pixel of the vth sub-background image of image frame 1, Represents a pixel in image frame 2; If the correlation exceeds the preset value, it means that these image frames indicate the same scene condition. In order to improve the clarity of the image, these image frames are fused, specifically including: locating the target feature sub-image in the target feature image frame, scaling the target feature sub-image to the same proportion and placing it in the same coordinate system; calculating the clarity of each target feature sub-image, obtaining the target feature sub-image with a clarity greater than the average clarity, and assigning corresponding weights to the target feature sub-image with a clarity greater than the average clarity; calculating the fused gray value of the corresponding pixel according to the gray value and corresponding weight of the target feature of the same pixel of each target feature sub-image, and obtaining a fused image; Calculate the security of the video source, including: using the formula Calculate the security of the video source, where Indicates the security of the video source. Indicates whether the client is real-name authenticated. If so, If real-name authentication is not performed, Takes a value from 0 to 1, Indicates whether the video source is an illegal security domain. If it is an illegal security domain, then , if it is a legal security domain, then , The security level of the video source assigned by the platform. This value is determined by multiple factors, including whether the video source has transmitted unsafe content and the security value set by the video source based on the registration information when registering. is the rth security factor of the video source. This security factor is sent to the platform along with the video when it is uploaded to the platform. The value of r is R, where R is the total number of all security factors. is the impact factor of the rth security factor on the security of the video source; after calculating the security of the video source, if the security is higher than the set value, the video source is considered to be safe and trustworthy, then the video of this source is retained for image fusion processing, the unsafe video source sends a response to it, and the security level of the source is updated again.
6. A visual image processing system as claimed in claim 5, characterized in that: After collecting videos from different sources, the process also includes initializing the video identification to determine the category to which the collected video belongs.
7. A visual image processing system as claimed in claim 6, characterized in that: The video acquisition module specifically includes: obtaining type features under different section categories from the platform's historical data to form a category feature set; building corresponding classification sub-models for the attributes of different section of the platform, and inputting the category feature set into the corresponding classification sub-model for training; estimating the optimal classification set of each classification sub-model based on the classification results of each classification sub-model; determining a comprehensive classification model based on each classification sub-model and the corresponding optimal classification set; inputting the image frames separated from the acquired video into the comprehensive classification model, and outputting the video category.
8. A visual image processing system as claimed in claim 5, characterized in that: After separating the target feature from an image frame, other features with specific reference values except the target feature are selected as environmental features, and all background images except the target feature are taken as environmental features.
