CN103400410B - A kind of scab pattern outline interactive rendering intent and device - Google Patents

A kind of scab pattern outline interactive rendering intent and device Download PDF

Info

Publication number
CN103400410B
CN103400410B CN201310294026.7A CN201310294026A CN103400410B CN 103400410 B CN103400410 B CN 103400410B CN 201310294026 A CN201310294026 A CN 201310294026A CN 103400410 B CN103400410 B CN 103400410B
Authority
CN
China
Prior art keywords
scab
pixel
point
value
interactive
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.)
Active
Application number
CN201310294026.7A
Other languages
Chinese (zh)
Other versions
CN103400410A (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.)
Beijing Research Center for Information Technology in Agriculture
Original Assignee
Beijing Research Center for Information Technology in Agriculture
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 Beijing Research Center for Information Technology in Agriculture filed Critical Beijing Research Center for Information Technology in Agriculture
Priority to CN201310294026.7A priority Critical patent/CN103400410B/en
Publication of CN103400410A publication Critical patent/CN103400410A/en
Application granted granted Critical
Publication of CN103400410B publication Critical patent/CN103400410B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses a kind of scab pattern outline interactive rendering intent, comprise following steps: interactive drawing scab profile, select scab diffusion starting point in contoured interior interactive mode and pixel value is set; Being loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position; Use pixel coloring device, utilize scab distribution image to carry out scab and play up.The invention discloses a kind of scab pattern outline interactive rendering device simultaneously, comprise with lower module: interactive drawing scab profile module, this module is selected scab diffusion starting point in contoured interior interactive mode and is arranged pixel value; Scab Interactive Design module, this module is loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position; Scab rendering module, this module uses pixel coloring device, utilizes scab distribution image to carry out scab and plays up.

Description

A kind of scab pattern outline interactive rendering intent and device
Technical field
The present invention relates to the field of computer graphics, in real time Realistic Rendering, the combination of plant behavior simulation, be specifically related to a kind of plant leaf scab rendering intent and device.
Background technology
Effective Pictures By A Computer refers to appliance computer graphics software, generally comprises two-dimentional software, three-dimensional software and post-production software etc., in a computer by ready-made object, role etc., by renderer, plays up, reach the effect that we want to see.
In recent years, along with the development of IT application to agriculture technology, rudimentary knowledge, FAQs and professional technique method in agricultural production became a kind of important means to utilize three-dimensional animation to show for peasant.As everyone knows, disease and pest is phenomenon common in agricultural production, but do not have good method can simulate the generating process of disease and pest truly at present and it affects the apparent situation of change of lower blade, so the apparent change of plant leaf blade becomes the application that agriculture field is needed badly under describing disease and pest condition.
Through development for many years, the research that blade plays up aspect makes some progress.As based on the method for Bidirectional surface spread function and the method based on Bidirectional surface reflective function+Bidirectional surface projection functions.But in current research, the research major part of the apparent Realistic Rendering of vane of concern concentrates apparent texture modeling in normal state, and mostly be the blade surface simulation of fixed time.But the apparent meeting of plant leaf blade produces significant change under disease and pest factor, there will be change or the cavity of color at blade surface, and whole process is a dynamic process simultaneously, these apparent features are all that existing method is difficult to simulation.Patent of invention [201210227153.0] is identical with our object, but the scab pattern that this patent can process, distribution must follow the morphological feature of cell texture, and scab distribution can only be uniformly distributed, but the form of real world disease and distribution situation are diversified, patent of invention [201210227153.0] can not well be simulated.
Summary of the invention
(1) technical matters that will solve
The object of the invention is to overcome the shortcoming that prior art can not generate blade surface scab pattern, distribution flexibly.
(2) technical scheme
The present invention uses following technical scheme:
A kind of scab pattern outline interactive rendering intent, comprises following steps:
Interactive drawing generates scab profile, selects scab diffusion starting point and arrange pixel value in contoured interior interactive mode;
Being loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position;
Use pixel coloring device, utilize scab distribution image to carry out scab and play up painted.
Preferably, described interactively drafting scab profile and the interactive method selecting scab starting point are that drafting scab profile manual as required also selects scab starting point.
Preferably, the described method arranging pixel value is:
The intensity value ranges of setting scab starting point pixel is 0-255, and scab profile gray-scale value is set to 0;
Calculate each pixel GTG angle value of scab contoured interior;
Give color by gray-scale value to scab pixel, and preserve into image file.
Preferably, the method for described each pixel GTG angle value of calculating scab contoured interior is:
Calculate the distance of this point and scab starting point pixel;
Calculate the distance of this point and all scab point pixels, and therefrom select minimum distance;
Then the GTG angle value of this point be gray-scale value that the permission maximal value and 255 of scab starting point deducts the scab starting point pixel set be multiplied by this point to scab profile minimum value divided by this point to the distance of scab starting point and this point to the minimum value of scab profile and value.
Preferably, described is be with texture image with reference to the Interactive Design method of carrying out scab position:
Select scab pattern image, manually determine the position undetermined on texture image;
Be set up at the to be positioned of texture image by the scab pattern image copy preserved, the scab starting point of scab image is the position undetermined in texture image;
The pixel value of pixel value=the get scab image respective pixel of the position covered by scab in scab image;
Be image file by the Image Saving obtained.
Preferably, the painted order of described pixel coloring device is carried out according to the gray-scale value of scab is descending.
Preferably, described manually arranges degree of disease parameter, and calculates the diffuse reflectance of any point on blade with the scab image gray-scale level angle value of preserving.
Preferably, the grey decision-making of the scab image of described preservation is planned as the value of 0-1 when being loaded into tinter.
Preferably, if scab distribution image is g at the pixel value of this point, artificial setting scab diffuse reflectance is M, the diffuse reflectance of this point of blade surface is N, artificial setting degree of disease parameter v, scab significance parameter s, s be more than or equal to 1 real number, for the diffuse reflectance of any point on blade, use and calculate.
A kind of scab pattern outline interactive rendering device, this device comprises with lower module:
Interactive drawing generates scab profile module, and this module is selected scab diffusion starting point in contoured interior interactive mode and arranged pixel value;
Scab Interactive Design module, this module is loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position;
Scab rendering module, this module uses pixel coloring device, utilizes scab distribution image to carry out scab and plays up painted.
(3) beneficial effect
The present invention adopts the Interactive Design of plant leaf scab and plays up, and simulates really, solve the problem that prior art can not generate blade surface scab pattern, distribution flexibly to the apparent change of proliferation of germs process Leaf.
Accompanying drawing explanation
Fig. 1 is scab pattern outline interactive rendering intent process flow diagram of the present invention;
Fig. 2 is a kind of scab pattern outline schematic diagram using interactive approach to design of the present invention;
Fig. 3 is a kind of scab distribution schematic diagram using interactive approach to design of the present invention;
Fig. 4 is the procedure chart of a kind of maize diseases dynamic change using the present invention to generate.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described further.Following examples only for illustration of the present invention, but are not used for limiting the scope of the invention.
Scab pattern outline interactive rendering intent process flow diagram as shown in Figure 1, the embodiment of the present invention adopts the method flow shown in this figure to implement.
Specific embodiment
Method is as shown in Figure 1 used to operate.
1, interactive drawing generates scab pattern outline.
The profile of first interactively drafting scab, i.e. hand drawn scab profile, and select scab diffusion starting point pixel at contoured interior interactively, the i.e. starting point of manually selected scab diffusion, the gray-scale value of setting starting point pixel, intensity value ranges is between 0-255, and profile removes gray-scale value and is automatically made 0.
Contoured interior i-th pixel, wherein i=1,2 ... n, n are interior pixels point number, each pixel gray-scale value g ican calculate by following method:
1) the distance d with diffusion starting point pixel is calculated 1;
2) calculate the distance with all point pixels, and therefrom select minimum distance d 2;
3) set the gray-scale value of the starting point pixel of interactive setup as g 0;
Then g i=255-g 0× d 2/ (d 1+ d 2)
Give color by gray-scale value to scab pixel, namely to profile+inner all pixels are carried out painted, the pixel of non-scab is set to blueness (0,0,255), and preserves into image file, called after scab pattern image, as shown in Figure 2.Repeatedly carry out above each step operation, by all Image Savings, then these images are the scab pattern of design.
2, being loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position.
First in calculator memory, generate a null images Q, and load vane texture image on this image Q, load before the image after blade texture is replaced and walk the null images Q generated, same called after Q.Select scab pattern image, interactive operation is carried out by hand in vane texture image, determine picture position p by hand, this position refers to the position in texture image, by on the position p of scab pattern image copy on null images Q, center by scab pattern image is set to p position, all the other positions use pixel to cover, in this step, by conventional image conversion algorithm, image can be carried out convergent-divergent, select, the operations such as adjustment angle, the pixel value of scab image respective pixel is directly got by the pixel value of the position of scab covering in scab image, pixel as blueness non-in Fig. 2 is the position covered by scab, the pixel of other positions gets 0.Repeatedly carry out aforesaid operations, image Q is saved as image file, is namely formed as scab distribution image, as shown in Figure 3.
3, use pixel coloring device, utilize scab distribution image to carry out scab and play up painted.
The painted order of pixel coloring device is carried out according to the gray-scale value of scab is descending.
It should be noted that scab only affects the diffuse reflectance of blade in this step.For any point pixel of blade surface, if scab distribution image is g at the pixel value of this point.Owing to being gray-scale value, so only representing is a numerical value, preserving with 0 ~ 255 during the scab overlay image of preservation, but when being loaded in pixel coloring device, be automatically normalized to 0-1.
Artificial setting scab diffuse reflectance is M, is RGB triple channel.The diffuse reflectance of this point of blade surface is N, is RGB triple channel, is provided by blade texture.
Artificial setting degree of disease parameter v, span is 0-1, scab significance parameter s, span be more than or equal to 1 real number, in demonstration graph of the present invention, s all gets 1, as shown in Figure 4, then the diffuse reflectance of any point on blade is calculated for being set as follows formula
(1-(g-v) s)*M+(g-v) s*N
After the diffuse reflectance obtaining any point on blade, just can carry out playing up according to the diffuse reflectance of each point the animation effect generating and expect to obtain, as shown in Figure 4.
Above embodiment is only for illustration of the present invention; and be not limitation of the present invention; the those of ordinary skill of relevant technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification, therefore all equivalent technical schemes also belong to protection category of the present invention.

Claims (8)

1. a scab pattern outline interactive rendering intent, is characterized in that, the method includes the steps of:
1) interactive drawing generates scab profile, selects scab diffusion starting point and arrange pixel value in contoured interior interactive mode;
2) being loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position;
3) use pixel coloring device, utilize scab distribution image to carry out scab and play up painted;
Described step 1) in the method that pixel value is set be:
The intensity value ranges of setting scab starting point pixel is 0-255, and scab profile gray-scale value is set to 0;
Calculate each pixel GTG angle value of scab contoured interior;
Give color by gray-scale value to scab pixel, and preserve into image file;
The method of described each pixel GTG angle value of calculating scab contoured interior is:
Calculate the distance of this point and scab starting point pixel;
Calculate the distance of this point and all scab point pixels, and therefrom select minimum distance;
Then the GTG angle value of this point is that is the permission maximal value of scab starting point 255 deducts: the gray-scale value of the scab starting point pixel set be multiplied by this point to scab profile minimum value divided by this point to the distance of scab starting point and this point to the minimum value of scab profile and value.
2. a kind of scab pattern outline interactive rendering intent according to claim 1, it is characterized in that, described step 1) in interactively drafting scab profile and the interactive method selecting scab starting point be that drafting scab profile manual as required also selects scab starting point.
3. a kind of scab pattern outline interactive rendering intent according to claim 1, is characterized in that, described step 2) in be with texture image with reference to the Interactive Design method of carrying out scab position:
Select scab pattern image, manually determine the position undetermined on texture image;
Be set up at the to be positioned of texture image by the scab pattern image copy preserved, the scab starting point of scab image is the position undetermined in texture image;
The pixel value of pixel value=the get scab image respective pixel of the position covered by scab in scab image;
Be image file by the Image Saving obtained.
4. a kind of scab pattern outline interactive rendering intent according to claim 1, is characterized in that, described step 3) in the painted order of pixel coloring device carry out according to the gray-scale value of scab is descending.
5. a kind of scab pattern outline interactive rendering intent according to claim 4, is characterized in that, manually arrange degree of disease parameter, and calculates the diffuse reflectance of any point on blade with the scab image gray-scale level angle value of preserving.
6. a kind of scab pattern outline interactive rendering intent according to claim 5, is characterized in that, the grey decision-making of the scab image of preservation is planned as the value of 0-1 when being loaded into tinter.
7. a kind of scab pattern outline interactive rendering intent according to claim 6, is characterized in that,
If scab distribution image is g at the pixel value of this point, artificial setting scab diffuse reflectance is M, the diffuse reflectance of this point of blade surface is N, artificial setting degree of disease parameter v, scab significance parameter s, s be more than or equal to 1 real number, for the diffuse reflectance of any point on blade, setting blade diffuse reflectance (1-(g-v) s) × M+ (g-v) s× N formula, and carry out calculating blade any point diffuse reflectance according to formula.
8. a scab pattern outline interactive rendering device, is characterized in that, this device comprises with lower module:
1) interactive drawing scab profile module, this module is selected scab diffusion starting point in contoured interior interactive mode and is arranged pixel value;
The described pixel value that arranges is specially:
The intensity value ranges of setting scab starting point pixel is 0-255, and scab profile gray-scale value is set to 0;
Calculate each pixel GTG angle value of scab contoured interior;
Give color by gray-scale value to scab pixel, and preserve into image file;
Wherein, each pixel GTG angle value of described calculating scab contoured interior is specially:
Calculate the distance of this point and scab starting point pixel;
Calculate the distance of this point and all scab point pixels, and therefrom select minimum distance;
Then the GTG angle value of this point be permission maximal value i.e. 255 gray-scale values deducting the scab starting point pixel set of scab starting point be multiplied by this point to scab profile minimum value divided by this point to the distance of scab starting point and this point to the minimum value of scab profile and value;
2) scab Interactive Design module, this module is loaded into vane texture image, take texture image as the Interactive Design with reference to carrying out scab position;
3) scab rendering module, this module uses pixel coloring device, utilizes scab distribution image to carry out scab and plays up.
CN201310294026.7A 2013-07-12 2013-07-12 A kind of scab pattern outline interactive rendering intent and device Active CN103400410B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310294026.7A CN103400410B (en) 2013-07-12 2013-07-12 A kind of scab pattern outline interactive rendering intent and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310294026.7A CN103400410B (en) 2013-07-12 2013-07-12 A kind of scab pattern outline interactive rendering intent and device

Publications (2)

Publication Number Publication Date
CN103400410A CN103400410A (en) 2013-11-20
CN103400410B true CN103400410B (en) 2016-04-27

Family

ID=49564021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310294026.7A Active CN103400410B (en) 2013-07-12 2013-07-12 A kind of scab pattern outline interactive rendering intent and device

Country Status (1)

Country Link
CN (1) CN103400410B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778686B (en) * 2015-03-23 2017-09-22 无锡中科智能农业发展有限责任公司 A kind of tissue culture method for early warning monitored based on scab

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867325B (en) * 2012-06-29 2015-02-11 北京农业信息技术研究中心 Plant leaf scab rendering method

Also Published As

Publication number Publication date
CN103400410A (en) 2013-11-20

Similar Documents

Publication Publication Date Title
CN108564646A (en) Rendering intent and device, storage medium, the electronic device of object
CN108074274A (en) BIM model real-time rendering method and devices based on browser
CN109448089A (en) A kind of rendering method and device
CN107358643A (en) Image processing method, device, electronic equipment and storage medium
CN106056658A (en) Virtual object rendering method and virtual object rendering device
CN110443877B (en) Model rendering method, device, terminal equipment and storage medium
CN106898040A (en) Virtual resource object rendering intent and device
CN112053423B (en) Model rendering method and device, storage medium and computer equipment
CN111462293B (en) Special effect processing method, device, equipment and storage medium for three-dimensional character model
CN110115841B (en) Rendering method and device for vegetation object in game scene
EP3546036B1 (en) Composing an image
CN104077802A (en) Method for improving displaying effect of real-time simulation image in virtual scene
KR102173546B1 (en) Apparatus and method of rendering game objects
CN103337093A (en) Method for realizing three-dimensional machine room real-time temperature field effect based on Unity3D shader
CN114119818A (en) Rendering method, device and equipment of scene model
CN113822981B (en) Image rendering method and device, electronic equipment and storage medium
CN103400410B (en) A kind of scab pattern outline interactive rendering intent and device
CN109598672A (en) A kind of map road rendering method and device
CN108230430A (en) The processing method and processing device of cloud layer shade figure
CN102074042B (en) Pattern generation system capable of utilizing everyday objects to generate rich pattern effect and method thereof
CN102800121B (en) Method for interactively editing virtual individuals in virtual crowd scene
KR101743516B1 (en) Digital leaf authoring apparatus and method
CN104091025B (en) Smoking effect reality sense simulation method
CN115888103A (en) Game display control method, device, computer equipment and medium
CN112604278B (en) Method for simulating global illumination on intelligent equipment based on game

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant