Disclosure of Invention
In order to solve the technical problems that in the prior art, the image filtering enhancement effect of the intelligent community monitoring image is poor, namely the enhanced intelligent community monitoring image is fuzzy, so that the effect on intelligent community resource management is poor, the invention aims to provide a method and a system for intelligent community resource management based on big data, and the adopted technical scheme is as follows:
the invention provides a method for managing intelligent community resources based on big data, which comprises the following steps:
acquiring an intelligent community monitoring gray image subjected to fringe interference;
obtaining the local outlier degree of each pixel point according to the integral gray scale difference between each pixel point and the local neighborhood pixel points; according to the gray value distribution trend of the pixel points in the intelligent community monitoring gray image, obtaining a fringe interference direction; obtaining the overall interference intensity of each pixel point according to the gray value, the local outlier degree and the position distribution condition of each pixel point in the fringe interference direction corresponding to each pixel point;
obtaining the reference interference degree of each pixel point according to the integral interference intensity and the local outlier degree distribution condition of each pixel point in the adjacent domain in the fringe interference direction corresponding to each pixel point; correcting the reference interference degree according to the local outlier degree distribution rule between each pixel point and each corresponding pixel point vertical to the fringe interference direction, so as to obtain the corrected interference degree of each pixel point;
Obtaining non-local mean filtering weight of each pixel point according to the modified interference degree; according to the non-local average filtering weight, performing non-local average filtering on the intelligent community monitoring gray level image to obtain an intelligent community monitoring enhanced image; and performing intelligent community resource management according to the intelligent community monitoring enhanced image.
Further, the method for obtaining the local outlier degree comprises the following steps:
taking the gray value average value of all the pixel points in a preset first neighborhood range of each pixel point as the local gray value average value of each pixel point; and taking the positive correlation mapping value of the difference between the gray value of each pixel point and the corresponding local gray average value as the local outlier degree of each pixel point.
Further, the method for acquiring the fringe interference direction comprises the following steps:
selecting a preset first number of seed points in the intelligent community monitoring gray level image, and performing regional growth according to a preset growth criterion based on gray level values of all pixel points until a preset cut-off growth condition is met, so as to obtain at least two growth connected domains; wherein, the preset growth criteria include: presetting one pixel point with the smallest gray value difference with the corresponding seed point in a second neighborhood range as a new seed point; the preset cut-off growth conditions include: the number of the pixel points in the growth connected domain obtained in the region growth process is larger than a preset second number;
Performing straight line fitting on all pixel points of each growth connected domain to obtain a fitting straight line of each growth connected domain; taking the included angle between the fitting straight line and the horizontal direction as a reference included angle of each growth communicating domain; and taking the average value of the reference included angles of all the growth connected domains as the included angle between the fringe interference direction and the horizontal direction.
Further, the calculation formula of the overall interference intensity includes:
wherein,is->The overall interference intensity of the individual pixel points; />Is->The number of the pixel points of each pixel point in the corresponding fringe interference direction; />Is->The first pixel point in the corresponding fringe interference direction>Local outlier degree of individual pixel points; />Is->The first pixel point in the corresponding fringe interference direction>The gray value average value of all pixel points in a preset first neighborhood range of each pixel point; />Is->All pixel points in preset first neighborhood range of each pixel pointA gray value average value; />Is->Pixel dot and->The first pixel point in the corresponding fringe interference direction>Euclidean distance between individual pixel points; />Is a logarithmic function with a natural constant as a base; />Is an exponential function with a natural constant as a base; / >Is an absolute value sign.
Further, the calculation formula of the reference interference degree includes:
wherein,is->Reference interference degree of each pixel point; />Is->The overall interference intensity of the individual pixel points; />Is->Standard deviation of local outlier degree of all pixel points in a preset third neighborhood range of each pixel point in the corresponding fringe interference direction; />Is->The maximum value of local outlier degrees of all pixel points in a preset third neighborhood range of each pixel point in the corresponding fringe interference direction; />Is->The minimum value of local outlier degree of all pixel points in a preset third neighborhood range of each pixel point in the corresponding fringe interference direction; />As a hyperbolic tangent function.
Further, the method for acquiring the corrected interference degree comprises the following steps:
taking the direction vertical to the fringe interference direction as a fringe vertical reference direction; taking the mode of the local outlier degree of all the pixel points in a preset fourth adjacent domain range of each pixel point in the vertical reference direction of the corresponding stripe as the reference outlier degree of each pixel point; taking a positive correlation mapping value of the difference between the local outlier degree of each pixel point and the corresponding reference outlier degree as an interference degree correction weight of each pixel point; and obtaining the corrected interference degree of each pixel point according to the interference degree correction weight and the reference interference degree of each pixel point, wherein the interference degree correction weight and the reference interference degree are in positive correlation with the corrected interference degree.
Further, the method for acquiring the non-local mean filtering weight comprises the following steps:
and taking the normalized value of the reciprocal of the sum value between the corrected interference degree and the preset first adjusting parameter as the non-local average filtering weight of each pixel point.
Further, the method for obtaining the corrected interference degree of each pixel point according to the interference degree correction weight and the reference interference degree of each pixel point includes:
and taking the product of the interference degree correction weight and the reference interference degree as the correction interference degree of each pixel point.
Further, the search window of the non-local mean filtering is a 9×9 size window.
The invention also provides a large-data-based intelligent community resource management system, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes any one step of the large-data-based intelligent community resource management method when executing the computer program.
The invention has the following beneficial effects:
considering that different pixel points in the intelligent community monitoring gray level image are affected by stripe interference to different degrees, if the weight of the pixel point affected by the stripe interference is reduced in the non-local mean value filtering process, the influence of the pixel point affected by the stripe interference can be reduced while the image is enhanced by adopting the non-local mean value filtering, so that the enhanced effect of the enhanced intelligent community monitoring enhanced image is better, and therefore, the degree of each pixel point affected by the stripe interference needs to be calculated. The gray value of the pixel points in the intelligent community monitoring gray image is obviously offset by considering that the existence of the interference fringes affects the gray value of the pixel points, so that the local outlier degree of each pixel point is obtained according to the integral gray difference between each pixel point and the local neighborhood pixel point. Further combining the characteristic that the pixel points on different stripe areas are subjected to different intensities of the integral stripe interference, and obtaining the integral interference intensity of each pixel point according to the gray value, the local outlier degree and the position distribution condition of each pixel point in the stripe interference direction corresponding to each pixel point, namely representing the influence degree of interference of each pixel point from two angles of local and integral; and further combining the local outlier degree with the overall interference degree, and taking the characteristic of non-uniformity of the interference intensity part on the same stripe into consideration, and obtaining the reference interference degree of each pixel point according to the overall interference intensity and the local outlier degree distribution condition of each pixel point in the neighborhood in the stripe interference direction corresponding to each pixel point. Further, in order to enable the measurement of the stripe interference to be more accurate, the position distribution of pixel points which are less affected by the stripe interference in the intelligent community monitoring gray level image is combined, the reference interference degree is corrected according to the local outlier degree distribution rule between each pixel point and each corresponding pixel point which is perpendicular to the stripe interference direction, the more accurate correction interference degree is obtained, the non-local mean value filtering weight obtained according to the correction interference degree is more accurate, the non-local mean value filtering effect on the intelligent community monitoring gray level image after the non-local mean value filtering weight is combined is better, namely the image filtering enhancement effect of the intelligent community monitoring enhancement image is better, the intelligent community monitoring enhancement image after the image enhancement is clearer, and the effect of intelligent community resource management according to the intelligent community monitoring enhancement image is better.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of a method and a system for managing intelligent community resources based on big data according to the invention, wherein the detailed description is given below of the specific implementation, structure, characteristics and effects thereof. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
An embodiment of a method and a system for intelligent community resource management based on big data:
the invention provides a method and a system for managing intelligent community resources based on big data, which are specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for managing smart community resources based on big data according to an embodiment of the present invention is shown, where the method includes:
step S1: and acquiring the intelligent community monitoring gray level image which is interfered by the stripes.
The embodiment of the invention aims to provide a big data-based intelligent community resource management method which is used for carrying out filtering enhancement through an image processing method according to an intelligent community monitoring gray level image to obtain an intelligent community monitoring enhancement image with better enhancement effect, so that the effect of carrying out intelligent community resource management according to the intelligent community monitoring enhancement image is better. It is therefore first necessary to acquire the smart community monitoring gray level image subject to streak interference. In the embodiment of the invention, the monitoring camera of the intelligent community is used for collecting the monitoring initial image of the intelligent community, which is interfered by stripes, and analyzing according to the gray value in the image is considered in the follow-up process, so that the monitoring initial image of the intelligent community is further grayed, and the monitoring gray image of the intelligent community, which is interfered by the stripes, is obtained. Referring to fig. 3, a smart community monitoring gray scale image subject to fringe interference according to an embodiment of the present invention is shown, in fig. 3, fringe distribution has a significant regularity and has a significant effect on image observation.
Step S2: obtaining the local outlier degree of each pixel point according to the integral gray scale difference between each pixel point and the local neighborhood pixel points; according to the gray value distribution trend of the pixel points in the intelligent community monitoring gray image, obtaining a fringe interference direction; and obtaining the integral interference intensity of each pixel point according to the gray value, the local outlier degree and the position distribution condition of each pixel point in the fringe interference direction corresponding to each pixel point.
Considering that different pixel points in the intelligent community monitoring gray level image are affected by stripe interference to different degrees, if the weight of the pixel point affected by the stripe interference is reduced in the non-local mean value filtering process, the influence of the pixel point affected by the stripe interference can be reduced while the image is enhanced by adopting the non-local mean value filtering, so that the enhanced effect of the enhanced intelligent community monitoring enhanced image is better, and therefore, the degree of each pixel point affected by the stripe interference needs to be calculated. The gray value of each pixel point is usually offset due to fringe interference, so that the fringe interference degree can be primarily represented on the angle of the distribution condition of the local neighborhood pixel points of each pixel point according to the integral gray difference between each pixel point and the local neighborhood pixel points of each pixel point under the condition of gray value offset.
Preferably, the method for obtaining the local outlier degree includes:
taking the gray value average value of all the pixel points in a preset first neighborhood range of each pixel point as the local gray value average value of each pixel point; and taking the positive correlation mapping value of the difference between the gray value of each pixel point and the corresponding local gray average value as the local outlier degree of each pixel point. In the embodiment of the present invention, the preset first neighborhood range is set to be a 24 neighborhood, that is, a region formed by other pixel points except for the central pixel point in a window with a size of 5×5 with each pixel point as a center. The local gray average value can represent the gray distribution condition in the neighborhood of each pixel point, and the larger the difference between the gray value of each pixel point and the local gray average value is, the larger the deviation degree of the pixel point and the pixel point in the neighborhood is, namely the larger the discrete degree on the gray level is, the more likely the influence of stripe interference is, the gray value is obviously deviated, and the larger the corresponding local outlier degree is.
In the embodiment of the invention, each pixel point is taken as the first pixel point in turnA pixel point of +>The method for obtaining the local outlier degree of each pixel point is expressed as the following formula:
Wherein,is->Local outlier degree of individual pixel points; />Is->Gray values of the individual pixels; />Is->Local outlier degree of individual pixel, i.e. +.>The gray value average value of all pixel points in a preset first neighborhood range of each pixel point; />Is a logarithmic function with a natural constant as a base; />Is an absolute value sign. It should be noted that except->In addition, the implementer may perform positive correlation mapping by other methods, but the mapped value is guaranteed to be greater than or equal to 0, for example, a sampled hyperbolic tangent function, which is not further described herein.
The local outlier degree can only represent the corresponding gray level deviation through the gray level deviation of each pixel point relative to the local neighborhood pixel points, and the limitation on the whole image is high. When the smart community monitoring gray level image is interfered by stripes, a plurality of stripes are usually arranged regularly, all the stripes have definite directionality, and the interference intensity of different stripes is different, so that further interference degree analysis needs to be carried out on each pixel point from the whole of each stripe. Since the stripe arrangement has significant directional regularity, to determine the stripe region of each pixel, the direction of the stripe needs to be determined first. Considering that the gray level image of the intelligent community monitoring interfered by the stripes has a certain gray level similarity in the stripe direction, and the interfered areas are strip-shaped areas which are parallel to each other, so that the gray level similarity in the stripe direction also exists in the area which is not interfered.
Preferably, the method for acquiring the fringe interference direction comprises the following steps:
selecting a preset first image from the intelligent community monitoring gray level imagePerforming regional growth on a plurality of seed points and based on gray values of all pixel points according to a preset growth criterion until a preset cut-off growth condition is met, and obtaining at least two growth connected domains; wherein, the preset growth criteria include: presetting one pixel point with the smallest gray value difference with the corresponding seed point in a second neighborhood range as a new seed point; the preset cut-off growth conditions include: and the number of the pixel points in the growth connected domain obtained in the region growth process is larger than a preset second number. In the embodiment of the present invention, the preset first number is set to 20, the preset second number is set to 50, and the preset second neighborhood range is set to eight neighbors, so that the practitioner can adjust the sizes of the preset first number, the preset second number and the preset second neighborhood range according to the specific implementation environment, which is not further described herein. Because the pixel points in the stripe direction generally have gray scale similarity to a certain extent, the growth connected domains can extend in the stripe direction through the region growing algorithm, so that after each growth connected domain is obtained, all the pixel points of each growth connected domain are subjected to straight line fitting, and a fitting straight line of each growth connected domain is obtained; the included angle between the fitting straight line and the horizontal direction is used as a reference included angle of each growth communicating domain; and taking the average value of the reference included angles of all the growth connected domains as the included angle between the fringe interference direction and the horizontal direction, and combining the corresponding extending directions of all the growth connected domains through the average value, so that the obtained fringe interference direction is more accurate. In order to reduce the interference of accidental data, the method can be used for The method eliminates the interference of abnormal reference included angles, then carries out mean value calculation, and an implementer can adjust according to the specific implementation environment and +.>Methods are well known to those skilled in the art and are not further defined or described herein.
After the fringe interference direction is obtained, according to the characteristics of different fringe interference intensities, the interference degree analysis is carried out on each pixel point from the whole fringe. Considering that normal gray level fluctuation exists in a normal region in an image, the gray level fluctuation of pixel points in a fringe interference direction is influenced under fringe interference, the more similar the pixel point neighborhood distribution is in the corresponding fringe interference direction, the greater the local outlier degree of each pixel point is, the greater the intensity of the pixel point subjected to overall interference is indicated, and the closer the distance between the pixel point in the fringe interference direction and the corresponding pixel point is, the greater the reference value is, and the greater the overall interference intensity obtained according to calculation is. Therefore, the embodiment of the invention obtains the integral interference intensity of each pixel point according to the gray value, the local outlier degree and the position distribution condition of each pixel point in the fringe interference direction corresponding to each pixel point.
Preferably, the calculation formula of the overall interference intensity includes:
wherein,is->The overall interference intensity of the individual pixel points; />Is->The number of the pixel points of each pixel point in the corresponding fringe interference direction; />Is->The first pixel point in the corresponding fringe interference direction>Local outlier degree of individual pixel points; />Is->The first pixel point in the corresponding fringe interference direction>The gray value average value of all pixel points in a preset first neighborhood range of each pixel point; />Is->The gray value average value of all pixel points in a preset first neighborhood range of each pixel point; />Is->Pixel dot and->The first pixel point in the corresponding fringe interference direction>Euclidean distance between individual pixel points; />Is a logarithmic function with a natural constant as a base; />Is an exponential function with a natural constant as a base; />Is an absolute value sign.
Due to the firstThe pixel points are corresponding toA plurality of other pixels are arranged in the fringe interference direction, so that each other pixel is analyzed, and the other pixels are respectively connected with the +.>The farther the pixel is, the smaller the reference value of the corresponding interference effect is, so that other pixels and the +.>The euclidean distance between the pixel points is used as a denominator to carry out positive correlation mapping, and an implementer can select other methods besides a logarithmic function to carry out positive correlation mapping. According to the characteristic that the gray scale fluctuation of the pixel points in the fringe interference direction is influenced, the more similar the neighborhood distribution of the pixel points in the fringe interference direction is, the greater the intensity of the integral interference of the pixel points is, the corresponding +. >The smaller the difference between the local gray average value of each pixel point and the local gray average value of other pixel points is, namely +.>The smaller the pixel neighborhood distribution is, the more similar the corresponding pixel is, the greater the intensity of the whole interference is, thus by +.>For->The negative correlation mapping is performed, and the implementer can also process by other negative correlation mapping methods such as reciprocal. Further, considering that the pixel points with larger local outlier degree are more influenced by stripe interference, the pixel points in the stripe interference direction are more influenced by stripe interference as a whole, and the overall interference intensity is larger. Finally, combining the influence of all other pixel points on the whole interference intensity in a mean value mode to obtain the +.>Integral of individual pixelsInterference intensity, the greater the corresponding overall interference intensity, indicates +.>The greater the degree of outlier in the fringe direction of the pixel point, the +.>The larger the gray scale difference between each pixel point and the surrounding background, the larger the overall interference of the stripes in the stripe direction.
Step S3: obtaining the reference interference degree of each pixel point according to the overall interference intensity and the local outlier degree distribution condition of each pixel point in the neighborhood in the fringe interference direction corresponding to each pixel point; and correcting the reference interference degree according to the local outlier degree distribution rule between each pixel point and each corresponding pixel point vertical to the fringe interference direction, so as to obtain the corrected interference degree of each pixel point.
The integral interference intensity of each pixel point is obtained through the difference of the interference intensity of the pixel points on different stripe areas; further, it is required to consider that the interference intensity distribution of each pixel point in the stripe direction is also uneven, and the actual interference intensity of each pixel point in the stripe direction is different, so that further analysis is performed on the basis of the overall interference intensity, and a reference interference degree representing the interference influence degree of each pixel point is obtained. And considering that the local outlier degree can represent the interference characteristic of each pixel point on the neighborhood gray value to a certain extent, the embodiment of the invention obtains the reference interference degree of each pixel point according to the overall interference intensity and the local outlier degree distribution condition of each pixel point in the neighborhood in the fringe interference direction corresponding to each pixel point.
Preferably, the calculation formula of the reference interference level includes:
wherein,is->Reference interference degree of each pixel point; />Is->The overall interference intensity of the individual pixel points; />Is->Standard deviation of local outlier degree of all pixel points in a preset third neighborhood range of each pixel point in the corresponding fringe interference direction; / >Is->The maximum value of local outlier degrees of all pixel points in a preset third neighborhood range of each pixel point in the corresponding fringe interference direction; />Is->The minimum value of local outlier degree of all pixel points in a preset third neighborhood range of each pixel point in the corresponding fringe interference direction; />As a hyperbolic tangent function.
In the embodiment of the present invention, the preset third neighborhood range is set as a range corresponding to 20 nearest pixels centered on each pixel in the fringe interference direction. Monitoring gray scale images for smart communitiesIn other words, although there is a gray scale fluctuation in the fringe disturbance direction as a whole, the local gray scale fluctuation is not usually noticeable when it is not affected by the fringe disturbance, and corresponds to the gray scale fluctuationTo preset the standard deviation of the local outlier degree of all the pixel points in the third neighborhood range, the standard deviation can represent the fluctuation degree,/for>The larger the fluctuation degree of the local outlier degree of the pixel points in the corresponding neighborhood range is, the more the fluctuation degree of the local outlier degree of the pixel points in the corresponding neighborhood range is, the description of the firstThe larger the difference between the neighborhood gray scale distribution of each pixel point and the neighborhood gray scale distribution of the pixel points in the preset third neighborhood range is, the more obvious the corresponding local gray scale fluctuation is, which indicates the +. >The more likely a pixel is to be a pixel that is subject to interference. And->The greater the overall interference intensity of each pixel point is, the more obvious the fringe area is interfered by the fringe, and the greater the corresponding reference interference degree is. />And->Similarly, the +.>The pixel points preset the fluctuation degree of the local outlier degree of the pixel points in the third neighborhood range, and no further description is given here. It should be noted that the hyperbolic tangent function is a positive correlation normalization, and the practitioner may implement the positive correlation normalization by other methods, such as linear normalization, which is not further described herein.
In addition, the parameters representing the interference degree, which are calculated by the reference interference degree only through different parameter indexes, are required to be considered, the specific numerical value of the parameters representing the interference degree is not accurate enough for representing the real interference degree of the pixel point, and the corresponding reference interference degree is calculated by the fringe area which is not affected by fringe interference through the calculation and does not accord with the actual situation, so that the reference interference degree is further required to be corrected, and the obtained non-local mean value filtering weight is more accurate. According to the embodiment of the invention, the reference interference degree is corrected according to the local outlier degree distribution rule between each pixel point and each corresponding pixel point vertical to the fringe interference direction, so as to obtain the corrected interference degree of each pixel point.
Preferably, the method for acquiring the corrected interference degree includes:
taking the direction vertical to the fringe interference direction as a fringe vertical reference direction; and taking the mode of the local outlier degree of all the pixel points in a preset fourth adjacent domain range of each pixel point in the vertical reference direction of the corresponding stripe as the reference outlier degree of each pixel point. Since the fringes on the smart community monitoring gray level image are regularly distributed, although the interference intensity between different fringe areas is different, the local outlier degree of the gray level value calculated by the fringe area which is not affected by the fringe interference is generally consistent, while the local outlier degree of the pixel point on the area which is affected by the fringe interference is generally changed in a fluctuation manner, and the fringe area between every two real interference fringes is generally the fringe area which is not affected by the fringe interference. Therefore, the mode of the local outlier degree in the vertical reference direction of the stripe is the outlier degree standard of the stripe area which is not affected by the stripe interference, and the reference interference degree of each pixel point is corrected by taking the outlier degree standard as the standard, so that the reference interference degree of each pixel point is more attached to the actual situation. In the embodiment of the present invention, the preset fourth adjacent domain range is set to a range corresponding to 20 nearest pixels centered on each pixel in the stripe vertical reference direction, and the implementer can adjust itself according to the specific implementation environment.
And taking the positive correlation mapping value of the difference between the local outlier degree of each pixel point and the corresponding reference outlier degree as the interference degree correction weight of each pixel point. The difference between the local outlier corresponding to the pixel point on the fringe area not affected by the fringe interference and the corresponding reference outlier is usually 0 or is close to 0, that is, the greater the corresponding interference level correction weight, the greater the extent affected by the fringe interference.
And further, obtaining the corrected interference degree of each pixel point according to the interference degree correction weight and the reference interference degree of each pixel point, wherein the interference degree correction weight and the reference interference degree are in positive correlation with the corrected interference degree. Preferably, the method for obtaining the corrected interference degree of each pixel point according to the interference degree correction weight and the reference interference degree of each pixel point includes:
and taking the product of the interference degree correction weight and the reference interference degree as the correction interference degree of each pixel point.
In an embodiment of the invention, the firstThe method for obtaining the correction interference degree of each pixel point is expressed as the following formula:
wherein,is->Correction interference degree of each pixel point, +. >Is->Reference interference level of individual pixels, < >>Is->Interference degree correction weight of each pixel point, < ->Is->Reference outlier degree of individual pixels, < ->Is->Local outlier degree of individual pixel points; />In order to preset the second adjustment parameter, in the embodiment of the present invention, the preset second adjustment parameter is set to 0.1, and the practitioner can adjust the second adjustment parameter according to the specific implementation environment. According to the method for obtaining the corrected interference degree, the first ∈>The greater the local outlier degree of the individual pixel point is compared with the corresponding reference outlier degree representing the normal region which is not interfered, the greater the corresponding interference degree correction weight is, namely the greater the correction interference degree is, when +.>When the local outlier degree of each pixel point is equal to the corresponding reference outlier degree, the corresponding correction interference degree is 0, namely the pixel points are not interfered by stripes.
Step S4: obtaining non-local mean filtering weight of each pixel point according to the corrected interference degree; according to the non-local mean value filtering weight, performing non-local mean value filtering on the intelligent community monitoring gray level image to obtain an intelligent community monitoring enhanced image; and performing intelligent community resource management according to the intelligent community monitoring enhanced image.
And further obtaining the non-local mean filtering weight of each pixel point according to the corrected interference degree. According to the non-local mean filtering principle, the filtering weight of the pixel points with larger interference is weakened, and the filtering effect can be improved, so that when the correction interference degree of the pixel points is larger, the corresponding non-local mean filtering weight is smaller.
Preferably, the method for acquiring the non-local mean filtering weight comprises the following steps:
and taking a normalized value of the inverse of the sum value between the corrected interference degree and the preset first adjusting parameter as the non-local mean value filtering weight of each pixel point. In the embodiment of the invention, the preset first adjustment parameter is set to be 1, and the implementer can adjust the preset first adjustment parameter according to the specific implementation environment. It should be noted that, instead of the reciprocal, the practitioner may perform the negative correlation mapping by other methods, such asWherein->Is an exponential function with a base of natural constant.
In an embodiment of the invention, the firstThe method for acquiring the non-local mean filtering weight of each pixel point is expressed as the following formula:
wherein,is->Non-local mean filtering weights for individual pixels,/->Is->Correction interference degree of each pixel point, +.>Presetting a first adjusting parameter; / >For normalization function, the normalization method in the embodiment of the present invention samples linear normalization, and an implementer can adjust the normalization method according to a specific implementation environment, which is not further described herein.
Further carrying out non-local mean filtering on the intelligent community monitoring gray level image according to the non-local mean filtering weight to obtain an intelligent community monitoring enhanced image; preferably, the search window for the non-local mean filtering is a 9 x 9 size window. In other words, in the search window, the non-local mean filtering weight of each pixel point is combined for weighting and then participates in the non-local mean filtering calculation. It should be noted that, the size of the search window can be selected by the practitioner according to the specific implementation environment, and the non-local mean filtering is a filtering method well known to those skilled in the art, which is not further limited and described herein.
And finally, performing intelligent community resource management according to the intelligent community monitoring enhanced image. The intelligent community monitoring enhancement image is an intelligent community monitoring image with the stripes removed, compared with the intelligent community monitoring gray level image, the intelligent community monitoring enhancement image is clearer, and an implementer can conduct intelligent community resource management, such as real-time monitoring, community resource counting and the like, according to the enhanced intelligent community monitoring enhancement image.
In summary, according to the method, firstly, local outlier degree is obtained according to local gray scale difference of pixel points in the intelligent community monitoring gray scale image; in the fringe interference direction obtained according to the gray value distribution trend, the integral interference intensity is obtained according to the gray value, the local outlier degree and the position of the pixel point; combining the overall interference intensity with the local outlier degree distribution in the fringe interference direction and the local outlier degree distribution rule of the pixel points perpendicular to the fringe interference direction to obtain a corrected interference degree; and finally, obtaining more accurate non-local mean value filtering weights according to the corrected interference degrees, so that the non-local mean value filtering effect after the non-local mean value filtering weights are combined is better, namely, the effect of performing intelligent community resource management according to the intelligent community monitoring enhanced image after the filtering enhancement is better.
The invention also provides a large-data-based intelligent community resource management system, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes any one step of the large-data-based intelligent community resource management method when executing the computer program.
An embodiment of an intelligent community monitoring image enhancement method comprises the following steps:
the existing method for enhancing the intelligent community monitoring image is to enhance the image filtering of the intelligent community monitoring image through non-local mean filtering, but in the intelligent community monitoring image under the influence of stripe interference, the number of pixels subjected to the stripe interference is large, when the non-local mean filtering is adopted, the original effective information of the image can be covered, so that the filtering effect is poor, namely the image filtering enhancement effect of the intelligent community monitoring image is poor through the non-local mean filtering in the prior art. In order to solve the technical problem that the effect of image filtering enhancement on the intelligent community monitoring image through non-local mean filtering in the prior art is poor, the embodiment provides an intelligent community monitoring image enhancement method. Referring to fig. 2, a method for enhancing a monitoring image of an intelligent community according to an embodiment of the invention is shown, which includes:
step S01: acquiring an intelligent community monitoring gray image subjected to fringe interference;
step S02: obtaining the local outlier degree of each pixel point according to the integral gray scale difference between each pixel point and the local neighborhood pixel points; according to the gray value distribution trend of the pixel points in the intelligent community monitoring gray image, obtaining a fringe interference direction; obtaining the overall interference intensity of each pixel point according to the gray value, the local outlier degree and the position distribution condition of each pixel point in the fringe interference direction corresponding to each pixel point;
Step S03: obtaining the reference interference degree of each pixel point according to the overall interference intensity and the local outlier degree distribution condition of each pixel point in the neighborhood in the fringe interference direction corresponding to each pixel point; correcting the reference interference degree according to the local outlier degree distribution rule between each pixel point and each corresponding pixel point vertical to the fringe interference direction, so as to obtain the corrected interference degree of each pixel point;
step S04: obtaining non-local mean filtering weight of each pixel point according to the corrected interference degree; and carrying out non-local mean filtering on the intelligent community monitoring gray level image according to the non-local mean filtering weight to obtain an intelligent community monitoring enhanced image.
The steps S01 to S04 are already described in detail in the embodiment of the foregoing method and system for managing intelligent community resources based on big data, and are not described in detail.
The method considers that different pixel points in the intelligent community monitoring gray level image are affected by stripe interference to different degrees, and if the weight of the pixel point which is affected by the stripe interference is reduced in the non-local mean value filtering process, the image can be enhanced by adopting the non-local mean value filtering, and meanwhile, the influence of the pixel point which is affected by the stripe interference is reduced, so that the enhanced effect of the enhanced intelligent community monitoring enhanced image is better, and therefore, the degree of each pixel point which is affected by the stripe interference needs to be calculated. The gray value of the pixel points in the intelligent community monitoring gray image is obviously offset by considering that the existence of the interference fringes affects the gray value of the pixel points, so that the local outlier degree of each pixel point is obtained according to the integral gray difference between each pixel point and the local neighborhood pixel point. Further combining the characteristic that the pixel points on different stripe areas are subjected to different intensities of the integral stripe interference, and obtaining the integral interference intensity of each pixel point according to the gray value, the local outlier degree and the position distribution condition of each pixel point in the stripe interference direction corresponding to each pixel point, namely representing the influence degree of interference of each pixel point from two angles of local and integral; and further combining the local outlier degree with the overall interference degree, and taking the characteristic of non-uniformity of the interference intensity part on the same stripe into consideration, and obtaining the reference interference degree of each pixel point according to the overall interference intensity and the local outlier degree distribution condition of each pixel point in the neighborhood in the stripe interference direction corresponding to each pixel point. Further, in order to enable the measurement of the fringe interference to be more accurate, the position distribution of pixel points which are less affected by the fringe interference in the intelligent community monitoring gray level image is combined, the reference interference degree is corrected according to the local outlier degree distribution rule between each pixel point and each corresponding pixel point which is perpendicular to the fringe interference direction, the more accurate correction interference degree is obtained, the non-local mean value filtering weight obtained according to the correction interference degree is more accurate, and therefore the non-local mean value filtering effect on the intelligent community monitoring gray level image is better after the non-local mean value filtering weight is combined, namely the image filtering enhancement effect of the intelligent community monitoring enhancement image is better.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.