CN103903247A - Image rendering method and system - Google Patents
Image rendering method and system Download PDFInfo
- Publication number
- CN103903247A CN103903247A CN201210576176.2A CN201210576176A CN103903247A CN 103903247 A CN103903247 A CN 103903247A CN 201210576176 A CN201210576176 A CN 201210576176A CN 103903247 A CN103903247 A CN 103903247A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- matrix data
- foreground
- monochrome
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
The invention discloses an image rendering method. The method comprises steps of segmenting a multicolor image into a plurality of monochrome images, setting foreground color for each monochrome image, acquiring pixel dot matrix data of the monochrome image, and rendering the corresponding foreground color according to the pixel dot matrix data. The invention also discloses an image rendering system, which comprises a segmenting unit, an image pixel dot matrix data acquisition unit, an initial coordinate setting unit, a foreground color setting unit and a traversal drawing unit. According to the scheme of the invention, simple pixel dot matrix data are adopted, rendering of a complicated image can be realized via simple combination, the memory is saved, the rendering efficiency is improved, and the method can be applied to an embedded system.
Description
Technical field
The present invention relates to image processing field, relate to a kind of image drawing method and system, especially a kind of method for drafting of the complicated image that is applicable to embedded system and system.
Background technology
Image Rendering is a technology conventional in embedded system development.(referring to China Coal Economic College's journal, 02 phase of nineteen ninety-five) provides a kind of Image Rendering of realizing with C language " to realize the research of image drawing method with C language ".For monochromatic simple image, be often converted into pixel-matrix data, foreground and background colour are set respectively before drafting, realize in the mode of described point one by one.This method programming is simple, but can only draw monochromatic simple image.
For complicated multicolor image, the color of for example image is more than two kinds, if need correct drafting, a kind of mode is, each pixel is represented with a byte or a word, but this mode need to take more storage space in the time of storage, space availability ratio can reduce greatly.If now still simply utilize traditional drafting mode, conventionally can not obtain correct result.
Be explained as example to expect to draw out comparatively complicated trichromatic diagram case.Fig. 1 shows " danger indicates " in a kind of common traffic warning sign, and it has black triangle frame, has a black exclamation mark in triangle, fills yellow in triangle, and the color outside triangle is grey.
Traditional simple dichromatism image drawing method is as follows: first image is converted to pixel-matrix data, each pixel represents with a bit, and 0 represents background colour, and 1 represents foreground, then point-by-point mapping.To draw Fig. 1 as example, because Fig. 1 has black, yellow and three kinds of colors of ash, if desired adopt above-mentioned traditional drafting mode, need Fig. 1 to cut apart so that the every width image after cutting apart only has two kinds of colors.Fig. 2 and Fig. 3 show respectively two of Fig. 1 kinds of partitioning schemes and synthetic effect figure.Fig. 2 (a) is triangle pattern, and its foreground is yellow, is shaped as triangle, and background colour is grey (in figure, representing grey with oblique line, yellow to represent without oblique line); Fig. 2 (b) is black triangle frame, inside has exclamation mark, and its foreground is black, and background colour is grey.If now first draw Fig. 2 (a), then draw Fig. 2 (b), now can not obtain Fig. 1, but obtain Fig. 2 (b).So the second dividing method shows as Fig. 3, Fig. 3 (a) is identical with Fig. 2 (a), is triangle pattern, and its foreground is yellow, background colour is that grey is (in figure, represent grey with oblique line, yellow to represent without oblique line), Fig. 3 (b) is black triangle frame, inside there is exclamation mark, its foreground is black, and background colour is yellow, and that after two figure stacks, obtain is still Fig. 3 (b).Hence one can see that, and in traditional drafting mode, above-mentioned two kinds of dividing methods all cannot correctly be drawn out Fig. 1.
Therefore, need badly tradition drafting mode is improved correctly to draw out complicated image.
Summary of the invention
The object of the present invention is to provide a kind of method and system that can draw simply complicated image.
For reaching this object, the invention discloses a kind of image drawing method, comprising:
Step 2, for each width monochrome image, arranges foreground, and obtains the pixel-matrix data of this monochrome image, and only draws corresponding foreground according to described pixel-matrix data.
Wherein, described step 2 is specially:
Step 21, judges whether processed all monochrome images, if so, finishes; Otherwise, execution step 22;
Step 22, obtains monochrome image pixel-matrix data, and the width of pixel-matrix data and height;
Step 23, arranges foreground;
Step 24, arranges initial coordinate position;
Step 25, traversal pixel-matrix data, if 1, the color of drawing this point is foreground, otherwise does not change, and forwards step 21 to.
Wherein, described traversal is specially, and two stage cycle is set, and take described initial coordinate position as starting point, changes horizontal ordinate and ordinate, detects one by one pixel-matrix data corresponding to current coordinate points.
The present invention also provides a kind of image drawing system, comprising:
Cutting unit, for being divided into several monochrome images by a multicolor image;
Image pixel dot array data acquiring unit, for obtain monochrome image pixel-matrix data from described cutting unit, and the width of described pixel-matrix data and height;
Initial coordinate setting unit, for arranging initial coordinate position;
Foreground setting unit, for arranging foreground;
Traversal drawing unit, travels through for the pixel-matrix column data obtaining according to described image pixel dot array data acquiring unit, if 1, the color of drawing this point is foreground, otherwise does not change.
Wherein, described traversal is specially, and two stage cycle is set, and take described initial coordinate position as starting point, changes horizontal ordinate and ordinate, detects one by one pixel-matrix data corresponding to current coordinate points.
In the system that image drawing method described in the invention can be applicable to draw by pixel-matrix data arbitrarily.By this method for drafting, in the time that multicolor image can be divided into monochrome image, utilize simple pixel-matrix data through simple combination, by only drawing the mode of foreground, can realize the drafting of complicated image, save internal memory, promote drafting efficiency, be suitable for being applied to embedded system.
Accompanying drawing explanation
Fig. 1 shows " danger indicates " in a kind of common traffic warning sign.
Fig. 2 shows a kind of partitioning scheme and the synthetic effect figure to Fig. 1.
Fig. 3 shows another kind of partitioning scheme and the synthetic effect figure to Fig. 1.
Fig. 4 shows according to the process flow diagram of a kind of image drawing method of the embodiment of the present invention.
Fig. 5 shows the process flow diagram of the method for the monochrome image after cutting apart being drawn according to the embodiment of the present invention.
Fig. 6 shows according to the structural drawing of a kind of image drawing system of the embodiment of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.Be understandable that, specific embodiment described herein is only for explaining the present invention, but not limitation of the invention.It also should be noted that, for convenience of description, in accompanying drawing, only show part related to the present invention but not entire infrastructure.
The present invention is concerned about, in the time adopting stack to draw, if the monochrome image after each is cut apart is drawn foreground and background colour, the current image of once drawing with after the image once drawn exist when overlapping, often can not obtain correct result, therefore, this method is utilized the pixel-matrix data of formed objects in the time drawing, and in the time that pixel is 1, it is foreground that this pixel is set, if 0, do not do to change.
Fig. 4 shows according to the process flow diagram of a kind of image drawing method of the embodiment of the present invention, is applicable to embedded system, is particularly suited for the drafting of complicated image.As shown in Figure 4, described method comprises:
To draw Fig. 1 as example, adopt the partitioning scheme shown in Fig. 2 equally, Fig. 2 (a) is triangle pattern, and its foreground is yellow, and background colour is grey; Fig. 2 (b) is black triangle frame, inside has exclamation mark, and its foreground is black, and background colour is grey.First draw Fig. 2 (a), and then draw Fig. 2 (b) thereon, when drafting, only change the pixel with foreground, obtain Fig. 1, successfully drawn image, and the pixel in drawing process with background colour no longer repaints, greatly improve drawing efficiency.
Fig. 5 shows the process flow diagram that according to the embodiment of the present invention, the monochrome image after cutting apart is carried out method for drafting.As shown in Figure 5, comprising:
Fig. 6 shows according to the structural drawing of a kind of image drawing system of the embodiment of the present invention.As shown in Figure 6, described system comprises:
Image pixel dot array data acquiring unit 620, for obtain monochrome image pixel-matrix data from cutting unit 610, and the width of pixel-matrix data and height;
Initial coordinate setting unit 630, for arranging initial coordinate position;
In the system that image drawing method described in the invention can be applicable to draw by pixel-matrix data arbitrarily.Draw by this method, can be divided at image under the prerequisite of monochrome image, utilize simple pixel-matrix data can realize the drafting of complicated image through simple combination.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that multiple calculation elements form, alternatively, they can realize with the executable program code of computer installation, thereby they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or the multiple modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to the combination of any specific hardware and software.
Note, above are only preferred embodiment of the present invention and institute's application technology principle.Skilled person in the art will appreciate that and the invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious variations, readjust and substitute and can not depart from protection scope of the present invention.Therefore, although the present invention is described in further detail by above embodiment, the present invention is not limited only to above embodiment, in the situation that not departing from the present invention's design, can also comprise more other equivalent embodiment, and scope of the present invention is determined by appended claim scope.
Claims (5)
1. an image drawing method, comprising:
Step 1, is divided into several monochrome images by a multicolor image;
Step 2, for each width monochrome image, arranges foreground, and obtains the pixel-matrix data of this monochrome image, and only draws corresponding foreground according to described pixel-matrix data.
2. the method as shown in claim 1, described step 2 is specially:
Step 21, judges whether processed all monochrome images, if so, finishes; Otherwise, execution step 22;
Step 22, obtains monochrome image pixel-matrix data, and the width of described pixel-matrix data and height;
Step 23, arranges foreground;
Step 24, arranges initial coordinate position;
Step 25, travels through described pixel-matrix data, if 1, the color of drawing this point is described foreground, otherwise does not change, and forwards step 21 to.
3. method as claimed in claim 2, described traversal is specially, and two stage cycle is set, and take described initial coordinate position as starting point, changes horizontal ordinate and ordinate, detects one by one pixel-matrix data corresponding to current coordinate points.
4. an image drawing system, comprising:
Cutting unit, for being divided into several monochrome images by a multicolor image;
Image pixel dot array data acquiring unit, for obtain monochrome image pixel-matrix data from described cutting unit, and the width of described pixel-matrix data and height;
Initial coordinate setting unit, for arranging initial coordinate position;
Foreground setting unit, for arranging foreground;
Traversal drawing unit, travels through for the pixel-matrix column data obtaining according to described image pixel dot array data acquiring unit, if 1, the color of drawing this point is foreground, otherwise does not change.
5. system as claimed in claim 4, described traversal is specially, and two stage cycle is set, and take described initial coordinate position as starting point, changes horizontal ordinate and ordinate, detects one by one pixel-matrix data corresponding to current coordinate points.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210576176.2A CN103903247A (en) | 2012-12-26 | 2012-12-26 | Image rendering method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210576176.2A CN103903247A (en) | 2012-12-26 | 2012-12-26 | Image rendering method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103903247A true CN103903247A (en) | 2014-07-02 |
Family
ID=50994554
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210576176.2A Pending CN103903247A (en) | 2012-12-26 | 2012-12-26 | Image rendering method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103903247A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108711179A (en) * | 2018-05-21 | 2018-10-26 | 张宗良 | Drawing restoring method and system |
CN109242896A (en) * | 2018-08-10 | 2019-01-18 | 潍坊科技学院 | A kind of image drawing method and system based on VR technology |
WO2023077650A1 (en) * | 2021-11-02 | 2023-05-11 | 北京鸿合爱学教育科技有限公司 | Three-color image generation method and related device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064800A (en) * | 2006-04-29 | 2007-10-31 | 东杰电气(上海)有限公司 | Method for displaying special sign on screen |
US20080068383A1 (en) * | 2006-09-20 | 2008-03-20 | Adobe Systems Incorporated | Rendering and encoding glyphs |
CN101699447A (en) * | 2009-10-23 | 2010-04-28 | 山东大学 | Pattern optimization display method in stamp pattern design system |
US20120127198A1 (en) * | 2010-11-22 | 2012-05-24 | Microsoft Corporation | Selection of foreground characteristics based on background |
CN102800091A (en) * | 2012-07-10 | 2012-11-28 | 深圳市捷顺科技实业股份有限公司 | Moving target segmentation method, device and system |
CN102834849A (en) * | 2011-03-31 | 2012-12-19 | 松下电器产业株式会社 | Image drawing device for drawing stereoscopic image, image drawing method, and image drawing program |
-
2012
- 2012-12-26 CN CN201210576176.2A patent/CN103903247A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064800A (en) * | 2006-04-29 | 2007-10-31 | 东杰电气(上海)有限公司 | Method for displaying special sign on screen |
US20080068383A1 (en) * | 2006-09-20 | 2008-03-20 | Adobe Systems Incorporated | Rendering and encoding glyphs |
CN101699447A (en) * | 2009-10-23 | 2010-04-28 | 山东大学 | Pattern optimization display method in stamp pattern design system |
US20120127198A1 (en) * | 2010-11-22 | 2012-05-24 | Microsoft Corporation | Selection of foreground characteristics based on background |
CN102834849A (en) * | 2011-03-31 | 2012-12-19 | 松下电器产业株式会社 | Image drawing device for drawing stereoscopic image, image drawing method, and image drawing program |
CN102800091A (en) * | 2012-07-10 | 2012-11-28 | 深圳市捷顺科技实业股份有限公司 | Moving target segmentation method, device and system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108711179A (en) * | 2018-05-21 | 2018-10-26 | 张宗良 | Drawing restoring method and system |
CN108711179B (en) * | 2018-05-21 | 2022-07-19 | 杭州多技教育科技有限公司 | Drawing reduction method and system |
CN109242896A (en) * | 2018-08-10 | 2019-01-18 | 潍坊科技学院 | A kind of image drawing method and system based on VR technology |
WO2023077650A1 (en) * | 2021-11-02 | 2023-05-11 | 北京鸿合爱学教育科技有限公司 | Three-color image generation method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9760972B2 (en) | Rendering method and associated device | |
CN102122502B (en) | Method and related device for displaying three-dimensional (3D) font | |
US20150206345A1 (en) | Apparatus, system, and method for generating three-dimensional models of objects | |
CN104966092B (en) | A kind of image processing method and device | |
CN105718420A (en) | Data-Processing Apparatus And Operation Method Thereof | |
US20150070714A1 (en) | Image forming device, printing method, and computer-readable recording medium | |
CN103903247A (en) | Image rendering method and system | |
CN112651881A (en) | Image synthesis method, apparatus, device, storage medium, and program product | |
US20100158393A1 (en) | Image comparison system and method | |
WO2011102942A2 (en) | Method and apparatus for engaging functionality with a color tag | |
JP6275719B2 (en) | A method for sampling image colors of video sequences and its application to color clustering | |
JP5254250B2 (en) | Method and system for generating boundaries in the process of rasterizing vector graphics, and method for manufacturing the system | |
CN108460385A (en) | A kind of Document Segmentation method and apparatus | |
CN109493331B (en) | Method for rapidly acquiring overlapping area of two images based on parallel computing algorithm | |
US10079959B2 (en) | Creating image data for a tile on an image | |
KR102482874B1 (en) | Apparatus and Method of rendering | |
CN104240213A (en) | Display method and device | |
US10650488B2 (en) | Apparatus, method, and computer program code for producing composite image | |
EP3301908A1 (en) | Numerical image conversion method and device, and storage medium and device | |
US20160005200A1 (en) | Image processing device, image processing method, and image processing program | |
JP2021157404A (en) | Learning data generation method, learning data generation device, and program | |
US20210056723A1 (en) | Image processing device, image processing method, and monitoring system | |
KR20120052733A (en) | Method and apparatus for translating memory access address | |
US11321832B2 (en) | Image analysis device | |
KR20180056268A (en) | Image processing apparatus and controlling method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140702 |
|
RJ01 | Rejection of invention patent application after publication |