CN115908604A - Oil painting image generation method, system, device and storage medium - Google Patents

Oil painting image generation method, system, device and storage medium Download PDF

Info

Publication number
CN115908604A
CN115908604A CN202211246891.XA CN202211246891A CN115908604A CN 115908604 A CN115908604 A CN 115908604A CN 202211246891 A CN202211246891 A CN 202211246891A CN 115908604 A CN115908604 A CN 115908604A
Authority
CN
China
Prior art keywords
pixel
super
regions
pixels
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211246891.XA
Other languages
Chinese (zh)
Inventor
郑运平
黄进朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202211246891.XA priority Critical patent/CN115908604A/en
Publication of CN115908604A publication Critical patent/CN115908604A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a method, a system, a device and a storage medium for generating oil painting images, wherein the method comprises the following steps: acquiring an input image, and acquiring a super pixel matrix of the input image; taking the color mean value and the color variance of the super-pixel matrix as features, and combining similar rectangles by comparing the features of four neighborhoods of the super-pixels; combining the super pixel with the number of pixels smaller than a first preset threshold value with the super pixel and the super pixel most similar to the four adjacent domains to obtain a pixel area; clustering the pixel regions through a clustering algorithm, and combining the pixel regions with similarity larger than a second preset threshold; and according to the obtained clustering result, assigning the color mean value of the pixels in each clustering cluster to all the pixel points in the clustering cluster to obtain the oil painting image. The invention uses an unsupervised algorithm, avoids the requirement of training by needing a large number of fine labels and reduces the computational complexity. The invention can be widely applied to the field of image processing.

Description

Oil painting image generation method, system, device and storage medium
Technical Field
The invention relates to the field of image processing, in particular to a method, a system, a device and a storage medium for generating an oil painting image.
Background
The continuous development and progress of the modern information science and technology and the internet application are convenient, the requirements for image processing are higher and higher, for example, a portable digital camera has various photographing styles to adapt to photographing of various scenes, video chatting of daily communication has the effects of capturing faces of people and replacing the faces of people with various cartoon images, an automatic driving automobile identifies and segments real objects in the scenes, a gps positioning system positions traffic road conditions more finely, and the like. With the popularization of short video applications, people's awareness of privacy protection is gradually strengthened. Therefore, the quick oil painting generation algorithm based on the image can meet the requirement of people on privacy protection, and has great development space in the future market.
Image generation algorithms fall into two broad categories, namely deep learning based on convolutional neural networks and direct generation based on color images. The former uses more image generation algorithms, labels a large number of fine labels for pictures, trains a network to generate a network model, and finally applies to a real scene. In contrast, in color image processing, an image is generally accurately segmented, and then is recognized, positioned, generated, and the like by various algorithms. In the aspect of deep learning, a large number of labels are needed for training, but the labels of real-time data are relatively subjective and difficult, and although the image processing accuracy can be high in many cases, the image processing is sensitive to image changes, and even slight changes can obtain different results. This is mainly because the number of combinations of deep learning is explosive and black box operation. However, with the conventional color image segmentation, we can visually see the processing conditions after segmentation, but the calculation speed of the gPb algorithm of p.arbelaez et al and the ICM algorithm of j.h.syu et al are relatively slow, and real-time implementation cannot be realized.
Disclosure of Invention
To solve at least one of the technical problems in the prior art to some extent, the present invention provides a method, a system, a device and a storage medium for generating an oil painting image.
The technical scheme adopted by the invention is as follows:
a method for generating oil painting images comprises the following steps:
acquiring an input image, and acquiring a super pixel matrix of the input image;
taking the color mean value and the color variance of the super-pixel matrix as features, and combining similar rectangles by comparing the features of four neighborhoods of the super-pixels;
combining the super pixel with the number of pixels smaller than a first preset threshold value with the super pixel and the super pixel most similar to the four adjacent domains to obtain a pixel area;
clustering the pixel regions through a clustering algorithm, and merging the pixel regions with the similarity greater than a second preset threshold value to realize layered image segmentation;
and according to the obtained clustering result, assigning the color mean value of the pixels in each clustering cluster to all the pixel points in the clustering cluster to obtain the oil painting image.
Further, the acquiring a super-pixel matrix of an input image includes:
and carrying out asymmetric inverse matrix pattern matching on the input image, and combining a CIEDE2000 color difference formula to obtain a super pixel matrix.
Further, the asymmetric inverse matrix pattern matching of the input image and the obtaining of the super-pixel matrix by combining the CIEDE2000 color difference formula include:
obtaining a rectangle conforming to a matching mode by adopting a grid scanning mode so as to obtain a super pixel matrix of an input image;
wherein the matching pattern is set such that the mean value of the pixel colors is smaller than
Figure BDA0003887044170000021
And the variance of the pixel color is less than the maximum rectangle of tau; />
Figure BDA0003887044170000022
And tau are adjustable parameters.
Further, in the step of combining the pixel regions with the similarity greater than the second preset threshold, the method further includes a step of calculating the similarity:
calculating the correlation characteristics of the pixel regions, and calculating the similarity according to the correlation characteristics;
the related features include size difference between regions, texture feature between regions, color difference between adjacent edges, and crossing degree between regions.
Further, the calculation formula of the intersection degree between the regions is as follows:
Figure BDA0003887044170000023
Figure BDA0003887044170000024
for one in the pixel region R i Counting the area number in the m multiplied by m area around the pixel point as I ip If I is ip = j, which indicates the pixel area R of the pixel point j Surrounding the pixel point of (1), if I jq = i, indicating that pixel point q on pixel area j is surrounded by points of pixel area i.
Further, the calculation formula of the size difference between the regions is as follows:
Figure BDA0003887044170000025
in the formula, R i And R j A region of a pixel is represented by,
Figure BDA0003887044170000026
represents R i The number of pixels in the region->
Figure BDA0003887044170000027
Represents R j The number of area pixels, t represents N R T can be set to 1.7 according to experimental experience.
Further, the calculation formula of the similarity is as follows:
Figure BDA0003887044170000031
in the formula (I), the compound is shown in the specification,
Figure BDA0003887044170000032
represents a size difference between the regions, is greater than or equal to>
Figure BDA0003887044170000033
Represents a difference in color between regions, and->
Figure BDA0003887044170000034
Representing a textural feature between regions>
Figure BDA0003887044170000035
Indicating adjacent edge color difference, SI (R) i ,R j ) And the degrees of intersection among the areas are represented, and beta, gamma and eta are adjustable parameters.
The invention adopts another technical scheme that:
an oil painting image generation system comprising:
the super-pixel acquisition module is used for acquiring an input image and acquiring a super-pixel matrix of the input image;
the pixel merging module is used for merging similar rectangles by taking the color mean value and the color variance of the super-pixel matrix as characteristics and comparing the characteristics of four neighborhoods of the super-pixels;
the region acquisition module is used for combining the super pixels with the number of pixels smaller than a first preset threshold value with the super pixels and the super pixels with the most similar pixels in the four neighborhoods to obtain a pixel region;
the region merging module is used for clustering the pixel regions through a clustering algorithm and merging the pixel regions with the similarity greater than a second preset threshold value so as to realize layered image segmentation;
and the pixel assignment module is used for assigning the color mean value of the pixel in each cluster to all the pixel points in the cluster according to the obtained clustering result to obtain the oil painting image.
The invention adopts another technical scheme that:
an oil painting image generation apparatus comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method described above.
The invention adopts another technical scheme that:
a computer readable storage medium in which a processor executable program is stored, which when executed by a processor is for performing the method as described above.
The beneficial effects of the invention are: the invention uses the unsupervised algorithm, avoids the requirement of training by needing a large number of fine labels, does not excessively sense tiny changes, and can greatly reduce the computational complexity by using the super-pixel mode.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description is made on the drawings of the embodiments of the present invention or the related technical solutions in the prior art, and it should be understood that the drawings in the following description are only for convenience and clarity of describing some embodiments in the technical solutions of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for generating an oil painting image according to an embodiment of the present invention;
FIG. 2 is a flow chart of the super-pixel segmentation of an input image according to an embodiment of the present invention;
FIG. 3 is a flow chart of a similar fusion in an embodiment of the present invention;
FIG. 4 is a flow chart of differential combining in an embodiment of the present invention;
FIG. 5 is a flow chart of clustering in an embodiment of the invention;
fig. 6 is a schematic diagram of the generated output of each step in the embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided only for convenience of illustration, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If there is a description of first and second for the purpose of distinguishing technical features only, this is not to be understood as indicating or implying a relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of technical features indicated.
In the description of the present invention, unless otherwise specifically limited, terms such as set, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention by combining the specific contents of the technical solutions.
In order to overcome the defects and shortcomings of the prior art, the invention provides the improved oil painting image generation method based on the chromatic aberration formula, the method generates the superpixel to represent the original image through the CIEDE2000 chromatic aberration formula, the calculation complexity is greatly reduced, and the operation speed is effectively improved. And then, the super pixels are merged through the multi-dimensional WLD sensing layer, so that the processed picture is generated, and meanwhile, the quality of the picture is effectively maintained. The method mainly comprises three steps, wherein the first step is to perform block clustering processing on an image through a CIEDE2000 color difference formula to generate superpixels, the second step is to use variance to perform path compression on the superpixels and merge the superpixels into an area, and the third step is to use various characteristics such as WLD and the like to perform clustering and merging on the area.
As shown in fig. 1, the present embodiment provides a method for generating an oil painting image, including the following steps:
s1, acquiring an input image and acquiring a super-pixel matrix of the input image.
Referring to fig. 2, an asymmetric inverse matrix pattern matching is performed on an input image and a superpixel matrix is obtained using CIEDE2000 color difference formula. The main form is to obtain a rectangle conforming to a matching pattern by adopting a grid scanning mode, so as to obtain a preliminary superpixel of an image. Referring to fig. 6, fig. 6 (a) is an input image, and fig. 6 (b) is the resulting superpixels, each rectangle representing a superpixel.
The CIEDE2000 color difference formula adopted can better accord with the result of human eye segmentation compared with the Euclidean distance formula, and is necessary for image segmentation or high-level semantic analysis tasks.
And S2, combining similar rectangles by taking the color mean value and the color variance of the super-pixel matrix as characteristics and comparing the characteristics of four neighborhoods of the super-pixels.
Referring to fig. 3, the color mean and color variance of each rectangle are calculated as features, and similar rectangles are merged by comparing the super-pixel four-neighbor domain features. Specifically, judging whether the color mean value and the variance of the current super pixel and the adjacent super pixels are smaller than a preset threshold value, if so, combining the two super pixels by adopting a path compression method; otherwise, the next superpixel is skipped from being acquired. Until all superpixels are traversed.
And S3, combining the super pixels with the number of pixels smaller than the first preset threshold value with the super pixels and the super pixels most similar in the four neighborhoods to obtain a pixel area.
Differential combining, see fig. 4, specifically: firstly, a threshold value delta is set, and the super pixels with the number of pixels smaller than the threshold value delta are combined with the super pixels with the most similarity in four neighborhoods. A union-lookup algorithm may be used for region merging to reduce complexity. By differential binning, most of the undersized regions in the initial superpixel can be removed. Noise is reduced. Fig. 6 (c) is a region obtained by using differential combination, and the number of regions is greatly reduced compared to the original rectangular super-pixel fig. 6 (b).
And S4, clustering the pixel regions through a clustering algorithm, and combining the pixel regions with the similarity greater than a second preset threshold value to realize layered image segmentation.
Referring to fig. 5, the hierarchical image segmentation can be realized by clustering the regions with high similarity through a clustering algorithm, combining the regions with high similarity together, and continuously iterating the process. The relevant features of the regions, including the size of the regions, the texture of the regions, the color difference between adjacent edges, and the degree of intersection between the regions, need to be calculated.
Color difference D C : firstly, calculating the color mean value in the region, and obtaining the pixel difference D between the regions by calculating the Euclidean distance C
Texture feature D T : texture features in the region are calculated through an image texture algorithm, and the Euclidean distance is also used for calculating texture difference D T
Adjacent edge color difference D B : calculating the color mean of the intersecting edges of the two regions to calculate the edge color difference D B
Degree of area crossing S ij : for one in the region R i The most common region number in the m × m region around the point is counted as I ip If I is ip = j, indicates that this point is denoted by R j Pixel points of the region are surrounded, similarly if I jq = I, representing a point q on the zone j, surrounded by points of the zone I, based on I ip And I jq Defining the degree of intersection between the two regions as:
Figure BDA0003887044170000061
Figure BDA0003887044170000062
thus, if the degree of intersection of the two regions is greater, the similarity between the two regions is higher.
Size difference between regions D N : if there is little area between two regions, then the two regions should tend to merge, defining the size between the two regions:
Figure BDA0003887044170000063
and finally, integrating the differences:
Figure BDA0003887044170000064
wherein, beta, gamma and eta are three adjustable parameters.
Since the step S4 uses an iterative manner to merge regions, update the region features, and then perform region merging, a plurality of clustering results with different resolutions can be obtained, as shown in fig. 6 (d).
And S5, assigning the color mean value of the pixels in each cluster to all the pixel points in the cluster according to the obtained clustering result to obtain the oil painting image.
And finally, assigning the color mean value of the pixel in each cluster to all the pixel points in the cluster according to the obtained clustering result, so as to obtain the oil painting image, as shown in fig. 6 (e). By setting the threshold value of the number of the regions, different output results can be obtained.
In summary, compared with the prior art, the method of the embodiment has the following advantages and beneficial effects:
(1) The method of the embodiment avoids the defect that the supervised algorithm needs a large amount of fine labels for training by using the unsupervised algorithm of non-deep learning, and avoids the processes of labeling and model training by using the traditional visual algorithm, and the images of different types can be matched only by adjusting a small amount of parameters.
(2) The method of the embodiment can obtain the effect more suitable for human eyes to segment the image by adopting the CIEDE2000 color difference formula, and has a certain effect on image segmentation.
(3) The method of the embodiment well solves the problems that the non-supervised traditional vision algorithm is high in time complexity and cannot meet the real-time requirement in a superpixel mode.
This embodiment also provides an oil painting image generation system, includes:
the super-pixel acquisition module is used for acquiring an input image and acquiring a super-pixel matrix of the input image;
the pixel merging module is used for merging similar rectangles by comparing the characteristics of four neighborhoods of the super pixels by taking the color mean value and the color variance of the super pixel matrix as characteristics;
the region acquisition module is used for combining the super pixels with the number of pixels smaller than a first preset threshold value with the super pixels and the super pixels with the most similar pixels in four neighborhoods to obtain a pixel region;
the region merging module is used for clustering the pixel regions through a clustering algorithm and merging the pixel regions with the similarity greater than a second preset threshold value so as to realize layered image segmentation;
and the pixel assignment module is used for assigning the color mean value of the pixel in each cluster to all the pixel points in the cluster according to the obtained clustering result to obtain the oil painting image.
The oil painting image generation system of the embodiment can execute the oil painting image generation method provided by the method embodiment of the invention, can execute any combination implementation steps of the method embodiment, and has corresponding functions and beneficial effects of the method.
This embodiment also provides an oil painting image generation device, includes:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method of fig. 1.
The oil painting image generation device of the embodiment can execute the oil painting image generation method provided by the method embodiment of the invention, can execute any combination implementation steps of the method embodiment, and has corresponding functions and beneficial effects of the method.
Embodiments of the present application also disclose a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions may be read by a processor of a computer device from a computer-readable storage medium, and executed by the processor, causing the computer device to perform the method illustrated in fig. 1.
The embodiment also provides a storage medium, which stores instructions or programs capable of executing the oil painting image generation method provided by the embodiment of the method of the invention, and when the instructions or the programs are run, the steps can be implemented in any combination of the embodiment of the method, so that the corresponding functions and beneficial effects of the method are achieved.
In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the described functions and/or features may be integrated in a single physical device and/or software module, or one or more functions and/or features may be implemented in a separate physical device or software module. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be understood within the ordinary skill of an engineer, given the nature, function, and internal relationship of the modules. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the foregoing description of the specification, reference to the description of "one embodiment/example," "another embodiment/example," or "certain embodiments/examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for generating an oil painting image is characterized by comprising the following steps:
acquiring an input image, and acquiring a super pixel matrix of the input image;
taking the color mean value and the color variance of the super-pixel matrix as characteristics, and combining similar rectangles by comparing the characteristics of four neighborhoods of the super-pixels;
combining the super pixel with the number of pixels smaller than a first preset threshold value with the super pixel and the super pixel most similar to the four adjacent domains to obtain a pixel area;
clustering the pixel regions through a clustering algorithm, and merging the pixel regions with the similarity greater than a second preset threshold value to realize layered image segmentation;
and according to the obtained clustering result, assigning the color mean value of the pixels in each clustering cluster to all the pixel points in the clustering cluster to obtain the oil painting image.
2. The method according to claim 1, wherein the acquiring the super-pixel matrix of the input image comprises:
and carrying out asymmetric inverse matrix pattern matching on the input image, and combining a CIEDE2000 color difference formula to obtain a super pixel matrix.
3. The method as claimed in claim 2, wherein the step of performing asymmetric inverse matrix pattern matching on the input image and obtaining the superpixel matrix by combining with a CIEDE2000 color difference formula comprises:
obtaining a rectangle conforming to a matching mode by adopting a grid scanning mode so as to obtain a super pixel matrix of an input image;
wherein the matching pattern is set such that the mean value of the pixel colors is smaller than
Figure FDA0003887044160000013
And the variance of the pixel color is less than the maximum rectangle of tau; />
Figure FDA0003887044160000014
And tau are adjustable parameters.
4. The method for generating the oil painting image according to claim 1, wherein in the step of combining the pixel areas with the similarity greater than a second preset threshold, the method further comprises a step of calculating the similarity:
calculating the correlation characteristics of the pixel regions, and calculating the similarity according to the correlation characteristics;
the related features include size difference between regions, texture feature between regions, color difference between adjacent edges, and crossing degree between regions.
5. The method according to claim 4, wherein the calculation formula of the degree of intersection between the regions is as follows:
Figure FDA0003887044160000011
Figure FDA0003887044160000012
for one in the pixel region R i The area number in the m multiplied by m area around the pixel point is counted as I ip If I ip = j, which indicates the pixel area R of the pixel point j The pixel point of (2) is surrounded, similarly if I jq = i, indicating that pixel point q on pixel area j is surrounded by points of pixel area i.
6. The oil painting image generation method according to claim 5, wherein a calculation formula of the size difference between the regions is as follows:
Figure FDA0003887044160000021
/>
in the formula, R i And R j A region of a pixel is represented by,
Figure FDA0003887044160000022
represents R i The number of pixels in the region->
Figure FDA0003887044160000023
Represents R j Region(s)The number of pixels, t representing N R The weight of (c).
7. The oil painting image generation method according to claim 6, wherein the calculation formula of the similarity is as follows:
Figure FDA0003887044160000024
in the formula (I), the compound is shown in the specification,
Figure FDA0003887044160000025
represents a size difference between the regions, is greater than or equal to>
Figure FDA0003887044160000026
Represents a difference in color between regions, and->
Figure FDA0003887044160000027
Representing a textural feature between regions>
Figure FDA0003887044160000028
Indicating the difference in color of adjacent edges, SI (R) i ,R j ) The cross degree between the areas is shown, and beta, gamma and eta are adjustable parameters.
8. An oil painting image generation system, characterized by comprising:
the super-pixel acquisition module is used for acquiring an input image and acquiring a super-pixel matrix of the input image;
the pixel merging module is used for merging similar rectangles by comparing the characteristics of four neighborhoods of the super pixels by taking the color mean value and the color variance of the super pixel matrix as characteristics;
the region acquisition module is used for combining the super pixels with the number of pixels smaller than a first preset threshold value with the super pixels and the super pixels with the most similar pixels in four neighborhoods to obtain a pixel region;
the region merging module is used for clustering the pixel regions through a clustering algorithm and merging the pixel regions with similarity greater than a second preset threshold so as to realize layered image segmentation;
and the pixel assignment module is used for assigning the color mean value of the pixel in each cluster to all the pixel points in the cluster according to the obtained clustering result to obtain the oil painting image.
9. An oil painting image generation device, comprising:
at least one processor;
at least one memory for storing at least one program;
when executed by the at least one processor, cause the at least one processor to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, in which a program executable by a processor is stored, wherein the program executable by the processor is adapted to perform the method according to any one of claims 1 to 7 when executed by the processor.
CN202211246891.XA 2022-10-12 2022-10-12 Oil painting image generation method, system, device and storage medium Pending CN115908604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211246891.XA CN115908604A (en) 2022-10-12 2022-10-12 Oil painting image generation method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211246891.XA CN115908604A (en) 2022-10-12 2022-10-12 Oil painting image generation method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN115908604A true CN115908604A (en) 2023-04-04

Family

ID=86471681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211246891.XA Pending CN115908604A (en) 2022-10-12 2022-10-12 Oil painting image generation method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN115908604A (en)

Similar Documents

Publication Publication Date Title
Lv et al. Attention guided low-light image enhancement with a large scale low-light simulation dataset
US11250571B2 (en) Robust use of semantic segmentation in shallow depth of field rendering
CN110969589B (en) Dynamic scene blurred image blind restoration method based on multi-stream annotating countermeasure network
CN109753913B (en) Multi-mode video semantic segmentation method with high calculation efficiency
EP1223551A2 (en) Doubleprint photofinishing service with the second print having subject content-based modifications
CN112329702B (en) Method and device for rapid face density prediction and face detection, electronic equipment and storage medium
CN111382647B (en) Picture processing method, device, equipment and storage medium
CN109034136A (en) Image processing method, device, picture pick-up device and storage medium
CN111553362A (en) Video processing method, electronic equipment and computer readable storage medium
CN113411582A (en) Video coding method, system, device and medium based on active contour
CN115270184A (en) Video desensitization method, vehicle video desensitization method and vehicle-mounted processing system
CN110087097A (en) It is a kind of that invalid video clipping method is automatically removed based on fujinon electronic video endoscope
CN114549703B (en) Quick-action image generation method, system, device and storage medium
Ahn et al. Implement of an automated unmanned recording system for tracking objects on mobile phones by image processing method
CN114375460A (en) Data enhancement method and training method of instance segmentation model and related device
CN109215047B (en) Moving target detection method and device based on deep sea video
CN115908604A (en) Oil painting image generation method, system, device and storage medium
CN113077533B (en) Image fusion method and device and computer storage medium
Greco et al. Saliency based aesthetic cut of digital images
JP2022095565A (en) Method and system for removing scene text from image
US11182634B2 (en) Systems and methods for modifying labeled content
Galetto et al. Single image defocus map estimation through patch blurriness classification and its applications
Tran et al. Encoder–decoder network with guided transmission map: Robustness and applicability
Evain et al. A lightweight neural network for monocular view generation with occlusion handling
CN113724153A (en) Method for eliminating redundant images based on machine learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination