Image processing device and program

The image processing device optimizes drawing speed by reversing the order of processing opaque and transparent figures, reducing unnecessary pixel synthesis and enhancing efficiency in rendering multiple figures.

JP7732294B2Active Publication Date: 2025-09-02FUJIFILM BUSINESS INNOVATION CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2021147628
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-10
Publication Date
2025-09-02
Estimated Expiration
2041-09-10

AI Technical Summary

Technical Problem

Existing image processing methods struggle to efficiently perform synthesis processes on data with multiple drawing figures arranged from background to foreground, leading to increased pixel processing and reduced rendering speed.

Method used

An image processing device that reverses the order of drawing, first processing opaque figures from foreground to background, determining drawn pixels, and then processing transparent figures with background compositing, thereby reducing unnecessary pixel synthesis.

Benefits of technology

This approach reduces the number of pixels subjected to synthesis, enhancing drawing speed and efficiency, especially when transparent figures are placed behind opaque ones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007732294000001
    Figure 0007732294000001
  • Figure 0007732294000002
    Figure 0007732294000002
  • Figure 0007732294000003
    Figure 0007732294000003
Patent Text Reader

Abstract

To draw drawing data including multiple drawing graphics arranged from background toward foreground more quickly by reducing pixels to be synthesized, when synthesis of the drawing graphics is required, than before reducing the pixels.SOLUTION: A processor receives drawing data including multiple drawing graphics arranged from background toward foreground, and performs drawing as follows: in first drawing processing for sequentially drawing the drawing graphics from the foreground toward the background, the processor draws an opaque drawing graphic, defines pixels on which the opaque drawing graphic has been drawn, as a drawn pixel, omits drawing pixels of a background-required drawing which requires drawing a transparent drawing graphic, and draws pixels other than the drawn pixel in a background color; and in second drawing processing for sequentially drawing the drawing graphics from the background toward the foreground, the processor omits drawing the drawing graphics for the drawn pixel, and draws the pixels of the background-required drawing by synthesis processing of the drawing graphics.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an image processing device and a program. [Background technology]

[0002] When rendering data including a plurality of rendering figures arranged from the background to the foreground, a method is known in which the amount of data written to memory is reduced and rendering is accelerated by first rendering the foreground figures and not rendering pixels that have already been rendered. For example, when the rendering data is data described in a page description language (PDL), one page of rendering data is received in advance, and each of the rendering figures that make up the received rendering data is rendered in order from the foreground to the background, without rendering pixels that have already been rendered, thereby accelerating rendering.

[0003] Incidentally, a compositing process may be performed to achieve translucency or color compositing by compositing the results of previous drawings with the target drawing figure. The compositing process combines the target drawing figure to be drawn with the results of background drawing, so the results of background drawing are required. Therefore, it is not possible to draw the drawing figures in order from the foreground side and not draw pixels that have already been drawn. For example, it is necessary to draw the drawing figures in order from the background side.

[0004] As a technique for addressing this issue, Patent Document 1 describes a device that sets a rectangular area where compositing processing is performed, and performs compositing processing only on pixels within that rectangular area, thereby speeding up drawing.

[0005] Patent document 2 describes a device that converts a compositing process into an opacity process by compositing a drawing figure and a background in advance when the drawing figure to be composited is placed directly on top of a background. [Prior art documents] [Patent documents]

[0006] [Patent Document 1] Patent No. 5028373 [Patent Document 2] Patent No. 6786415 Summary of the Invention [Problem to be solved by the invention]

[0007] To provide an object of the present invention, when drawing data including a plurality of drawing figures arranged from the background side to the foreground side, and when a synthesis process of the drawing figures is required, to reduce the number of pixels to be subjected to the synthesis process and make the drawing faster than before the reduction of the pixels. [Means for solving the problem]

[0008] The invention according to claim 1 includes a processor, the processor receiving drawing data including a plurality of drawing figures arranged from a background side to a foreground side, and a first drawing process for drawing each drawing figure in order from the foreground side to the background side. Execute the first drawing process In the above, an opaque drawing figure is drawn, and a pixel on which the opaque drawing figure is drawn is determined as a drawn pixel; Pixels other than the already-rendered pixels Omit the drawing of pixels that require background drawing and need to draw transparent drawing figures, and draw pixels other than the drawn pixels in the background color, After the first drawing process, The second drawing process draws each drawing shape in order from the background to the foreground. and executes the second drawing process. In the above, the drawing of the drawing figure is omitted for the pixels that have already been drawn, The aforementioned The image processing device performs drawing by compositing drawing figures for pixels requiring background drawing.

[0009] The invention according to claim 2 is characterized in that the processor The aforementioned If there are no pixels that require background drawing, after the first drawing process, the background color is drawn on the undrawn pixels, and the second drawing process is omitted. The image processing device according to claim 1.

[0010] The invention according to claim 3 is characterized in that the processor: The aforementioned If there is a pixel that needs background rendering, after the first rendering process and before the composition process in the second rendering process, The aforementioned 3. The image processing device according to claim 2, wherein the background color is drawn on pixels that require background drawing, and after the synthesis process, the background color is drawn on pixels that have not yet been drawn.

[0011] The invention of claim 4 is the image processing device of claim 3, wherein the drawing data is data to be printed on a recording medium, and the processor draws or does not draw background color on undrawn pixels depending on the type of recording medium on which the drawing data is printed.

[0012] In the invention according to claim 5, the processor is configured to: The aforementioned A pixel requiring background drawing is determined as a pixel having already been background drawn, and the opaque drawing figure is determined as a background figure, and thereafter, drawing of the pixel is omitted, and in the second drawing process, for a pixel having already been background drawn, if the drawing figure to be drawn is not a background figure, drawing is omitted, and if the drawing figure to be drawn is a background figure, drawing is performed using the drawing figure to be drawn, and the pixel having already been background drawn is The aforementioned The image processing device according to claim 1 changes the pixels to pixels requiring background drawing, and thereafter performs synthesis processing.

[0013] In the invention according to claim 6, the processor, in the first drawing process, The aforementioned The image processing device according to claim 5, wherein the first detected transparent drawing figure for a pixel requiring background drawing is determined to be the foreground transparent drawing figure, and in the second drawing process, a process of drawing a background figure on pixels that have already been background drawn and a compositing process are performed from the background side to the foreground transparent drawing figure.

[0014] The invention according to claim 7 is a first drawing process in which a computer receives drawing data including a plurality of drawing figures arranged from the background side to the foreground side, and draws each drawing figure in order from the foreground side to the background side. Execute the first drawing processIn the above, an opaque drawing figure is drawn, and a pixel on which the opaque drawing figure is drawn is determined as a drawn pixel; Pixels other than the already-rendered pixels Omits the drawing of pixels that require background drawing, which is necessary to draw transparent drawing figures, and draws pixels other than those that have already been drawn in the background color, After the first drawing process, The second drawing process draws each drawing shape in order from the background to the foreground. and executes the second drawing process. In the above, the drawing of the drawing figure is omitted for the pixels that have already been drawn, The aforementioned This is a program for operating in such a way that pixels requiring background drawing are drawn by compositing drawing figures. [Effects of the Invention]

[0015] According to the inventions of claims 1, 2, 3 and 7, when drawing data including a plurality of drawing figures arranged from the background side to the foreground side, if a synthesis process of the drawing figures is required, the number of pixels to be subjected to the synthesis process can be reduced, thereby making the drawing faster than before the reduction of the pixels.

[0016] According to the invention of claim 4, it is possible to perform drawing with a background color that is suited to the type of recording medium.

[0017] According to the inventions of claims 5 and 6, when an opaque drawing figure is placed between multiple transparent drawing figures, processing of the drawing figures placed in the background of the opaque drawing figure can be omitted, thereby making the drawing faster. [Brief explanation of the drawings]

[0018] [Figure 1] FIG. 2 is a block diagram showing the hardware configuration of the image processing apparatus. [Figure 2] FIG. 2 is a diagram showing an example of drawing data configured from a plurality of drawing graphics; [Figure 3] FIG. 2 is a diagram showing a plurality of drawing figures constituting drawing data. [Figure 4] 1 is a flowchart showing the flow of a drawing process according to the first embodiment. [Figure 5]1 is a flowchart showing the flow of a drawing process according to the first embodiment. [Figure 6] 10 is a flowchart showing the flow of a drawing process according to the second embodiment. [Figure 7] 10 is a flowchart showing the flow of a drawing process according to the second embodiment. [Figure 8] 11 is a flowchart showing the flow of a drawing process according to a third embodiment. [Figure 9] 11 is a flowchart showing the flow of a drawing process according to a third embodiment. [Figure 10] 11 is a flowchart showing the flow of a drawing process according to a third embodiment. [Figure 11] 1 is a table showing pixel attributes. [Figure 12] FIG. [Figure 13] FIG. DETAILED DESCRIPTION OF THE INVENTION

[0019] An image processing device according to an embodiment will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the hardware configuration of the image processing device.

[0020] The image processing device 10 is a device that receives drawing data including a plurality of drawing figures arranged from the background side to the foreground side, and writes each drawing figure into a memory to draw the drawing data. For example, the image processing device 10 receives drawing data for one page, and writes each drawing figure that constitutes the received drawing data into a memory.

[0021] The drawing may be a drawing for printing or a drawing for display. That is, the drawing data may be output to a printer and printed, or may be output to a display and displayed on the display. Of course, the drawing data may be used for purposes other than these.

[0022] The drawing data is data written in, for example, a page description language (PDL), and the data format of the drawing data is, for example, PDL (Portable Document Format) or XPS (XML Paper Specification).

[0023] The drawing figure may be, for example, a transparent image (e.g., a semi-transparent image), an opaque image (e.g., a photograph), a transparent character, or an opaque character. A transparent drawing figure is a drawing figure whose transparency is between transparent and opaque.

[0024] Furthermore, the image processing device 10 executes a compositing process that performs semi-transparency processing, color compositing, etc. by compositing the result of drawing the target drawing figure before the target drawing figure is drawn with the target drawing figure. The compositing process is a process of compositing the target drawing figure that is about to be drawn with the result of drawing the background side of the target drawing figure.

[0025] As shown in FIG. 1, the image processing device 10 includes a communication device 12, a UI 14, a memory 16, and a processor 18.

[0026] The communication device 12 is a communication interface having a communication chip, a communication circuit, etc., and has the function of transmitting information to other devices and receiving information transmitted from other devices using wireless or wired communication.

[0027] The UI 14 is a user interface and includes a display and an operation device. The display is a liquid crystal display, an EL display, or the like. The operation device is a keyboard, a mouse, input keys, an operation panel, or the like. The UI 14 may be a UI such as a touch panel that combines a display and an operation device. The UI 14 may also include a microphone and a speaker.

[0028] The memory 16 is a device that constitutes one or more storage areas for storing data. The memory 16 is, for example, a hard disk drive (HDD), a solid state drive (SSD), various types of memory (e.g., RAM, DRAM, ROM, etc.), other storage devices (e.g., optical disks, etc.), or a combination thereof. One or more memories 16 are included in the image processing device 10.

[0029] The processor 18 controls the operation of each unit of the image processing device 10. The processor 18 may include a memory.

[0030] The processor 18 also receives drawing data and writes each drawing figure included in the drawing data into the memory 16, thereby drawing the drawing data.

[0031] For example, drawing data may be transmitted to the image processing device 10 from an external device other than the image processing device 10, and the processor 18 may accept the drawing data and draw the drawing data. The drawing data may be generated by the image processing device 10, and the processor 18 may draw the generated drawing data.

[0032] The processor 18 renders the rendering data by executing the reverse order rendering process and the forward order rendering process.

[0033] The reverse order drawing process is a process in which each drawing figure is written into memory in order from the foreground side to the background side and drawn. The forward order drawing process is a process in which each drawing figure is written into memory in order from the background side to the foreground side and drawn. The reverse order drawing process corresponds to an example of the first drawing process, and the forward order drawing process corresponds to an example of the second drawing process.

[0034] In one aspect, in the reverse order drawing process, processor 18 draws opaque drawing figures, determines pixels on which the opaque drawing figures are drawn as drawn pixels, omits drawing of pixels requiring background drawing that require drawing of transparent drawing figures (e.g., semi-transparent drawing figures), and draws pixels other than the drawn pixels in the background color. After the reverse order drawing process, in the forward order drawing process, processor 18 omits drawing of drawing figures for drawn pixels, and draws pixels requiring background drawing by drawing figure synthesis processing.

[0035] When the drawing data includes drawing figures consisting of opaque images (e.g., photographs) or characters and transparent drawing figures (e.g., semi-transparent drawing figures), if the transparent drawing figures are placed in the background and the opaque drawing figures are placed in the foreground, the drawing of the transparent drawing figures is omitted, thereby speeding up the drawing.

[0036] Furthermore, if there are no pixels that require background drawing, the processor 18 may draw the background color on the undrawn pixels after the reverse order drawing process, and omit the normal order drawing process.

[0037] In addition, if there are pixels that require background drawing, the processor 18 may draw the background color on the pixels that require background drawing after the reverse order drawing process and before the compositing process in the forward order drawing process, and may draw the background color on the pixels that have not been drawn after the compositing process.

[0038] Furthermore, the drawing data is data to be printed on a recording medium, and processor 18 may or may not draw a background color in undrawn pixels depending on the type of recording medium on which the drawing data is printed. The recording medium may be, for example, paper or an OHP sheet (e.g., a transparent film). For example, processor 18 draws a background color when the recording medium is white paper, and does not draw a background color when the recording medium is an OHP sheet.

[0039] The processor 18 may store attributes such as whether a pixel is rendered, not rendered, or whether background needs to be rendered for each pixel, for example, as an example of a color element, or may store the attributes as a run length that groups together areas with the same attributes, or as an edge area or rectangle that defines the start and end points of the left and right sides of the area.

[0040] Furthermore, as a reverse order rendering process, processor 18 may determine a pixel requiring background rendering where an opaque rendering figure exists as a background rendering pixel, determine the opaque rendering figure as a background figure, and thereafter omit rendering of the pixel. In this case, as a forward order rendering process, processor 18 omits rendering of a background rendering pixel if the rendering figure to be processed is not a background figure, and if the rendering figure to be processed is a background figure, draws it using the rendering figure to be processed, changes the background rendering pixel to a pixel requiring background rendering, and thereafter performs composition processing.

[0041] In addition, in the reverse order drawing process, the processor 18 may determine that the first transparent figure detected for a pixel requiring background drawing is the foreground transparent drawing figure, and in the forward order drawing process, perform the process of drawing a background figure on a pixel that has already been background drawn and the compositing process from the background side to the foreground transparent drawing figure.

[0042] An example of drawing data will be described below with reference to Fig. 2 and Fig. 3. Fig. 2 shows drawing data 20. Fig. 3 shows each drawing figure that constitutes the drawing data 20. Fig. 3 also shows the overlapping state of each drawing figure when each drawing figure that constitutes the drawing data 20 is decomposed.

[0043] 2, the drawing data 20 includes a white background 22, semi-transparent circular drawing figures 24, 26, 28, and 30, an opaque rectangular drawing figure 32, and a drawing figure consisting of an opaque character string 34. The drawing figures 24, 26, 28, and 30, the drawing figure 32, and the character string 34 are arranged on the background 22.

[0044] 3, from the background 22 side, the drawing figures 24, 26, 28, and 30, the drawing figure 32, and the character string 34 are arranged in this order, overlapping each other. The rectangular drawing figure 32 is a figure that forms the background of the character string 34. In other words, the semi-transparent drawing figure 24 is drawn on the background 22, the semi-transparent drawing figure 26 is drawn partially overlapping the drawing figure 24, the semi-transparent drawing figure 28 is drawn partially overlapping the drawing figure 26, the semi-transparent drawing figure 30 is drawn partially overlapping the drawing figure 28, the opaque drawing figure 32 is drawn partially overlapping the drawing figure 30, and the opaque character string 34 is drawn overlapping the drawing figure 32. In this manner, the drawing data 20 is constructed.

[0045] The processor 18 executes alpha blending as an example of composition processing. The rendering result of the alpha blending is defined by the following equation (1). Rendering result = (1 - α) × background color + α × rendering color (1)

[0046] 2, pixel 36 in the drawing data 20 is a pixel where a drawing graphic 24 is overlaid on a white background 22, and a drawing graphic 26 is overlaid on the drawing graphic 24. For pixel 36, the processor 18 obtains brightness=0.5 by drawing the semi-transparent drawing graphic 24 (black (brightness=0.0)) on the white background 22 (brightness=1.0) according to α=0.5, and further obtains brightness=0.25 as a drawing result by drawing the semi-transparent drawing graphic 26 (black (brightness=0.0)) according to α=0.5. The same applies to the other pixels in the drawing data 20.

[0047] Alpha blending is merely an example of compositing, and other processes such as transparency processing may be included in the concept of compositing according to the embodiment.

[0048] Each embodiment will be described below. In the rendering process according to each embodiment, a reverse order rendering process is first executed, and then a normal order rendering process is executed.

[0049] Example 1 The drawing process according to the first embodiment will be described below with reference to Fig. 4 and Fig. 5. Fig. 4 and Fig. 5 show a flowchart illustrating the flow of the drawing process according to the first embodiment. Fig. 4 shows the process from step S01 to step S10, and Fig. 5 shows the process from step S11 to step S19. The process from step S01 to step S10 corresponds to an example of the reverse order drawing process, and the process from step S13 to step S18 corresponds to an example of the forward order drawing process.

[0050] First, the processor 18 receives one page of drawing data. Here, as an example, the processor 18 receives drawing data 20.

[0051] Next, as an initialization process, the processor 18 sets the attributes of all pixels in the page to "undrawn" and sets the state of the page to "opaque" (S01).

[0052] The processor 18 reads out the drawing figures included in the drawing data 20 from the foreground side (S02), and processes the pixels in the read drawing figures to be processed (S03).

[0053] Processor 18 determines whether the attribute of the pixel to be processed is "already drawn" (S04).

[0054] If the attribute of the pixel to be processed is "already drawn" (S04, Yes), the process proceeds to step S09.

[0055] If the attribute of the pixel to be processed is not "already rendered" (S04: No), processor 18 determines whether the attribute of the pixel to be processed is "background rendering required" (S05).

[0056] If the attribute of the pixel to be processed is "background rendering required" (S05, Yes), the process proceeds to step S09.

[0057] If the attribute of the pixel to be processed is not "background rendering required" (S05, No), the processor 18 determines whether the rendering figure to be processed is an opaque rendering figure (S06).

[0058] If the target drawing figure is an opaque drawing figure (S06, Yes, Opaque), processor 18 draws the target pixel in the color of the target drawing figure and sets the attribute of the target pixel to "Drawn" (S07). Then, the process proceeds to step S09.

[0059] For example, if the drawing graphic to be processed is a character string 34, the processor 18 draws the pixel to be processed in the color of the character string 34 and sets the attribute of the pixel to be processed to "drawn." Because the attribute of the pixel to be processed is set to "drawn," when processing a drawing graphic other than the character string 34, the pixel to be processed is not processed (S04, Yes). For example, for pixels whose attribute is set to "drawn," drawing graphics located on the background side of the character string 34 are not processed.

[0060] If the target drawing figure is not an opaque drawing figure, i.e., if it is a transparent drawing figure (S06, No, Transparent), the processor 18 sets the attribute of the target pixel to "background drawing required" and sets the page state to "transparent" (S08). At this stage, the target pixel is not drawn. Then, the process proceeds to step S09.

[0061] The processor 18 executes the processes from step S03 to step S08 until all pixels in the drawing graphic to be processed are drawn (S09).

[0062] Furthermore, the processor 18 reads all the drawing processes included in the drawing data 20 to be processed, and executes the processes from step S02 to step S09 until all the drawing figures are processed (S10).

[0063] The processes from step S01 to step S10 correspond to an example of the reverse order drawing process according to embodiment 1. Hereinafter, the processes from step S11 onwards will be described with reference to FIG.

[0064] The processor 18 determines whether the page state is set to "opaque" (S11). As described above, if a transparent drawing figure is included in the drawing data 20, the page state is set to "transparent" (see steps S06 and S08), and if a transparent drawing figure is not included in the drawing data 20, the page state is not set to "transparent" and the initial setting of "opaque" is maintained (see steps S06 and S08).

[0065] If the page state is set to "opaque" (S11, Yes), the process proceeds to step S19, where the processor 18 draws the background color on pixels whose attribute is "not drawn" (S19). This ends the drawing process according to the first embodiment.

[0066] If the page state is not set to "opaque" (S11, No), that is, if the page state is set to "transparent", the processor 18 draws the background color on pixels with the attribute "background drawing required" (S12).

[0067] Next, the processor 18 reads out the drawing figure included in the drawing data 20 from the background side (S13), and processes the pixels in the read drawing figure to be processed (S14).

[0068] Processor 18 determines whether the attribute of the pixel to be processed is "background rendering required" (S15). The attribute "background rendering required" is set in step S08 described above.

[0069] If the attribute of the pixel to be processed is "background rendering required" (S15, Yes), processor 18 performs a compositing process using the color of the rendering figure to be processed, the background color, and transparency information, and renders the pixel to be processed (S16). For example, processor 18 renders the pixel to be processed by performing an alpha blending process according to the above formula (1).

[0070] After step S16, the process proceeds to step S17. If the attribute of the pixel to be processed is not "background rendering required" (S15, No), the process proceeds to step S17.

[0071] The processor 18 executes the processes from step S14 to step S16 until all pixels in the drawing graphic to be processed are drawn (S17).

[0072] Furthermore, the processor 18 reads all the drawing processes included in the drawing data 20 to be processed, and executes the processes from step S13 to step S17 until all the drawing figures are processed (S18).

[0073] After step S18, the processor 18 draws the background color on the pixels whose attribute is "not drawn" (S19), thereby completing the drawing process according to the first embodiment.

[0074] As described above, when a transparent drawing figure is placed on the background side and an opaque drawing figure is placed on the foreground side, the drawing of the transparent drawing figure is omitted, thereby speeding up the drawing process.

[0075] 3 as an example, for pixels where character string 34, which is the foreground character string, is drawn, the drawing of drawing figures 24 to 32 that are overlapped with character string 34 and are located behind character string 34 is omitted. This omits the compositing process and pixel writing for drawing figures 24 to 32, thereby speeding up drawing.

[0076] If the drawing data 20 is data to be printed, in step S19, the processor 18 may or may not draw a background color on pixels with the attribute "undrawn" depending on the type of recording medium on which the drawing data 20 is printed. The processor 18 acquires information indicating the type of recording medium on which printing is to be performed from the printer or a device that controls the printer. For example, if the recording medium is white paper, the processor 18 draws a background color on pixels with the attribute "undrawn." If the recording medium is a transparent film such as an overhead projector sheet, the processor 18 does not draw a background color on pixels with the attribute "undrawn." As a result, on transparent film, pixels with the attribute "undrawn" remain transparent.

[0077] Example 2 The drawing process according to the second embodiment will be described below with reference to Fig. 6 and Fig. 7. Fig. 6 and Fig. 7 show a flowchart illustrating the flow of the drawing process according to the second embodiment. Fig. 6 shows the process from step S21 to step S31, and Fig. 7 shows the process from step S32 to step S39. The process from step S21 to step S30 corresponds to an example of the reverse order drawing process, and the process from step S34 to step S39 corresponds to an example of the forward order drawing process.

[0078] In the second embodiment, unlike the first embodiment, the process corresponding to step S19 is not executed, and instead the process of step S31 is executed between the reverse order drawing process and the forward order drawing process. The flow of the drawing process according to the second embodiment will be described below.

[0079] First, the processor 18 receives one page of drawing data. Here, as an example, the processor 18 receives drawing data 20.

[0080] Next, as an initialization process, the processor 18 sets the attributes of all pixels in the page to "undrawn" and sets the state of the page to "opaque" (S21).

[0081] The processor 18 reads out the drawing figures included in the drawing data 20 from the foreground side (S22), and processes the pixels in the drawing figures that are the processing target and that have been read out (S23).

[0082] The processor 18 determines whether the attribute of the pixel to be processed is "already drawn" (S24).

[0083] If the attribute of the pixel to be processed is "already drawn" (S24, Yes), the process proceeds to step S29.

[0084] If the attribute of the pixel to be processed is not "already rendered" (No in S24), processor 18 determines whether the attribute of the pixel to be processed is "background rendering required" (S25).

[0085] If the attribute of the pixel to be processed is "background rendering required" (S25, Yes), the process proceeds to step S29.

[0086] If the attribute of the pixel to be processed is not "background rendering required" (S25, No), the processor 18 determines whether the rendering figure to be processed is an opaque rendering figure (S26).

[0087] If the target drawing graphic is an opaque drawing graphic (S26, Yes, Opaque), processor 18 draws the target pixel in the color of the target drawing graphic and sets the attribute of the target pixel to "Drawn" (S27). Then, the process proceeds to step S29.

[0088] If the target drawing figure is not an opaque drawing figure, i.e., if it is a transparent drawing figure (S26, No, Transparent), the processor 18 sets the attribute of the target pixel to "background drawing required" and sets the page state to "transparent" (S28). At this stage, the target pixel is not drawn. Then, the process proceeds to step S29.

[0089] The processor 18 executes the processes from step S23 to step S28 until all pixels in the drawing graphic to be processed are drawn (S29).

[0090] Furthermore, the processor 18 reads all the drawing processes included in the drawing data 20 to be processed, and executes the processes from step S22 to step S29 until all the drawing graphics have been processed (S30).

[0091] The processing from step S21 to step S30 corresponds to an example of the reverse order drawing processing according to the second embodiment.

[0092] In the second embodiment, the processor 18 draws pixels with an attribute other than "drawn" in the background color (S31). That is, the processor 18 draws pixels with an attribute "not drawn" and pixels with an attribute "background drawing required" in the background color.

[0093] The processing from step S32 onwards will be described below with reference to FIG.

[0094] Processor 18 determines whether the state of the page is set to "opaque" (S32).

[0095] If the page state is set to "opaque" (S32, Yes), the process ends. This completes the drawing process according to the second embodiment.

[0096] If the page state is not set to "opaque" (S32, No), that is, if the page state is set to "transparent," the processor 18 draws the background color on pixels with the attribute "background drawing required" (S33).

[0097] Next, processor 18 reads out the drawing figure included in drawing data 20 from the background side (S34), and processes pixels in the read drawing figure to be processed (S35).

[0098] The processor 18 determines whether the attribute of the pixel to be processed is "background rendering required" (S36).

[0099] If the attribute of the pixel to be processed is "background rendering required" (S36, Yes), processor 18 performs a blending process using the color of the drawing figure to be processed, the color of the background, and transparency information, and renders the pixel to be processed (S37). For example, processor 18 renders the pixel to be processed by performing an alpha blending process according to the above formula (1).

[0100] After step S37, the process proceeds to step S38. If the attribute of the pixel to be processed is not "background rendering required" (S36, No), the process proceeds to step S38.

[0101] The processor 18 executes the processes from step S35 to step S37 until all pixels in the drawing graphic to be processed are drawn (S38).

[0102] The processor 18 also reads all the drawing processes included in the drawing data 20 to be processed, and executes the processes from step S34 to step S38 until all the drawing figures are processed (S39). This completes the drawing process according to the second embodiment.

[0103] As in the first embodiment, when a transparent drawing figure is placed on the background side and an opaque drawing figure is placed on the foreground side, the drawing of the transparent drawing figure is omitted, thereby speeding up the drawing.

[0104] Furthermore, by drawing the background color on pixels with the attribute "not drawn" and pixels with the attribute "background drawing required" between the reverse order drawing process and the forward order drawing process, it is possible to avoid the process of drawing the background color on pixels with the attribute "not drawn" after the forward order drawing process.

[0105] Example 3 The drawing process according to the third embodiment will be described below with reference to FIGS. 8 to 13. FIGS. 8 to 10 show flowcharts illustrating the flow of the drawing process according to the third embodiment. FIG. 8 shows the process from step S41 to step S44, FIG. 9 shows the process from step S45 to step S55, and FIG. 10 shows the process from step S56 to step S66. The process from step S41 to step S54 corresponds to an example of reverse order drawing process, and the process from step S57 to step S66 corresponds to an example of forward order drawing process. FIG. 11 shows pixel attributes. FIGS. 12 and 13 show drawing figures.

[0106] First, the processor 18 receives one page of drawing data. Here, as an example, the processor 18 receives drawing data 20.

[0107] Next, as an initialization process, the processor 18 sets the attribute of all pixels in the page to "undrawn" and disables the setting of the identification information of the drawing graphic, "foreground transparent drawing graphic" (S41).

[0108] The processor 18 reads out the drawing figures included in the drawing data 20 from the foreground side (S42), and processes the pixels in the read drawing figures to be processed (S43).

[0109] The processor 18 determines whether the attribute of the pixel to be processed is "drawn" or "background drawn" (S44).

[0110] If the attribute of the pixel to be processed is "drawn" or "background drawn" (S44, Yes), the process proceeds to step S53.

[0111] If the attribute of the pixel to be processed is not "drawn" or "background drawn" (S44: No), the process proceeds to step S45.

[0112] The processing from step S45 onwards will be described below with reference to FIG.

[0113] The processor 18 determines whether the attribute of the pixel to be processed is "background rendering required" (S45).

[0114] If the attribute of the pixel to be processed is not "background rendering required" (S45, No), the processor 18 determines whether the rendering figure to be processed is an opaque rendering figure (S46).

[0115] If the target drawing graphic is an opaque drawing graphic (S46, Yes, Opaque), processor 18 draws the target pixel in the color of the target drawing graphic and sets the attribute of the target pixel to "Drawn" (S47). Then, the process proceeds to step S53.

[0116] If the target drawing figure is not an opaque drawing figure, that is, if it is a transparent drawing figure (S46, No, Transparent), the processor 18 sets the attribute of the target pixel to "background drawing required" (S48). At this stage, the target pixel is not drawn.

[0117] Next, processor 18 determines whether the drawing figure to be processed is the "first transparent figure" since starting processing of drawing data 20. In other words, processor 18 processes each drawing figure constituting drawing data 20 from the foreground side, and determines whether the drawing figure to be processed is the first transparent drawing figure detected.

[0118] If the drawing graphic to be processed is not the "first transparent graphic" (S49, No), the process proceeds to step S53.

[0119] If the target drawing figure is the "first transparent drawing figure," that is, if the target drawing figure is the first detected transparent drawing figure (S49, Yes), the processor 18 stores the identification information of the target drawing figure in the memory 16 as information indicating the "foreground transparent drawing figure" (S50). This enables the setting of the "foreground transparent drawing figure." Then, the process proceeds to step S53.

[0120] Furthermore, if the attribute of the pixel to be processed is "background rendering required" (Yes at S45), the processor 18 determines whether the rendering figure to be processed is an opaque rendering figure (S51).

[0121] If the drawing graphic to be processed is not an opaque drawing graphic (S51, No), the process proceeds to step S53.

[0122] If the drawing graphic to be processed is an opaque drawing graphic (S51, Yes), processor 18 sets the attribute of the pixel to be processed to "background drawn" and stores the identification information of the drawing graphic to be processed as information indicating a "background graphic" in memory 16 (S52). Then, the process proceeds to step S53.

[0123] The processor 18 executes the processes from step S43 to step S52 until all pixels in the drawing graphic to be processed are drawn (S53).

[0124] Furthermore, the processor 18 reads all the drawing processes included in the drawing data 20 to be processed, and executes the processes from step S42 to step S53 until all the drawing graphics have been processed (S54).

[0125] Next, processor 18 draws pixels with the attribute "not drawn" and pixels with the attribute "background drawing required" in the background color (S55).

[0126] The processing from step S56 onwards will be described below with reference to FIG.

[0127] The processor 18 determines whether the setting of the "foreground transparent drawing shape" is disabled (S56). That is, the processor 18 determines whether the drawing data 20 does not contain any transparent drawing shapes. If the drawing data 20 contains transparent drawing shapes, the setting of the "foreground transparent drawing shape" is enabled (see S50). That is, if there is a drawing shape whose identification information indicates the "foreground transparent drawing shape," the setting of the "foreground transparent drawing shape" is enabled.

[0128] If the setting of the "foreground transparent drawing figure" is invalid (S56, Yes), the drawing process according to the third embodiment ends. In other words, if no transparent drawing figure is included in the drawing data 20, the normal drawing process including the compositing process is not performed, and the drawing process ends.

[0129] If the setting of "foreground transparent drawing figure" is enabled, that is, if the drawing data 20 contains at least one transparent drawing figure (S56, No), the processor 18 reads the drawing figure contained in the drawing data 20 from the background side (S57) and processes the pixels in the read drawing figure to be processed (S58).

[0130] The processor 18 determines whether the attribute of the pixel to be processed is "background rendering required" (S59).

[0131] If the attribute of the pixel to be processed is "background rendering required" (S59, Yes), processor 18 performs a blending process using the color of the drawing figure to be processed, the background color, and transparency information, and renders the pixel to be processed (S60). For example, processor 18 renders the pixel to be processed by performing an alpha blending process according to the above formula (1).

[0132] After step S60, the process proceeds to step S65.

[0133] If the attribute of the pixel to be processed is not "background rendering required" (S59, No), processor 18 determines whether the attribute of the pixel to be processed is "background rendering completed" (S61).

[0134] If the attribute of the image to be processed is not "background rendered" (S61, No), the process proceeds to step S65.

[0135] If the attribute of the image to be processed is "background drawn" (S61, Yes), processor 18 determines whether the drawing figure to be processed is a "background figure" (S62). The identification information of the drawing figure of the "background figure" indicates that the drawing figure is a "background figure" (see S52). Processor 18 references the identification information of the drawing figure to be processed to determine whether the drawing figure to be processed is a "background figure".

[0136] If the drawing graphic to be processed is not a "background graphic" (S62, No), the process proceeds to step S65.

[0137] If the target drawing graphic is a "background graphic" (S62, Yes), processor 18 draws the target pixel using the color of the target drawing graphic (S63) and changes the attribute of the target pixel to "background drawing required" (S64). Then, the process proceeds to step S65.

[0138] Processor 18 executes the processes from step S58 to step S64 until all pixels in the drawing graphic to be processed are drawn (S65).

[0139] The processor 18 also reads all the drawing processes included in the drawing data 20 to be processed, and executes the processes from step S57 to step S65 until all the drawing figures are processed (S66). This completes the drawing process according to the third embodiment.

[0140] For example, when one pixel is represented by 32 bits (for example, when a tag indicating an attribute and each of the RGB colors are represented by 8 bits each), a flag indicating that background drawing is required is assigned to the most significant bit, and identification information is assigned to the remaining 31 bits, as shown in Fig. 11. Note that the format shown in Fig. 11 is merely an example, and information may be held in other formats.

[0141] The processing from step S45 to step S52 will be described below with reference to Fig. 12, giving a specific example. Fig. 12 shows drawing figures 38, 40, and 42. The drawing figures 38 and 42 are transparent drawing figures, and the drawing figure 40 is an opaque drawing figure (e.g., a character). As an example, it is assumed here that the transparent drawing figure 38 is placed on the background side, the transparent drawing figure 42 is placed on the foreground side, and the opaque drawing figure 40 is placed between the drawing figures 38 and 42, and that drawing processing is performed on these drawing figures.

[0142] In the reverse order rendering process, the rendering figures are processed from the foreground side, so the rendering figure 42 is processed first among the rendering figures 38, 40, and 42. Here, it is assumed that pixel 44 in the area where the rendering figures 38, 40, and 42 overlap is to be processed.

[0143] Since the drawing figure 42 is a transparent drawing figure (step S46, Yes), the attribute of the pixel 44 to be processed is set to "background drawing required" (S48). If the drawing figure 42 is the "first transparent drawing figure," the setting of the "foreground transparent drawing figure" becomes valid.

[0144] Focusing only on pixel 44, the drawing graphic 40 is processed after the drawing graphic 42 with respect to pixel 44. The attribute of the pixel 44 to be processed is set to "background drawing required" (S45, Yes), and the drawing graphic 40 is an opaque drawing graphic (S51, Yes), so the attribute of the pixel 44 to be processed is set to "background drawn", and the identification information of the drawing graphic 40 is set to "background graphic" (S52). Since the attribute of the pixel 44 to be processed is "background drawn" (step S44, Yes), the reverse order drawing process for the pixel 44 to be processed is terminated (S44, Yes).

[0145] As described above, in the reverse order drawing process, the drawing figure 38 on the background side is not processed for the pixel 44 with the attribute "background drawn." In this way, when an opaque drawing figure 40 is placed between a transparent drawing figure 38 and a drawing figure 42, the pixels of the drawing figure 38 placed on the background side of the drawing figure 40 that overlap with the drawing figure 40 are not processed, so the drawing process is reduced accordingly, and the processing speed is increased.

[0146] The processing from step S59 to step S64 will be described below with reference to Fig. 13. In Fig. 13, like Fig. 12, drawing figures 38, 40, and 42 are shown.

[0147] In normal order rendering processing, the rendering figures are processed from the background side, so the rendering figure 38 is processed first among the rendering figures 42, 40, and 38. Here, it is assumed that the pixel 44 is processed.

[0148] Since the attribute of the pixel 44 to be processed is not "background drawing required" (S59, No) but "background drawing already done" (S61, Yes), it is determined whether the drawing graphic 38 to be processed is a "background graphic" (S62). As described above, for pixel 44, since the drawing graphic 40 is a "background graphic," the drawing graphic 38 is not a "background graphic" (S62, No).

[0149] Focusing only on pixel 44, the drawing graphic 40 is processed after the drawing graphic 38 for pixel 44. The attribute of pixel 44 to be processed is not "background drawing required" (S59, No) but "background drawn" (S61, Yes), so it is determined whether the drawing graphic 40 to be processed is a "background graphic" (S62). As described above, since the drawing graphic 40 is a "background graphic" (S62, Yes), pixel 44 is drawn using the color of drawing graphic 40 (S63). Then, the attribute of pixel 44 is changed to "background drawing required."

[0150] As described above, in the normal order drawing process, for the pixel 44 whose attribute is "background drawn", the drawing figure 38 on the background side is not processed, and the drawing process is reduced accordingly, resulting in faster processing.

[0151] When an opaque drawing figure 40 is placed between a transparent drawing figure 38 and a transparent drawing figure 42, processing of drawing figures that are placed on the background side of the opaque drawing figure 40 and overlap with the drawing figure 40 (for example, the part of the drawing figure 42 that overlaps with the drawing figure 40) is omitted, thereby speeding up processing.

[0152] The functions of the image processing device 10 are realized, for example, by a combination of hardware and software. For example, the processor of each device reads and executes a program stored in the memory of the device, thereby realizing the function of each device. The program is stored in the memory via a recording medium such as a CD or DVD, or via a communication path such as a network.

[0153] In the above embodiments, the term "processor" refers to a processor in a broad sense, and includes general-purpose processors (e.g., CPU: Central Processing Unit, etc.) and dedicated processors (e.g., GPU: Graphics Processing Unit, ASIC: Application Specific Integrated Circuit, FPGA: Field Programmable Gate Array, programmable logic device, etc.). Furthermore, the operations of the processor in the above embodiments may not only be performed by a single processor, but may also be performed by multiple processors located in physically separate locations working together. Furthermore, the order of the operations of the processor is not limited to the order described in the above embodiments, and may be changed as appropriate. [Explanation of symbols]

[0154] 10 image processors, 16 memories, 18 processors.

Claims

1. a processor; The processor: receiving drawing data including a plurality of drawing figures arranged from the background side to the foreground side; a first drawing process is executed to draw each drawing figure in order from the foreground side to the background side, in which, in the first drawing process, an opaque drawing figure is drawn, pixels on which the opaque drawing figure is drawn are determined as drawn pixels, drawing of pixels other than the drawn pixels that require background drawing and on which a transparent drawing figure needs to be drawn is omitted, and pixels other than the drawn pixels are drawn in a background color; After the first drawing process, a second drawing process is executed to draw each drawing figure in order from the background side to the foreground side, and in the second drawing process, drawing of the drawing figure for the pixel that has already been drawn is omitted, and drawing of the pixel that requires background drawing is performed by a synthesis process of the drawing figure. Image processing device.

2. The processor: If there are no pixels that require background drawing, after the first drawing process, the background color is drawn on the undrawn pixels, and the second drawing process is omitted. The image processing device according to claim 1 .

3. The processor: If there are pixels that require background drawing, a background color is drawn on the pixels that require background drawing after the first drawing process and before a composition process in the second drawing process, and the background color is drawn on pixels that have not been drawn after the composition process. The image processing device according to claim 2 .

4. the drawing data is data to be printed on a recording medium, The processor: Depending on the type of recording medium on which the drawing data is printed, a background color is drawn on the undrawn pixels, or the undrawn pixels are not drawn. The image processing device according to claim 3 .

5. The processor: In the first drawing process, the pixel requiring background drawing in which an opaque drawing figure exists is determined as a pixel having already been background drawn, the opaque drawing figure is determined as a background figure, and thereafter drawing of the pixel is omitted; In the second drawing process, for a pixel that has already been background drawn, if the drawing figure to be drawn in the drawing process is not a background figure, the drawing is omitted, and if the drawing figure to be drawn in the drawing process is a background figure, the pixel that has already been background drawn is changed to the pixel that needs background drawing, and thereafter, a composition process is performed. The image processing device according to claim 1 .

6. The processor: In the first drawing process, a transparent drawing figure detected first for the pixel requiring background drawing is determined as a foreground transparent drawing figure; In the second drawing process, a process of drawing a background figure on pixels where background drawing has been completed and a synthesis process are performed from the background side to the foreground transparent drawing figure. The image processing device according to claim 5 .

7. The computer receiving drawing data including a plurality of drawing figures arranged from the background side to the foreground side; a first drawing process is executed to draw each drawing figure in order from the foreground side to the background side, in which, in the first drawing process, an opaque drawing figure is drawn, pixels on which the opaque drawing figure is drawn are determined as drawn pixels, drawing of pixels other than the drawn pixels that require background drawing and on which a transparent drawing figure needs to be drawn is omitted, and pixels other than the drawn pixels are drawn in a background color; After the first drawing process, a second drawing process is executed to draw each drawing figure in order from the background side to the foreground side, and in the second drawing process, drawing of the drawing figure for the pixel that has already been drawn is omitted, and drawing of the pixel that requires background drawing is performed by a synthesis process of the drawing figure. A program to make it work like this.

Citation Information

Patent Citations

  • JP1975028373A

  • A technique for reducing memory access bandwidth in graphics processing systems based on the destination alpha value.

    JP2015515662A

  • Method and device for dividing foreground image, program, and recording medium

    JP2016095849A

  • Image processing apparatus, image forming apparatus, and image processing program

    JP2017038208A

  • Information processor, printer driver, and information processing method

    JP2019185365A