CN109242807A - Rendering parameter adaptive edge softening method, medium and computer equipment - Google Patents

Rendering parameter adaptive edge softening method, medium and computer equipment Download PDF

Info

Publication number
CN109242807A
CN109242807A CN201811320921.0A CN201811320921A CN109242807A CN 109242807 A CN109242807 A CN 109242807A CN 201811320921 A CN201811320921 A CN 201811320921A CN 109242807 A CN109242807 A CN 109242807A
Authority
CN
China
Prior art keywords
edge
smooth
paragraph
softening
rendering parameter
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.)
Granted
Application number
CN201811320921.0A
Other languages
Chinese (zh)
Other versions
CN109242807B (en
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.)
Xiamen draft Co., Ltd
Original Assignee
Xiamen Happy Shopping Technology Co Ltd
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 Xiamen Happy Shopping Technology Co Ltd filed Critical Xiamen Happy Shopping Technology Co Ltd
Priority to CN201811320921.0A priority Critical patent/CN109242807B/en
Publication of CN109242807A publication Critical patent/CN109242807A/en
Application granted granted Critical
Publication of CN109242807B publication Critical patent/CN109242807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of edge softening method, medium and computer equipments that rendering parameter is adaptive, including obtain original image, and carry out FIG pull handle to original image to obtain foreground image;The edge pixel point of foreground image is obtained, and chain encoding processing is carried out to obtain edge point sequence to edge pixel;The edge line of foreground image is split into a plurality of smooth paragraph according to edge point sequence;The gradient value of each edge pixel point on every smooth paragraph is calculated, and every corresponding average gradient value of smooth paragraph is calculated according to the gradient value of each edge pixel point on every smooth paragraph;The softening range of every smooth paragraph is obtained, according to every corresponding average gradient value of smooth paragraph so that the edge to foreground image softens;It can be realized and carry out the selection of joining place emergence value automatically according to display foreground and background, and it is possible to the selection of different emergence values be carried out according to different local edge situations, so that the emergence processing for image is more lively.

Description

Rendering parameter adaptive edge softening method, medium and computer equipment
Technical field
The present invention relates to technical field of image processing, in particular to a kind of edge softening method that rendering parameter is adaptive, Medium and computer equipment.
Background technique
Image emergence processing technique is blurred by being connected part with background to display foreground, to constitute a kind of gradual change Visual effect, to achieve the effect that display foreground and background natural sparse model.
In existing image emergence processing technique, the setting of emergence value is mostly carried out by experience by professional, and Determine that emergence value carries out the uniform length virtualization of the prospect overall situation later;This mode needs artificially to judge emergence value, on Hand difficulty is larger, also, can not carry out the adaptive of different virtualization ranges from the different situations of background edge according to prospect, so that Feather effect is more stiff.
Summary of the invention
The present invention is directed to solve one of the technical problem in above-mentioned technology at least to a certain extent.For this purpose, of the invention One purpose is to propose a kind of edge softening method that rendering parameter is adaptive, can be realized automatically according to display foreground and back Scape carries out the selection of joining place emergence value, and it is possible to the selection of different emergence values is carried out according to different local edge situations, So that the emergence processing for image is more lively.
Second object of the present invention is to propose a kind of computer readable storage medium.
Third object of the present invention is to propose a kind of computer equipment.
In order to achieve the above objectives, first aspect present invention embodiment proposes a kind of edge that rendering parameter is adaptive softening Method, comprising the following steps: obtain original image, and FIG pull handle is carried out to obtain foreground image to the original image;It obtains The edge pixel point of the foreground image is taken, and chain encoding processing is carried out to obtain edge point sequence to the edge pixel point; The edge line of the foreground image is split into a plurality of smooth paragraph according to the edge point sequence;It calculates on every smooth paragraph The gradient value of each edge pixel point, and every is calculated smoothly according to the gradient value of each edge pixel point on every smooth paragraph The corresponding average gradient value of paragraph;The softening model of every smooth paragraph is obtained according to every corresponding average gradient value of smooth paragraph It encloses, so that the edge to the foreground image softens, wherein the average gradient value is inversely proportional with the softening range.
The adaptive edge softening method of rendering parameter according to an embodiment of the present invention, firstly, original image is obtained, and It gets original image and FIG pull handle is carried out to obtain foreground image to original image later;Then, the side of foreground image is obtained Edge pixel, and chain encoding processing is carried out to obtain edge point sequence to edge pixel;Then, according to edge point sequence will before The edge line of scape image splits into a plurality of smooth paragraph;Then, the gradient of each edge pixel point on every smooth paragraph is calculated Value, and every corresponding average gradient of smooth paragraph is calculated according to the gradient value of each edge pixel point on every smooth paragraph Value;Then, the softening range of every smooth paragraph is obtained, according to every corresponding average gradient value of smooth paragraph so as to prospect The edge of image is softened, wherein average gradient value is inversely proportional with softening range;To realizing automatically according to display foreground and Background carries out the selection of joining place emergence value, and it is possible to carry out the choosing of different emergence values according to different local edge situations It takes, so that the emergence processing for image is more lively.
In addition, the adaptive edge softening method of the rendering parameter proposed according to that above embodiment of the present invention can also have Following additional technical characteristic:
Optionally, chain encoding processing is carried out to the edge pixel point using Freeman compiling method.
Optionally, the edge line of the foreground image is split by a plurality of smooth paragraph according to the edge point sequence, wrapped Include: handle along the edge point sequence sliding using preset unit window, and using smoothness more than preset value window as The cut-point of different smooth paragraphs, splits into a plurality of smooth paragraph for the edge line of the foreground image.
Optionally, also pass through Hough transformation before the gradient value of each edge pixel point on calculating every smooth paragraph By the marginal point sequence fit of every smooth paragraph at Bezier.
Optionally, the expression formula of the Bezier are as follows:
B (t)=(1-t)2P0+2t(1-t)P1+t2P2,t∈[0,1]
Wherein, P0And P2Two endpoints of respectively every smooth paragraph, P1For the control point of Bezier, and control The design parameter of point can be acquired by Hough transformation.
Optionally, the gradient value is calculated according to following steps: centered on edge pixel point, obtaining respectively laterally Color difference and longitudinal chromatic aberration;Evolution is carried out to obtain the gradient value to the quadratic sum of the lateral chromatic aberration and the longitudinal chromatic aberration.
Optionally, the edge of the foreground image is softened, comprising: the foreground image is subjected to N times of oversubscription, In, N is the positive integer greater than 1;Corresponding softening length is obtained according to the softening range of every smooth paragraph, and according to each side Softening length corresponding to edge pixel, the normal direction along each edge pixel point carries out coordinate migration outward, to carry out side Edge expansion, wherein when carrying out edge swell, formed on N times of oversubscription figure according to the new edge that expansion generates based on transparency Circle of equal altitudes;The N times of oversubscription figure is compressed according to the original size of the foreground image, and is obtained according to the circle of equal altitudes The transparency mean value on the N times of oversubscription figure in each N*N window is taken, and using the transparency mean value as phase after compression Answer the transparency of new coordinate points.
Optionally, coordinate migration is carried out according to the following formula:
X2=X1+cos θ * r,
Y2=Y1+sin θ * r,
Wherein, (X1, Y1) is the coordinate of each edge pixel point, and (X2, Y2) is the coordinate after migration, and r is softening length, θ is normal orientation.
In order to achieve the above objectives, second aspect of the present invention embodiment proposes a kind of computer readable storage medium, thereon It is stored with the adaptive edge softening program of rendering parameter, the adaptive edge softening program of the rendering parameter is executed by processor The adaptive edge softening method of Shi Shixian for example above-mentioned rendering parameter.
In order to achieve the above objectives, third aspect present invention embodiment proposes a kind of computer equipment, including memory, place The computer program managing device and storage on a memory and can running on a processor, which is characterized in that the processor executes When described program, as adaptive edge softening method such as above-mentioned rendering parameter is realized.
Detailed description of the invention
Fig. 1 is the flow diagram according to the adaptive edge softening method of the rendering parameter of the embodiment of the present invention;
Fig. 2 is the flow diagram according to the adaptive edge softening method of the rendering parameter of another embodiment of the present invention;
Fig. 3 is the flow diagram according to the foreground image edge softening method of the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
In existing image emergence processing technique, professional is needed rule of thumb to carry out the setting of emergence value, upper hand Difficulty is big, and emergence processing can only carry out the virtualization of unified Feather Radius to the prospect overall situation, can not be according to foreground and background edge Different situations carry out the selection of virtualization range, feather effect is stiff;Rendering parameter according to an embodiment of the present invention is adaptive Edge softening method, firstly, obtain original image, and after getting original image to original image carry out FIG pull handle with Obtain foreground image;Then, the edge pixel point of foreground image is obtained, and chain encoding processing is carried out to obtain to edge pixel Edge point sequence;Then, the edge line of foreground image is split by a plurality of smooth paragraph according to edge point sequence;Then, it calculates The gradient value of each edge pixel point on every smooth paragraph, and according to the gradient of each edge pixel point on every smooth paragraph Value calculates every corresponding average gradient value of smooth paragraph;Then, it is obtained according to the corresponding average gradient value of every smooth paragraph The softening range of every smooth paragraph, so that the edge to foreground image softens, wherein average gradient value and softening range It is inversely proportional;To realize the selection for carrying out joining place emergence value automatically according to display foreground and background, and it is possible to according to difference Local edge situation carry out the selections of different emergence values so that the emergence processing for image is more lively.
In order to better understand the above technical scheme, the exemplary reality that the present invention will be described in more detail below with reference to accompanying drawings Apply example.Although showing exemplary embodiment of the present invention in attached drawing, it being understood, however, that may be realized in various forms this hair It is bright and should not be limited by the embodiments set forth herein.It is to be able to thoroughly understand this on the contrary, providing these embodiments Invention, and the scope of the present invention can be fully disclosed to those skilled in the art.
In order to better understand the above technical scheme, in conjunction with appended figures and specific embodiments to upper Technical solution is stated to be described in detail.
Fig. 1 is the flow diagram according to the adaptive edge softening method of the rendering parameter of the embodiment of the present invention, such as Fig. 1 It is shown, the adaptive edge softening method of the rendering parameter the following steps are included:
S101 obtains original image, and carries out FIG pull handle to original image to obtain foreground image.
That is, FIG pull handle is carried out to original image, after getting original image to be processed to obtain original Foreground image in beginning image.
Wherein, FIG pull handle is carried out to original image to obtain the method for foreground image and have in the prior art in detail Description, this will not be repeated here.
S102 obtains the edge pixel point of foreground image, and carries out chain encoding processing to edge pixel to obtain edge Point sequence.
That is, further obtaining the edge in foreground image after getting the foreground image in original image Pixel, and the edge pixel point is subjected to chain encoding, to obtain edge point sequence.
Wherein, there are many modes that chain encoding is carried out to edge pixel, for example, passing through 4 connection chain codes.
As an example, chain encoding processing is carried out to edge pixel using Freeman compiling method, specifically, used Edge pixel point is carried out chain encoding by eight directional Freeman compiling method, by all pixels positioned at marginal position, by the inverse time The sequence of needle is arranged in orderly track.
The edge line of foreground image is split into a plurality of smooth paragraph according to edge point sequence by S103.
That is, the edge line of foreground image is carried out according to edge point sequence after getting edge point sequence It splits, to form a plurality of smooth paragraph.
As an example, sliding processing is carried out along edge point sequence using the unit window of default specification, and will be smooth Degree is more than cut-point of the window of preset value as different smooth paragraphs, the edge line of foreground image is split into a plurality of smooth Paragraph;In other words, it is slided with unit window along the edge point sequence of ranked completion, and edge in real-time judge window Whether the turnover of point sequence is more than threshold value, and when the judgment result is yes by the window indicia be smooth paragraph cut-point;So Afterwards, smooth paragraph is determined according to these cut-points.
S104 calculates the gradient value of each edge pixel point on every smooth paragraph, and according to every on every smooth paragraph The gradient value of a edge pixel point calculates every corresponding average gradient value of smooth paragraph.
S105 obtains the softening range of every smooth paragraph according to every corresponding average gradient value of smooth paragraph, so as to The edge of foreground image is softened.
Wherein, average gradient value is inversely proportional with softening range, that is to say, that when average gradient value is bigger, the average ladder The softening range of the corresponding smooth paragraph of angle value is smaller, conversely, average gradient value gets over hour, the average gradient value is corresponding smooth The softening range of paragraph is bigger;In this way, according to average gradient value to foreground image and background image color difference is smaller or even no color differnece Smooth section drop into row sofening treatment, meanwhile, retain foreground picture in foreground image and the biggish smooth paragraph of background image color difference As original edge hardness, thus adaptively according to the corresponding side of color difference progress between foreground image and background image Edge processing, so that treated, final image is more natural.
That is, obtaining each edge by gradient operator along each edge pixel point on every smooth paragraph Then the gradient value of pixel it is corresponding to carry out every smooth paragraph according to the gradient value of each edge pixel point got The calculating of average gradient value;And every corresponding softening range of smooth paragraph is determined according to the average gradient value being calculated, with And according to every corresponding softening range of smooth paragraph to prospect roll into a ball to edge carry out sofening treatment, with obtain according to prospect with The different situations of background carry out the final image of adaptability softening.
In conclusion the edge softening method that rendering parameter according to an embodiment of the present invention is adaptive, firstly, obtaining original Image, and FIG pull handle is carried out to obtain foreground image to original image after getting original image;Then, prospect is obtained The edge pixel point of image, and chain encoding processing is carried out to obtain edge point sequence to edge pixel;Then, according to marginal point The edge line of foreground image is split into a plurality of smooth paragraph by sequence;Then, each edge pixel on every smooth paragraph is calculated Point gradient value, and according to the gradient value of each edge pixel point on every smooth paragraph calculate every smooth paragraph it is corresponding put down Equal gradient value;Then, the softening range of every smooth paragraph is obtained according to every corresponding average gradient value of smooth paragraph, so as to The edge of foreground image is softened, wherein average gradient value is inversely proportional with softening range;To realize automatically according to image Foreground and background carries out the selection of joining place emergence value, and it is possible to carry out different emergence according to different local edge situations The selection of value, so that the emergence processing for image is more lively.
Fig. 2 is the flow diagram according to the adaptive edge softening method of the rendering parameter of another embodiment of the present invention, As shown in Fig. 2, the adaptive edge softening method of the rendering parameter the following steps are included:
S201 obtains original image, and carries out FIG pull handle to original image to obtain foreground image.
S202 obtains the edge pixel point of foreground image, and carries out chain encoding processing to edge pixel to obtain edge Point sequence.
S203 is handled along edge point sequence sliding using preset unit window, and is more than the window of preset value by smoothness Cut-point of the mouth as different smooth paragraphs, splits into a plurality of smooth paragraph for the edge line of foreground image.
That is, being slided with unit window along the edge point sequence of ranked completion, and real-time judge window Whether the turnover of edge point sequence is more than threshold value in mouthful, and by the window indicia is when the judgment result is yes that smooth paragraph divides Cutpoint;Then, smooth paragraph is determined according to these cut-points.
S204, by Hough transformation by the marginal point sequence fit of every smooth paragraph at Bezier.
That is, the edge point sequence of every smooth paragraph is fitted, after getting smooth paragraph with life At Bezier.
As an example, using the sequence between two cut-points as a smooth paragraph, every smooth section is dropped into Row Hough transformation, by the marginal point sequence fit of ordered cascade to closest second order Bezier;Wherein, Bezier Curve representation formula is as follows:
B (t)=(1-t)2P0+2t(1-t)P1+t2P2,t∈[0,1]
Wherein, P0And P2Two endpoints of respectively every smooth paragraph, P1For the control point of Bezier, and according to Hough transformation and ballot determine;That is, the position at control point be it is unknown, need to establish P by Hough transformation1Coordinate Ballot device, and the highest P of concentration degree of voting1Coordinate position be exactly P that Hough transformation obtains1Coordinate calculated result.
S205 obtains lateral chromatic aberration and longitudinal chromatic aberration centered on edge pixel point respectively.
S206 carries out evolution to the quadratic sum of lateral chromatic aberration and longitudinal chromatic aberration to obtain gradient value.
That is, centered on edge pixel point, obtaining edge pixel point respectively in the calculating process of gradient value Then lateral chromatic aberration and longitudinal chromatic aberration carry out evolution to the quadratic sum of the lateral chromatic aberration and longitudinal chromatic aberration got to obtain pair Answer the gradient value of edge pixel point.
It is corresponding flat to calculate every smooth paragraph according to the gradient value of each edge pixel point on every smooth paragraph by S207 Equal gradient value.
S208 obtains the softening range of every smooth paragraph according to every corresponding average gradient value of smooth paragraph, so as to The edge of foreground image is softened.
As an example, lateral chromatic aberration is obtained respectively centered on each edge pixel point along every smooth paragraph Fx and longitudinal chromatic aberration Fy, gradient value are that the quadratic sum of lateral chromatic aberration Fx and longitudinal chromatic aberration Fy carries out the result of evolution again;Gradient After value calculates completion, the meter of average gradient value is carried out according to the gradient value of each edge pixel point on every smooth paragraph It calculates, to obtain every corresponding average gradient value of smooth paragraph;Then, it is obtained according to every corresponding average gradient value of smooth paragraph The softening range of every smooth paragraph is taken, and is softened according to edge of the softening range to foreground image;Wherein, gradient value Smaller, softening range is bigger.
It should be noted that the description of the above-mentioned edge softening method adaptive about rendering parameter in Fig. 1 is equally applicable The adaptive edge softening method of rendering parameter in the embodiment;This will not be repeated here.
In conclusion the edge softening method that rendering parameter according to an embodiment of the present invention is adaptive, firstly, obtaining original Image, and FIG pull handle is carried out to obtain foreground image to original image;Then, the edge pixel point of foreground image is obtained, and Chain encoding processing is carried out to obtain edge point sequence to edge pixel;Then, using preset unit window along marginal point sequence Column sliding processing, and using smoothness be more than preset value window as the cut-point of different smoothly paragraphs, by foreground image Edge line splits into a plurality of smooth paragraph;Then, by Hough transformation by the marginal point sequence fit of every smooth paragraph at shellfish Sai Er curve;Then, centered on edge pixel point, lateral chromatic aberration and longitudinal chromatic aberration are obtained respectively, and to lateral chromatic aberration and indulge Evolution is carried out to the quadratic sum of color difference to obtain gradient value;And the gradient according to each edge pixel point on every smooth paragraph Value calculates every corresponding average gradient value of smooth paragraph;Then, it is obtained according to the corresponding average gradient value of every smooth paragraph The softening range of every smooth paragraph, so that the edge to foreground image softens;To realize automatically according to display foreground The selection that joining place emergence value is carried out with background, and it is possible to carry out different emergence values according to different local edge situations It chooses, so that the emergence processing for image is more lively.
In some embodiments, as shown in figure 3, the adaptive edge softening side of rendering parameter that the embodiment of the present invention proposes In method, the mode that softened to the edge of foreground image specifically includes the following steps:
Foreground image is carried out N times of oversubscription by S301.
Wherein, N is the positive integer greater than 1.
As an example, foreground image is subjected to 10 times of oversubscription.
S302 obtains corresponding softening length according to the softening range of every smooth paragraph, and according to each edge pixel The corresponding softening length of point, carries out coordinate migration along the normal direction of each edge pixel point outward, to carry out edge swell, Wherein, it when carrying out edge swell, is formed on N times of oversubscription figure based on the contour of transparency according to the new edge that expansion generates Figure.
That is, obtaining corresponding softening length according to the softening range of every smooth paragraph, wherein the softening length Softening length for each edge pixel point for including in every smooth paragraph;Then, according to corresponding to each edge pixel point Softening length, the normal direction along each edge pixel point carries out coordinate migration outward, to carry out edge swell, wherein While edge swell, transparency declines step by step, is formed on N times of oversubscription figure with the new edge generated according to expansion based on transparent The circle of equal altitudes of degree.
As an example, coordinate of each edge pixel point before migration is (X1, Y1);Softening length is r, normal Direction is θ;The coordinate of each edge pixel point after migration is (X2, Y2);Then each edge pixel point is according to the following formula Carry out coordinate migration:
X2=X1+cos θ * r,
Y2=Y1+sin θ * r,
S303 compresses N times of oversubscription figure according to the original size of foreground image, and obtains N times according to circle of equal altitudes and surpass Transparency mean value on component in each N*N window, and using transparency mean value as the saturating of new coordinate points corresponding after compression Lightness.
That is, in the coordinate migration for carrying out each edge pixel point, and according to the new edge generated after expansion at N times It is formed after the circle of equal altitudes based on transparency on oversubscription figure, N times of oversubscription figure is compressed according to the original size of foreground image, The oversubscription figure that 10 times are amplified is re-compressed original size, wherein carried out with the transparency in N*N window specification transparent The calculating of mean value is spent, and using the mean value as the transparency of corresponding new coordinate points.
As an example, after carrying out 10 times of oversubscription to foreground image, each edge pixel point is migrated, and A circle of equal altitudes based on transparency is formed on 10 times of oversubscription figures according to the new edge that edge swell generates;Then, by 10 times The oversubscription figure of amplification is compressed, to compress the original size of meeting;Wherein, in terms of every 10*10 window progress transparency mean value Calculate, using the transparency mean value as the corresponding compression of 10*10 window after pixel transparency value.
In conclusion the softening mode of the adaptive edge softening method of rendering parameter according to an embodiment of the present invention, first First, foreground image is subjected to N times of oversubscription;Then, corresponding softening length is obtained according to the softening range of every smooth paragraph, and According to softening length corresponding to each edge pixel point, coordinate is carried out outward along the normal direction of each edge pixel point and is moved It moves, to carry out edge swell, wherein when carrying out edge swell, formed on N times of oversubscription figure according to the new edge that expansion generates Circle of equal altitudes based on transparency;Then, N times of oversubscription figure is compressed according to the original size of foreground image, and according to contour Figure obtains the transparency mean value on N times of oversubscription figure in each N*N window, and using transparency mean value as corresponding new after compression The transparency of coordinate points;So that the edge of the image after edge sofening treatment is more natural, mellow and full, edge is improved The visual effect of image after sofening treatment.
In order to realize above-described embodiment, the embodiment of the present invention also proposed a kind of computer readable storage medium, deposit thereon The adaptive edge softening program of rendering parameter is contained, when the adaptive edge softening program of the rendering parameter is executed by processor Realize as adaptive edge softening method such as above-mentioned rendering parameter.
In order to realize above-described embodiment, the embodiment of the present invention also proposed a kind of computer equipment, including memory, processing Device and storage on a memory and the computer program that can run on a processor, when the processor executes described program, reality Now edge softening method as adaptive such as above-mentioned rendering parameter.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
It should be noted that in the claims, any reference symbol between parentheses should not be configured to power The limitation that benefit requires.Word "comprising" does not exclude the presence of component or step not listed in the claims.Before component Word "a" or "an" does not exclude the presence of multiple such components.The present invention can be by means of including several different components It hardware and is realized by means of properly programmed computer.In the unit claims listing several devices, these are filled Several in setting, which can be, to be embodied by the same item of hardware.The use of word first, second, and third is not Indicate any sequence.These words can be construed to title.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.
In the description of the present invention, it is to be understood that, term " first ", " second " are used for description purposes only, and cannot It is interpreted as indication or suggestion relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include one or more of the features.In the description of the present invention, The meaning of " plurality " is two or more, unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc. Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integral;It can be mechanical connect It connects, is also possible to be electrically connected;It can be directly connected, can also can be in two elements indirectly connected through an intermediary The interaction relationship of the connection in portion or two elements.It for the ordinary skill in the art, can be according to specific feelings Condition understands the concrete meaning of above-mentioned term in the present invention.
In the present invention unless specifically defined or limited otherwise, fisrt feature in the second feature " on " or " down " can be with It is that the first and second features directly contact or the first and second features pass through intermediary mediate contact.Moreover, fisrt feature exists Second feature " on ", " top " and " above " but fisrt feature be directly above or diagonally above the second feature, or be merely representative of First feature horizontal height is higher than second feature.Fisrt feature can be under the second feature " below ", " below " and " below " One feature is directly under or diagonally below the second feature, or is merely representative of first feature horizontal height less than second feature.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It is interpreted as that identical embodiment or example must be directed to.Moreover, particular features, structures, materials, or characteristics described It may be combined in any suitable manner in any one or more of the embodiments or examples.In addition, without conflicting with each other, this The technical staff in field can be by the spy of different embodiments or examples described in this specification and different embodiments or examples Sign is combined.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (10)

1. a kind of edge softening method that rendering parameter is adaptive, which comprises the following steps:
Original image is obtained, and FIG pull handle is carried out to obtain foreground image to the original image;
The edge pixel point of the foreground image is obtained, and chain encoding processing is carried out to obtain marginal point to the edge pixel point Sequence;
The edge line of the foreground image is split into a plurality of smooth paragraph according to the edge point sequence;
The gradient value of each edge pixel point on every smooth paragraph is calculated, and according to each edge pixel on every smooth paragraph The gradient value of point calculates every corresponding average gradient value of smooth paragraph;
The softening range of every smooth paragraph is obtained, according to every corresponding average gradient value of smooth paragraph so as to the prospect The edge of image is softened, wherein the average gradient value is inversely proportional with the softening range.
2. the adaptive edge softening method of rendering parameter as described in claim 1, which is characterized in that compiled using Freeman Code method carries out chain encoding processing to the edge pixel point.
3. the adaptive edge softening method of rendering parameter as claimed in claim 1 or 2, which is characterized in that according to the side The edge line of the foreground image is split into a plurality of smooth paragraph by edge point sequence, comprising:
Handled using preset unit window along the edge point sequence sliding, and using smoothness be more than preset value window as The cut-point of different smooth paragraphs, splits into a plurality of smooth paragraph for the edge line of the foreground image.
4. the adaptive edge softening method of rendering parameter as claimed in claim 3, which is characterized in that calculating every smoothly On paragraph before the gradient value of each edge pixel point, also pass through Hough transformation for the marginal point sequence fit of every smooth paragraph At Bezier.
5. the adaptive edge softening method of rendering parameter as claimed in claim 4, which is characterized in that the Bezier Expression formula are as follows:
Wherein,WithTwo endpoints of respectively every smooth paragraph,For the control point of Bezier, the tool at control point Body parameter can be acquired by Hough transformation.
6. the adaptive edge softening method of rendering parameter according to any one of claims 1 to 5, which is characterized in that described Gradient value is calculated according to following steps:
Centered on edge pixel point, lateral chromatic aberration and longitudinal chromatic aberration are obtained respectively;
Evolution is carried out to obtain the gradient value to the quadratic sum of the lateral chromatic aberration and the longitudinal chromatic aberration.
7. the adaptive edge softening method of rendering parameter as described in claim 1, which is characterized in that the foreground image Edge softened, comprising:
The foreground image is subjected to N times of oversubscription, wherein N is the positive integer greater than 1;
Corresponding softening length is obtained according to the softening range of every smooth paragraph, and according to corresponding to each edge pixel point Soften length, the normal direction along each edge pixel point carries out coordinate migration outward, to carry out edge swell, wherein into When row edge swell, the circle of equal altitudes based on transparency is formed on N times of oversubscription figure according to the new edge that expansion generates;
The N times of oversubscription figure is compressed according to the original size of the foreground image, and institute is obtained according to the circle of equal altitudes The transparency mean value on N times of oversubscription figure in each N*N window is stated, and using the transparency mean value as corresponding new after compression The transparency of coordinate points.
8. the adaptive edge softening method of rendering parameter as claimed in claim 7, which is characterized in that according to the following formula into The migration of row coordinate:
X2=X1+cos θ * r,
Y2=Y1+sin θ * r,
Wherein, (X1, Y1) is the coordinate of each edge pixel point, and (X2, Y2) is the coordinate after migration, and r is softening length, and θ is Normal orientation.
9. a kind of computer readable storage medium, which is characterized in that be stored thereon with the adaptive edge softening journey of rendering parameter Sequence, the rendering parameter adaptive edge softening program are realized as described in any one of claim 1-8 when being executed by processor The adaptive edge softening method of rendering parameter.
10. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that when the processor executes described program, realize as of any of claims 1-8 The adaptive edge softening method of rendering parameter.
CN201811320921.0A 2018-11-07 2018-11-07 Rendering parameter adaptive edge softening method, medium, and computer device Active CN109242807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811320921.0A CN109242807B (en) 2018-11-07 2018-11-07 Rendering parameter adaptive edge softening method, medium, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811320921.0A CN109242807B (en) 2018-11-07 2018-11-07 Rendering parameter adaptive edge softening method, medium, and computer device

Publications (2)

Publication Number Publication Date
CN109242807A true CN109242807A (en) 2019-01-18
CN109242807B CN109242807B (en) 2020-07-28

Family

ID=65077386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811320921.0A Active CN109242807B (en) 2018-11-07 2018-11-07 Rendering parameter adaptive edge softening method, medium, and computer device

Country Status (1)

Country Link
CN (1) CN109242807B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429339A (en) * 2020-03-20 2020-07-17 稿定(厦门)科技有限公司 Character rasterization processing method, medium, equipment and device
CN111462278A (en) * 2020-03-17 2020-07-28 稿定(厦门)科技有限公司 Depth-based material sorting rendering method, medium, equipment and device
CN111768422A (en) * 2020-01-16 2020-10-13 北京沃东天骏信息技术有限公司 Edge detection processing method, device, equipment and storage medium
CN113096014A (en) * 2021-03-31 2021-07-09 咪咕视讯科技有限公司 Video super-resolution processing method, electronic device and storage medium
CN113538478A (en) * 2020-04-15 2021-10-22 深圳市光鉴科技有限公司 Image-based box boundary extraction method, system, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299268A (en) * 2008-07-01 2008-11-05 上海大学 Semantic object dividing method suitable for low depth image
US20090003720A1 (en) * 2007-06-28 2009-01-01 Microsoft Corporation Efficient image representation by edges and low-resolution signal
CN101493937A (en) * 2009-02-27 2009-07-29 西北工业大学 Method for detecting content reliability of digital picture by utilizing gradient local entropy
CN101764945A (en) * 2008-11-04 2010-06-30 新奥特(北京)视频技术有限公司 Subtitle dramatizing method based on closed outline of Bezier
CN105404841A (en) * 2015-11-04 2016-03-16 成都汇智远景科技有限公司 Mobile equipment data calculation method based on internet of things
CN107710229A (en) * 2016-10-20 2018-02-16 深圳配天智能技术研究院有限公司 Shape recognition process, device, equipment and computer-readable storage medium in image
US20180108325A1 (en) * 2016-10-14 2018-04-19 Julia Schwarz Modifying hand occlusion of holograms based on contextual information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090003720A1 (en) * 2007-06-28 2009-01-01 Microsoft Corporation Efficient image representation by edges and low-resolution signal
CN101299268A (en) * 2008-07-01 2008-11-05 上海大学 Semantic object dividing method suitable for low depth image
CN101764945A (en) * 2008-11-04 2010-06-30 新奥特(北京)视频技术有限公司 Subtitle dramatizing method based on closed outline of Bezier
CN101493937A (en) * 2009-02-27 2009-07-29 西北工业大学 Method for detecting content reliability of digital picture by utilizing gradient local entropy
CN105404841A (en) * 2015-11-04 2016-03-16 成都汇智远景科技有限公司 Mobile equipment data calculation method based on internet of things
US20180108325A1 (en) * 2016-10-14 2018-04-19 Julia Schwarz Modifying hand occlusion of holograms based on contextual information
CN107710229A (en) * 2016-10-20 2018-02-16 深圳配天智能技术研究院有限公司 Shape recognition process, device, equipment and computer-readable storage medium in image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHEN X等: ".A blur image blind identify algorithm based on the edge feature", 《THE THIRD INTERNATIONAL CONFERENCE ON MULTIMEDIA INFORMATION NETWORKING AND SECURITY》 *
郭景等: "USM增强的边缘羽化拼接图像检测方法_", 《计算机工程与应用》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768422A (en) * 2020-01-16 2020-10-13 北京沃东天骏信息技术有限公司 Edge detection processing method, device, equipment and storage medium
CN111462278A (en) * 2020-03-17 2020-07-28 稿定(厦门)科技有限公司 Depth-based material sorting rendering method, medium, equipment and device
CN111462278B (en) * 2020-03-17 2022-10-25 稿定(厦门)科技有限公司 Depth-based material sequencing rendering method, medium, equipment and device
CN111429339A (en) * 2020-03-20 2020-07-17 稿定(厦门)科技有限公司 Character rasterization processing method, medium, equipment and device
CN113538478A (en) * 2020-04-15 2021-10-22 深圳市光鉴科技有限公司 Image-based box boundary extraction method, system, equipment and storage medium
CN113538478B (en) * 2020-04-15 2024-06-04 深圳市光鉴科技有限公司 Box boundary extraction method, system, equipment and storage medium based on image
CN113096014A (en) * 2021-03-31 2021-07-09 咪咕视讯科技有限公司 Video super-resolution processing method, electronic device and storage medium
CN113096014B (en) * 2021-03-31 2023-12-08 咪咕视讯科技有限公司 Video super processing method, electronic device and storage medium

Also Published As

Publication number Publication date
CN109242807B (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN109242807A (en) Rendering parameter adaptive edge softening method, medium and computer equipment
US10325399B2 (en) Optimal texture memory allocation
US7538764B2 (en) System and method to obtain surface structures of multi-dimensional objects, and to represent those surface structures for animation, transmission and display
US20030052875A1 (en) System and method to obtain surface structures of multi-dimensional objects, and to represent those surface structures for animation, transmission and display
US20190210288A1 (en) Systems and methods for printing of 3d models
US7436404B2 (en) Method and apparatus for rendering of translucent objects using volumetric grids
US20070018988A1 (en) Method and applications for rasterization of non-simple polygons and curved boundary representations
US20070247458A1 (en) Adaptive computation of subdivision surfaces
US9349216B2 (en) Sketch-based generation and editing of quad meshes
US10713844B2 (en) Rendering based generation of occlusion culling models
US10089782B2 (en) Generating polygon vertices using surface relief information
US10762682B2 (en) Skinning weights and underlying object suppression of three-dimensional images
CN104205173A (en) Method for estimating the opacity level in a scene and corresponding device
US10984573B2 (en) Collision detection and resolution in virtual environments
EP1221674A2 (en) System and method to obtain surface structures of multidimensional objects, and to represent those surface structures for animation, transmission and display
Nieser et al. Patch layout from feature graphs
Kelly et al. Interactive dimensioning of parametric models
Schäfer et al. Dynamic feature-adaptive subdivision
Bendels et al. Detail-Preserving Surface Inpainting.
JP5798357B2 (en) Image processing apparatus and image processing method
KR20170016156A (en) Method and apparatus for performing a path rendering
Cheung et al. Incremental rendering of deformable trimmed NURBS surfaces
US10636210B2 (en) Dynamic contour volume deformation
Tekumalla et al. Reverse engineering point clouds to fit tensor product B-spline surfaces by blending local fits
Alotaibi et al. Image completion by structure reconstruction and texture synthesis

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 361000 G02, 3rd floor, No. 10 Punan Road, Dongpu Road, Siming District, Xiamen City, Fujian Province

Patentee after: Xiamen draft Co., Ltd

Address before: 361000 G02, 3rd floor, No. 10 Punan Road, Dongpu Road, Siming District, Xiamen City, Fujian Province

Patentee before: XIAMEN HUANLEGUANG TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder