CN103400410A - Scab pattern outline interactive type rendering method and device - Google Patents

Scab pattern outline interactive type rendering method and device Download PDF

Info

Publication number
CN103400410A
CN103400410A CN2013102940267A CN201310294026A CN103400410A CN 103400410 A CN103400410 A CN 103400410A CN 2013102940267 A CN2013102940267 A CN 2013102940267A CN 201310294026 A CN201310294026 A CN 201310294026A CN 103400410 A CN103400410 A CN 103400410A
Authority
CN
China
Prior art keywords
scab
interactive
image
pixel
value
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
CN2013102940267A
Other languages
Chinese (zh)
Other versions
CN103400410B (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

Images

Abstract

The invention discloses a scab pattern outline interactive type rendering method, which comprises the following steps of interactively drawing an outline of a scab, interactively selecting a scab diffusion starting point in the outline, and setting a pixel value; loading a vane texture image, and interactively designing a scab position by taking the texture image as reference; and using a pixel shader, and utilizing a scab distribution image to carry out scab rendering. Meanwhile, the invention discloses a scab pattern outline interactive type rendering device, which comprises the following modules: an interactive scab outline drawing module, a scab interactive design module, and a scab rendering module, wherein the interactive scab outline drawing module interactively selects the scab diffusion starting point in the outline, and setting the pixel value; the scab interactive design module loads the vane texture image and interactively designs the scab position by taking the texture image as reference; and the scab rendering module uses the pixel shader to carry out scab rendering by utilizing the scab distribution image.

Description

The interactive rendering intent of a kind of scab form profile and device
Technical field
The present invention relates to the field of computer graphics, real-time Realistic Rendering, the combination of plant behavior simulation, be specifically related to a kind of plant leaf blade scab rendering intent and device.
Background technology
Effective Pictures By A Computer refers to the appliance computer graphics software, generally comprises two-dimentional software, three-dimensional software and post-production software etc.,, with ready-made object, role etc.,, by renderer, plays up in computing machine, reaches us and wants the effect of seeing.
In recent years, the development along with the IT application to agriculture technology, utilized three-dimensional animation to become a kind of important means for the peasant shows rudimentary knowledge, FAQs and professional technique method in agricultural production.As everyone knows, disease and pest is phenomenon common in agricultural production, yet not have at present generating process that method preferably can simulate disease and pest truly with and affect the apparent situation of change of lower blade, so under description disease and pest condition, the apparent variation of plant leaf blade becomes the application that agriculture field is needed badly.
Through development for many years, the research that blade is played up aspect makes some progress.As the method based on the Bidirectional surface spread function and based on the method for Bidirectional surface reflective function+Bidirectional surface projection functions.Yet in present research, the research major part of the relevant apparent Realistic Rendering of blade concentrates on the apparent texture modeling under normal condition, and mostly is the blade surface simulation of fixed time.But the apparent meeting of plant leaf blade produces significant the variation under the disease and pest factor, there will be variation or the cavity of color at blade surface, and whole process is a dynamic process simultaneously, and these apparent characteristics all existing method are difficult to simulate.Patent of invention [201210227153.0] is identical with our purpose, but the scab form that this patent can be processed, distribution must be followed the morphological feature of cell texture, and it can only be to be uniformly distributed that scab distributes, but the form of real world disease and distribution situation are diversified, and patent of invention [201210227153.0] can not well be simulated.
Summary of the invention
The technical matters that (one) will solve
The object of the invention is to overcome prior art and can not generate flexibly the shortcoming of blade surface scab form, distribution.
(2) technical scheme
The present invention uses following technical scheme:
The interactive rendering intent of a kind of scab form profile comprises following steps:
Interactive drawing generates the scab profile, at the inner interactive scab of selecting of profile, spreads starting point and pixel value is set;
Be written into the blade texture image, take texture image as the Interactive Design with reference to carrying out the scab position;
Use pixel coloring device, utilize the scab distributed image to carry out the scab cloring.
Preferably, described interactively drafting scab profile and the interactive method of scab starting point of selecting be, as required manual drafting scab profile and select the scab starting point.
Preferably, the described method that pixel value is set is:
The gray-scale value scope of setting scab starting point pixel is 0-255, and scab profile gray-scale value is made as 0;
Calculate inner each pixel shade of gray value of scab profile;
Give color by gray-scale value to the scab pixel, and preserve into image file.
Preferably, the method for inner each pixel shade of gray value of described calculating scab profile 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;
The shade of gray 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 of having set multiply by this point to the minimum value of scab profile divided by the minimum value of this point to the distance of scab starting point and this point to the scab profile and value.
Preferably, described take texture image as the Interactive Design method with reference to carrying out the scab position as:
Select scab aspect graph picture, manually determine the position undetermined on texture image;
The scab form image copy of having preserved is set up at the to be positioned of texture image, and the scab starting point of scab image is the position undetermined in texture image;
The pixel value of the position that is covered by scab in the scab image=the get pixel value of scab image respective pixel;
Be image file with the Image Saving that obtains.
Preferably, the painted order of described pixel coloring device is carried out according to the gray-scale value of scab is descending.
Preferably, the described degree of disease parameter that manually arranges, and with the scab image gray-scale level degree value of preserving, calculate the diffuse reflectance of any point on blade.
Preferably, the GTG value of the scab image of described preservation is planned as the value of 0-1 when being written into tinter.
Preferably, if the scab distributed 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, the artificial degree of disease parameter v that sets, scab significance parameter s, s is the real number more than or equal to 1,, for the diffuse reflectance of any point on blade, use and calculate.
The interactive rendering device of a kind of scab form profile, this device comprises with lower module:
Interactive drawing generates scab profile module, and this module spreads starting point and pixel value is set at the inner interactive scab of selecting of profile;
Scab Interactive Design module, this module is written into the blade texture image, take texture image as the Interactive Design with reference to carrying out the scab position;
The scab rendering module, this module is used pixel coloring device, utilizes the scab distributed image to carry out the scab cloring.
(3) beneficial effect
Interactive Design that the present invention adopts the plant leaf blade scab with play up, the apparent variation of proliferation of germs process Leaf is simulated really, solved prior art and can not generate flexibly the problem of blade surface scab form, distribution.
Description of drawings
Fig. 1 is the interactive rendering intent process flow diagram of scab form profile of the present invention;
Fig. 2 is a kind of scab form profile schematic diagram that uses the interactive approach design of the present invention;
Fig. 3 is a kind of scab distribution schematic diagram that uses the interactive approach design of the present invention;
Fig. 4 is the procedure chart that uses a kind of maize diseases dynamic change of the present invention's generation.
Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described further.Following examples only are used for explanation the present invention, but are not used for limiting the scope of the invention.
The interactive rendering intent process flow diagram of scab form profile as shown in Figure 1, the embodiment of the present invention adopts the method flow shown in this figure to implement.
Specific embodiment
Use method as shown in Figure 1 to operate.
1, interactive drawing generates scab form profile.
The profile of at first interactively drafting scab, it is hand drawn scab profile, and at the inner interactively of profile, select scab diffusion starting point pixel, namely manually select the starting point of scab diffusion, set the gray-scale value of starting point pixel, the gray-scale value scope is between 0-255, and profile is automatically made 0 except gray-scale value.
Inner i the pixel of profile, i=1 wherein, 2 ... n, n are interior pixels point number, each pixel gray-scale value g iCan calculate by following method:
1) calculate with diffusion starting point pixel apart from d 1
2) calculate distance with all point pixels, and therefrom select minimum apart from d 2
3) gray-scale value of establishing the starting point pixel of interactive setup is g 0
G i=255-g 0* d 2/ (d 1+ d 2)
Give color by gray-scale value to the scab pixel, namely all pixels of profile+inside are carried out paintedly, the pixel of non-scab is made as blueness (0,0,255), and preserves into image file, called after scab aspect graph picture, as shown in Figure 2.Repeatedly carry out above each step operation, with all Image Savings, these images are the scab form of design.
2, be written into the blade texture image, take texture image as the Interactive Design with reference to carrying out the scab position.
At first generate a null images Q in calculator memory, and load the blade texture image on this image Q, the null images Q that before the image after loading blade texture is replaced, the step generates, called after Q equally.select scab aspect graph picture, carry out by hand interactive operation on the blade texture image, manual definite picture position p, this position refers to the position in texture image, with scab form image copy on the position p on null images Q, the center that is about to scab aspect graph picture is made as the p position, all the other positions use pixel to cover, in this step, can image be carried out convergent-divergent by image conversion algorithm commonly used, select, adjust the operations such as angle, pixel value by the position of scab covering in the scab image is directly got the pixel value of scab image respective pixel, the position of pixel for by scab, being covered as non-blueness in Fig. 2, the pixel of other positions gets 0.Repeatedly carry out aforesaid operations, image Q is saved as image file, namely form the scab distributed image, as shown in Figure 3.
3, use pixel coloring device, utilize the scab distributed image to carry out the scab cloring.
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 in this step scab only affects the diffuse reflectance of blade.For any point pixel of blade surface, establishing the scab distributed image is g at the pixel value of this point.Owing to being gray-scale value,, so only expression is a numerical value, preserve with 0~255 during the scab overlay image of preservation, in the time of still in being written into pixel coloring device, automatically be normalized to 0-1.
Artificial setting scab diffuse reflectance is M, is the RGB triple channel.The diffuse reflectance of this point of blade surface is N, is the RGB triple channel, by the blade texture, provides.
The artificial degree of disease parameter v that sets, span is 0-1, scab significance parameter s, span is the real number more than or equal to 1, and in demonstration graph of the present invention, s all gets 1, as shown in Figure 4, for the diffuse reflectance of any point on blade, for being set as follows formula, calculate
(1-(g-v) s)*M+(g-v) s*N
After the diffuse reflectance that obtains any point on blade, just can play up and generate the animation effect that expectation obtains according to the diffuse reflectance of each point, as shown in Figure 4.
Above embodiment only is used for explanation the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification, so all technical schemes that are equal to also belong to protection category of the present invention.

Claims (10)

1. the interactive rendering intent of scab form profile, is characterized in that, the method includes the steps of:
1) interactive drawing generates the scab profile, at the inner interactive scab of selecting of profile, spreads starting point and pixel value is set;
2) be written into the blade texture image, take texture image as the Interactive Design with reference to carrying out the scab position;
3) use pixel coloring device, utilize the scab distributed image to carry out the scab cloring.
2. the interactive rendering intent of a kind of scab form profile according to claim 1, it is characterized in that, interactively drafting scab profile in described step 1) and the interactive method of scab starting point of selecting be, as required manual drafting scab profile and select the scab starting point.
3. the interactive rendering intent of a kind of scab form profile according to claim 1, is characterized in that, the method that pixel value is set in described step 1) is:
The gray-scale value scope of setting scab starting point pixel is 0-255, and scab profile gray-scale value is made as 0;
Calculate inner each pixel shade of gray value of scab profile;
Give color by gray-scale value to the scab pixel, and preserve into image file.
4. the interactive rendering intent of a kind of scab form profile according to claim 3, is characterized in that, the method for inner each pixel shade of gray value of described calculating scab profile 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;
The shade of gray 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 of having set multiply by this point to the minimum value of scab profile divided by the minimum value of this point to the distance of scab starting point and this point to the scab profile and value.
5. the interactive rendering intent of a kind of scab form profile according to claim 1, is characterized in that described step 2) in take texture image as the Interactive Design method with reference to carrying out the scab position as:
Select scab aspect graph picture, manually determine the position undetermined on texture image;
The scab form image copy of having preserved is set up at the to be positioned of texture image, and the scab starting point of scab image is the position undetermined in texture image;
The pixel value of the position that is covered by scab in the scab image=the get pixel value of scab image respective pixel;
Be image file with the Image Saving that obtains.
6. the interactive rendering intent of a kind of scab form profile according to claim 1, is characterized in that, the painted order of the pixel coloring device in described step 3) is carried out according to the gray-scale value of scab is descending.
7. the interactive rendering intent of a kind of scab form profile according to claim 6, is characterized in that, the degree of disease parameter manually is set, and with the scab image gray-scale level degree value of preserving, calculate the diffuse reflectance of any point on blade.
8. the interactive rendering intent of a kind of scab form profile according to claim 7, is characterized in that, the GTG value of the scab image of preservation is planned as the value of 0-1 when being written into tinter.
9. the interactive rendering intent of a kind of scab form profile according to claim 8, is characterized in that,
If the scab distributed 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, the artificial degree of disease parameter v that sets, scab significance parameter s, s is the real number more than or equal to 1,, for the diffuse reflectance of any point on blade, sets blade diffuse reflectance (1-(g-v) s) * M+(g-v) s* N formula, and according to formula, calculate blade any point diffuse reflectance.
10. the interactive rendering device of scab form profile, is characterized in that, this device comprises with lower module:
1) interactive drawing scab profile module, this module spreads starting point and pixel value is set at the inner interactive scab of selecting of profile;
2) scab Interactive Design module, this module is written into the blade texture image, take texture image as the Interactive Design with reference to carrying out the scab position;
3) scab rendering module, this module is used pixel coloring device, utilizes the scab distributed 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 true CN103400410A (en) 2013-11-20
CN103400410B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778686A (en) * 2015-03-23 2015-07-15 无锡中科智能农业发展有限责任公司 Tissue culture prewarning method and system based on scab monitoring

Citations (1)

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

Patent Citations (1)

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

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
D. J. ORMROD ET AL: "Effect of fungicides on Ramularia leaf and stalk spot of rhubarb in coastal British Columbia", 《CANADIAN PLANT DISEASE SURVEY》, vol. 65, no. 2, 31 December 1985 (1985-12-31) *
ISMAEL GARCÍA ET AL: "Multi-layered indirect texturing for tree rendering", 《EUROGRAPHICS WORKSHOP ON NATURAL PHENOMENA》, 31 December 2007 (2007-12-31) *
苗腾 等: "基于数据约束的植物叶柄三维形态交互建模方法", 《农业机械学报》, vol. 43, no. 2, 29 February 2012 (2012-02-29) *
苗腾 等: "基于数据约束的黄瓜叶片参数化建模", 《农业机械学报》, vol. 42, no. 1, 31 January 2011 (2011-01-31) *

Cited By (2)

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

Also Published As

Publication number Publication date
CN103400410B (en) 2016-04-27

Similar Documents

Publication Publication Date Title
CN111009026B (en) Object rendering method and device, storage medium and electronic device
CN112316420B (en) Model rendering method, device, equipment and storage medium
CN108074274A (en) BIM model real-time rendering method and devices based on browser
CN108986200B (en) Preprocessing method and system for graphic rendering
CN112215934A (en) Rendering method and device of game model, storage medium and electronic device
US11276227B2 (en) Object rendering method and apparatus, storage medium, and electronic device using a simulated pre-integration map
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
CN106898040A (en) Virtual resource object rendering intent and device
CN113822981B (en) Image rendering method and device, electronic equipment and storage medium
CN114119818A (en) Rendering method, device and equipment of scene model
CN103400410B (en) A kind of scab pattern outline interactive rendering intent and device
CN109598672A (en) A kind of map road rendering method and device
CN102074042B (en) Pattern generation system capable of utilizing everyday objects to generate rich pattern effect and method thereof
CN116363288A (en) Rendering method and device of target object, storage medium and computer equipment
Calabuig-Barbero et al. Computational model for hyper-realistic image generation using uniform shaders in 3D environments
CN114565709A (en) Data storage management method, object rendering method and device
CN112669437B (en) Role model coloring method, coloring device, equipment and storage medium
Mesquita et al. Synthesis and Validation of Virtual Woodcuts Generated with Reaction-Diffusion
US20210209741A1 (en) Light guide image processing method and apparatus
Liang et al. A native Android application development based on watercolor stylized image
CN115888103A (en) Game display control method, device, computer equipment and medium
CN113836705A (en) Illumination data processing method and device, storage medium and electronic device
Wang Application of traditional cultural elements in modern interior design in the era of artificial intelligence
CN117496040A (en) Coloring method and system for material of blinking dots

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