WO2017163591A1 - 画像処理装置、画像処理方法、及び画像処理プログラム - Google Patents
画像処理装置、画像処理方法、及び画像処理プログラム Download PDFInfo
- Publication number
- WO2017163591A1 WO2017163591A1 PCT/JP2017/002573 JP2017002573W WO2017163591A1 WO 2017163591 A1 WO2017163591 A1 WO 2017163591A1 JP 2017002573 W JP2017002573 W JP 2017002573W WO 2017163591 A1 WO2017163591 A1 WO 2017163591A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image processing
- unit
- image
- objects
- extracted
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/162—Segmentation; Edge detection involving graph-based methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/10—Texturing; Colouring; Generation of textures or colours
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20072—Graph-based image processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/52—Parallel processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
Definitions
- the technology of the present disclosure relates to an image processing device, an image processing method, and an image processing program.
- a greedy schedule is known as an example of a schedule policy for determining on which processor core a thread as a processing execution unit is executed. It has been.
- the greedy schedule is a schedule policy that prevents a thread that has finished executing processing from becoming idle. If there is a processor core that is not executing processing, the processor core immediately executes the next processing. It will be. Therefore, in the greedy schedule, there is a problem in that each of the processes continuously executed with reference to the same memory area may be executed by different processor cores.
- the technology of the present disclosure provides an image processing apparatus, an image processing method, and an image processing program capable of performing image processing at a higher speed than when each of a plurality of image processes is executed by a different processor core. .
- An image processing apparatus is an image processing apparatus including a plurality of processor cores, and an object group in which a plurality of objects for executing image processing are connected in a directed acyclic graph form.
- An extraction unit that extracts a plurality of objects connected in series from each other, and an execution unit that causes the same processor core among the plurality of processor cores to perform image processing by each of the plurality of objects extracted by the extraction unit And.
- the image processing apparatus is the image processing apparatus according to the first aspect.
- the number of objects connected to the preceding stage is 0 or 1 as the plurality of objects connected in series. A plurality of objects may be extracted.
- An image processing apparatus is the image processing apparatus according to the first aspect or the second aspect, wherein the execution unit is configured to execute an image process using a plurality of objects extracted by the extraction unit.
- Each of the plurality of objects extracted for each divided region by causing the same processor core to execute image processing by each of the plurality of extracted objects in a divided region unit obtained by dividing the image to be divided into a plurality of regions
- the image processing by may be executed by different processor cores.
- An image processing apparatus is the image processing apparatus according to the third aspect, in which an image to be subjected to image processing by a plurality of objects extracted by the extraction unit is processed by a processor core. You may further provide the division part divided
- An image processing apparatus is the image processing apparatus according to the third aspect, in which image processing is performed on an image to be subjected to image processing by a plurality of objects extracted by the extraction unit. There may be further provided a dividing unit that divides the data into a plurality of divided areas with a size equal to or smaller than the capacity of the cache memory included in the calculating unit.
- An image processing apparatus is the cache memory in which the plurality of processor cores are used for image processing in the image processing apparatus according to any one of the first to fifth aspects. You may have.
- An image processing method is an image processing method by an image processing apparatus including a plurality of processor cores, and a plurality of objects for executing image processing are connected in the form of a directed acyclic graph. A plurality of objects connected in series from the group of the extracted objects are extracted, and image processing by each of the extracted plurality of objects is executed by the same processor core among the plurality of processor cores.
- An image processing program causes a computer to function as the extraction unit and the execution unit of the image processing apparatus according to any one of the first to sixth aspects of the present invention. Is.
- image processing can be performed at a higher speed than when each of a plurality of image processing is executed by a different processor core.
- FIG. 1 is a block diagram illustrating an example of a configuration of a computer that functions as an image processing apparatus according to an embodiment. It is a schematic diagram showing an example of image processing DAG. It is the schematic at the time of adding the memory for input / output to the image processing DAG. It is a block diagram which shows an example of a functional structure of the process control part which concerns on embodiment. It is the schematic where it uses for description of an example of the synthetic
- the computer 10 may be a copying machine, a printer, a facsimile machine, a multifunction machine having the functions of these machines, and a computer incorporated in an image handling device that performs image processing inside a scanner or the like.
- the computer 10 may be an independent computer such as a PC (Personal Computer), or may be a computer incorporated in a portable device such as a PDA (Personal Digital Assistant) and a mobile phone.
- the computer 10 includes a first calculation unit 12A, a second calculation unit 12B, a memory 14, a display unit 16, an operation unit 18, a storage unit 20, an image data supply unit 22, And an image output unit 24. Further, the first calculation unit 12A, the second calculation unit 12B, the memory 14, the display unit 16, the operation unit 18, the storage unit 20, the image data supply unit 22, and the image output unit 24 are connected to each other via the bus 26. It is connected.
- the first arithmetic unit 12A is a main processor of the computer 10, and is a CPU (Central Processing Unit) as an example.
- the 2nd calculating part 12B which concerns on this Embodiment is GPU (Graphics
- the second arithmetic unit 12B according to the present embodiment includes a cache memory and a plurality (four in the present embodiment) of processor cores.
- the second calculation unit 12B may be the same type of CPU as the first calculation unit 12A or may be a different type of CPU. Further, the second calculation unit 12B may be a GPU built in the first calculation unit 12A.
- the second arithmetic unit 12B may be a GPU that does not have the local memory 13 therein. Further, the first arithmetic unit 12A and the second arithmetic unit 12B may be an arithmetic unit such as an FPGA (Field Programmable Gate Array).
- FPGA Field Programmable Gate Array
- the memory 14 is a non-volatile storage unit in which the first calculation unit 12A and the second calculation unit 12B temporarily store data.
- the first calculation unit 12A sends the image data stored in the storage area of the memory 14 or the storage unit 20 to the second calculation unit 12B via the bus 26. Forward.
- the second calculation unit 12B stores the image data transferred from the first calculation unit 12A in the local memory 13, and performs image processing on the stored image data.
- the second calculation unit 12B may directly read the image data stored in the memory 14 or the storage unit 20 and perform image processing.
- a display panel such as an LCD (Liquid Crystal Display) provided on the image handling device and a numeric keypad are applied to the display unit 16 and the operation unit 18, for example.
- a display connected to the computer 10 a keyboard, a mouse, and the like are applied to the display unit 16 and the operation unit 18.
- the display unit 16 and the operation unit 18 may be a touch panel display in which a touch panel and a display are integrated.
- the storage unit 20 is a nonvolatile storage medium such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory.
- the image data supply unit 22 only needs to supply image data to be processed. For example, an image reading unit that reads an image recorded on a recording material such as paper or photographic film and outputs the image data is applied.
- a receiving unit that receives image data from an external device via a communication line, an image storage unit (memory 14 or storage unit 20) that stores image data, and the like are applied to the image data supply unit 22.
- the image output unit 24 only needs to output image data that has undergone image processing or an image represented by image data that has undergone image processing. For example, an image that records the image represented by the image data on a recording material such as paper or a photosensitive material.
- the recording unit is applied.
- the image output unit 24 includes a display unit (display unit 16) that displays an image represented by the image data on a display or the like, and a writing device that writes the image data to a recording medium such as a CD-ROM (Compact Disk Read Only Memory). Applied.
- the image output unit 24 is a transmission unit that transmits image data that has undergone image processing to an external device via a communication line.
- the image output unit 24 may be an image storage unit (memory 14 or storage unit 20) that stores image data that has undergone image processing.
- the storage unit 20 stores various programs executed by the first calculation unit 12A and the second calculation unit 12B.
- the storage unit 20 stores, as various programs, a program of the operating system 30 that manages resource management, program execution management, communication between the computer 10 and an external device, and the like.
- the storage unit 20 stores an image processing program group 34 for causing the computer 10 to function as an image processing apparatus as various programs.
- the storage unit 20 stores various application program groups 32 (hereinafter referred to as “applications 32”) that cause the image processing apparatus to perform desired image processing as various programs.
- the image processing program group 34 is a program developed for the purpose of reducing the load when developing the image processing program executed on the above-described image handling device, portable device, PC, and the like.
- the image processing program group 34 is a program developed so as to be executable in common with various devices (platforms) such as the above-described image handling device, portable device, and PC.
- the image processing apparatus realized by the image processing program group 34 constructs an image processing DAG 50A (details will be described later) that performs image processing instructed by the application 32 in accordance with a construction instruction from the application 32.
- the image processing apparatus executes the processing of the image processing DAG 50A in accordance with the execution instruction from the application 32. Therefore, the image processing program group 34 provides the application 32 with an interface for instructing the construction of the image processing DAG 50A for performing desired image processing or instructing the execution of the image processing by the constructed image processing DAG 50A. is doing.
- the program for performing the image processing may be developed as shown below.
- the image processing program group 34 includes a module library 36, a program for the processing construction unit 42, and a program for the processing control unit 46.
- the module library 36 programs of a plurality of types of image processing modules 38 that perform predetermined different image processing are registered.
- Examples of the image processing include input processing, filter processing, color conversion processing, enlargement / reduction processing (indicated as “enlargement / reduction processing” in FIG. 1), skew angle detection processing, image rotation processing, image composition processing, and output processing. Etc.
- image processing modules 38 having the same image processing type and different image processing contents to be executed are also registered.
- this type of image processing module is distinguished from “module 1” and “module 2” by adding a number at the end.
- the input image data is reduced by reducing the vertical and horizontal size of the image to 50% by thinning out every other pixel in both the horizontal and vertical directions.
- An image processing module 38 that performs processing is prepared. Further, for example, with respect to the image processing module 38 that performs enlargement / reduction processing, an image processing module 38 that performs enlargement / reduction processing at a specified enlargement / reduction rate for input image data is prepared.
- an image processing module 38 that performs color conversion processing, an image processing module 38 that converts an image in an RGB (Red (Green Blue) color space into an image in a CMYK (Cyan Magenta Yellow Key-Plate (black)) color space. And an image processing module 38 for converting an image in the CMYK color space into an image in the RGB color space. Further, for example, for the image processing module 38 that performs color conversion processing, an image processing module 38 that converts an image in the RGB color space into an image in the YCbCr color space, and an image in the YCbCr color space is converted into an image in the RGB color space. An image processing module 38 and the like are prepared.
- a buffer module 40 having a storage area (buffer) for storing image data is also registered.
- the process construction unit 42 constructs a DAG-type image processing DAG 50A according to an instruction from the application 32.
- the image processing DAG 50A as shown in FIG. 2A as an example, one or more image processing modules 38 are connected via a buffer module 40 arranged in at least one of the preceding and following stages of each image processing module 38. .
- Each image processing module 38 is an example of an object that performs image processing on input image data and outputs output image data.
- the image processing DAG 50A is an example of an object group in which a plurality of image processing modules 38 are connected.
- the image processing module 38 connected to the preceding stage through the buffer module 40 has its own image processing when the image processing by the preceding stage image processing module 38 is completed. It is shown that it is possible to execute.
- the image processing module 38 in which a plurality of image processing modules 38 are connected to the preceding stage via the buffer module 40 performs the processing of its own image processing when all the image processing of the plurality of preceding image processing modules 38 is completed. Indicates that execution is possible.
- FIG. 2A shows a DAG in which only each module is connected in the order of processing.
- this DAG is executed, image data stored in the memory 14 is input as shown in FIG. 2B. Then, image processing is performed according to the DAG. Finally, the processing result such as processed image data is stored in the memory 14. Note that when the image processing executed by each image processing module 38 is executed by the second arithmetic unit 12B, the memory 14 shown in FIG.
- the processing control unit 46 includes an extraction unit 60, a synthesis unit 62, a division unit 64, an execution unit 66, and an output unit 68.
- the extraction unit 60 extracts a plurality of image processing modules 38 connected in series from the image processing DAG 50A constructed by the processing construction unit 42.
- the extraction unit 60 extracts a plurality of image processing modules 38 in which the number of image processing modules 38 connected in the previous stage is 0 or 1 as the plurality of image processing modules 38 connected in series.
- the synthesizing unit 62 constructs an image processing DAG 50B in which a plurality of image processing modules 38 extracted by the extracting unit 60 are replaced with a synthesizing module 52 that includes the extracted plurality of image processing modules 38. .
- the processing performed by the extraction unit 60 and the synthesis unit 62 will be described in detail with reference to FIGS. 4 to 7 each show an example of the image processing DAG 50B after the processing by the synthesizing unit 62.
- FIG. 4 to 7 each show an example of the image processing DAG 50B after the processing by the synthesizing unit 62.
- the extraction unit 60 extracts the three image processing modules 38 connected in series.
- the synthesizing unit 62 then constructs an image processing DAG 50B in which the three image processing modules 38 extracted by the extracting unit 60 are replaced with a synthesizing module 52 that includes the extracted three image processing modules 38.
- the extraction unit 60 has three image processing modules connected in series surrounded by a broken line in FIG. 38 is extracted.
- the synthesizing unit 62 then constructs an image processing DAG 50B in which the three image processing modules 38 extracted by the extracting unit 60 are replaced with a synthesizing module 52 that includes the extracted three image processing modules 38.
- the extraction unit 60 includes three image processing modules connected in series surrounded by a broken line in FIG. 38 is extracted.
- the synthesizing unit 62 then constructs an image processing DAG 50B in which the three image processing modules 38 extracted by the extracting unit 60 are replaced with a synthesizing module 52 that includes the extracted three image processing modules 38.
- the extraction unit 60 may extract three image processing modules 38 connected in series surrounded by a one-dot chain line in FIG.
- the extraction unit 60 may randomly extract any one image processing module 38 group from among a plurality of sets of image processing module 38 groups.
- the extraction unit 60 may extract the image processing module 38 group having the largest number of image processing modules 38 among the plurality of sets of image processing module 38 groups.
- a priority is given in advance to each image processing module 38, and the extraction unit 60 has the largest total priority value among the plurality of sets of image processing modules 38. Groups may be extracted.
- the extraction unit 60 has three image processing modules connected in series surrounded by a broken line in FIG. 38 is extracted. In this case, the extraction unit 60 also extracts the two image processing modules 38 connected in series surrounded by the one-dot chain line in FIG. Then, the synthesizing unit 62 constructs an image processing DAG 50B in which the two sets of image processing modules 38 extracted by the extracting unit 60 are replaced with a synthesizing module 52 that includes each of the extracted image processing modules 38.
- the dividing unit 64 divides the image indicated by the processing target portion of the input image data into a plurality of divided images (divided regions). As an example, as shown in FIG. 8, the dividing unit 64 divides the image G indicated by the processing target portion of the input image data into a plurality of (three in the example shown in FIG. 8) divided images B1 to B3. .
- image data indicating a divided image is referred to as “divided image data”.
- the part to be processed of input image data means a part to be processed by the entire input image data in the image processing that processes the entire input image as in the color conversion process.
- the part to be processed of the input image data means a part of the input image in an image process that targets a part of the input image, such as a trimming process.
- a portion to be processed of input image data is simply referred to as “input image data”.
- the dividing unit 64 divides the image G up and down, but the present invention is not limited to this.
- the dividing unit 64 may divide the image G left and right, or may divide the image G vertically and horizontally.
- the dividing unit 64 is input to a number equal to or less than the number of processor cores included in the arithmetic unit (second arithmetic unit 12B in the present embodiment) that executes image processing by the image processing DAG 50B. Divide the image data. Note that the dividing unit 64 may divide the input image data by a predetermined number or size.
- the dividing unit 64 performs image processing executed by each image processing module 38 on the image processing DAG 50 ⁇ / b> B, and performs partial processing 39 (
- the image processing DAG 50C is constructed by dividing it into tasks.
- FIG. 9 shows an image processing DAG 50C when the input image data is divided into two divided image data in the image processing DAG 50B shown in FIG.
- FIG. 10 shows an image processing DAG 50C when the input image data is divided into four divided image data in the image processing DAG 50B shown in FIG. 9 and 10, the buffer module 40 is not shown in order to avoid complications.
- the dividing unit 64 is configured so that the partial processing 39 of the image processing module 38 connected to the preceding stage and the partial processing of the image processing module 38 connected to the subsequent stage are performed according to the type of image processing executed by the image processing module 38.
- Dependency is given to 39. In FIG. 9 and FIG. 10, this dependency relationship is indicated by a dashed arrow.
- each partial process 39 also has a one-to-one dependency.
- a dependency relationship is also given to a partial process 39 in the previous stage that performs image processing on the peripheral pixels.
- Each partial process 39 can be executed when there is no partial process 39 having a dependency relationship in the preceding stage, or when all partial processes 39 having a dependency relationship are completed.
- the execution unit 66 causes the second calculation unit 12B to execute image processing in accordance with the image processing DAG 50C.
- the execution unit 66 performs image processing by each of the plurality of image processing modules 38 included in the synthesis module 52 on the same processor core among the plurality of processor cores of the second arithmetic unit 12B.
- the execution unit 66 causes the same processor core to execute image processing by each of the plurality of image processing modules 38 included in the synthesis module 52 in units of divided image data.
- the execution unit 66 causes a different processor core to execute image processing by each of the plurality of image processing modules 38 included in the synthesis module 52 for each divided image data.
- a plurality of partial processes 39 for processing individual divided image data in the synthesis module 52 are referred to as “partial processing group 54” (see also FIGS. 9 and 10).
- the execution unit 66 assigns each of the partial processes 39 included in each partial processing group 54 to the same processor core of the second arithmetic unit 12B. Let it run. Further, in this case, the execution unit 66 causes the partial processing 39 included in the partial processing group 54 to be executed by different processor cores between the partial processing groups 54. For the image processing modules 38 other than the synthesis module 52, the execution unit 66 may cause the processor core of the second arithmetic unit 12B to execute according to a predetermined schedule policy such as a greedy schedule.
- a predetermined schedule policy such as a greedy schedule.
- the output unit 68 outputs the output image data obtained as a result of the image processing executed by the image processing module 38 at the final stage of the image processing DAG 50C.
- the output unit 68 displays the obtained output image data on the display unit 16.
- the output unit 68 may output (send) the output image data to an external device.
- the output unit 68 may output (form) an output image indicated by the output image data on a recording material such as paper.
- FIG. 11 is a flowchart showing the flow of processing of the image processing program executed by the first arithmetic unit 12A when an instruction to start execution of image processing is input by the application 32.
- the image processing program is installed in the storage unit 20 in advance. Further, when the first calculation unit 12A executes the image processing program, the first calculation unit 12A causes the processing construction unit 42, the extraction unit 60, the synthesis unit 62, the division unit 64, the execution unit 66, and the output unit 68 described above. Function as.
- step 100 of FIG. 11 the process construction unit 42 constructs an image processing DAG 50 ⁇ / b> A that performs image processing instructed by the application 32 in accordance with the construction instruction from the application 32.
- the extraction unit 60 extracts a plurality of image processing modules 38 connected in series from the image processing DAG 50A constructed in step 100 as described above.
- the composition unit 62 constructs an image processing DAG 50B in which the plurality of image processing modules 38 extracted in step 102 are replaced with a composition module 52 that includes the extracted plurality of image processing modules 38.
- the dividing unit 64 divides the input image data into a plurality of divided image data as described above. Then, the dividing unit 64 performs partial processing 39 of the image processing module 38 connected to the previous stage and partial processing of the image processing module 38 connected to the subsequent stage according to the type of image processing executed by the image processing module 38. Dependency is given to 39. By the processing in step 106, the dividing unit 64 constructs the image processing DAG 50C.
- step 108 the execution unit 66 causes the second calculation unit 12B to perform image processing in accordance with the image processing DAG 50C as described above.
- the second calculation unit 12B stores the input image data transferred from the first calculation unit 12A in the local memory 13, and executes image processing according to the image processing DAG 50C.
- the second arithmetic unit 12B outputs the output image data finally obtained (that is, output from the image processing module 38 at the final stage of the image processing DAG 50C) from the local memory 13 1 is transferred to the calculation unit 12A.
- step 110 the output unit 68 waits for reception of output image data.
- step 110 is positively determined, and the process proceeds to step 112.
- step 112 the output unit 68 outputs the output image data received in step 110 to the display unit 16, and then ends the image processing.
- a plurality of image processing modules 38 connected in series are extracted from the image processing DAG 50A. Then, the plurality of extracted image processing modules 38 are replaced with the synthesis module 52, and the synthesis module 52 is executed by the same processor core. As a result, the image processing by the image processing module 38 that processes image data in the same region is executed by the same processor core. As a result, the thread transfer between the processor cores and the frequency of image data transfer are reduced. It is suppressed. Therefore, image processing can be performed at a higher speed than when each of the plurality of image processing is executed on a different processor core.
- the hit rate of the cache memory is also improved.
- image processing can be performed at a higher speed than when each of the plurality of image processing is executed on different processor cores.
- the input image data is divided into a plurality of divided image data, and image processing is executed in units of divided image data.
- image processing is executed in units of divided image data.
- the present invention is not limited to this.
- the image processing may be performed on the input image data without dividing the input image data.
- a form example in this case a form in which image processing is executed in accordance with the image processing DAG 50B is exemplified.
- the image processing by the image processing DAG50C may be configured to be executed by the first calculation unit 12A, or may be configured to be executed by both the first calculation unit 12A and the second calculation unit 12B.
- the mode in which various programs are stored (installed) in the storage unit 20 in advance has been described.
- the various programs may be provided in a form recorded on a recording medium such as a CD-ROM, a DVD-ROM (Digital Versatile Disk Read Only Memory), or a USB (Universal Serial Bus) memory.
- Various programs may be downloaded from an external device via a network.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
複数のプロセッサ・コアを備えた画像処理装置として機能するコンピュータは、画像処理を実行するための画像処理モジュールが有向非循環グラフ形態で複数連結されたオブジェクト群から直列に連結された複数の画像処理モジュールを抽出し、抽出した複数の画像処理モジュールの各々による画像処理を、複数のプロセッサ・コアの中の同一のプロセッサ・コアに実行させる。
Description
本開示の技術は、画像処理装置、画像処理方法、及び画像処理プログラムに関する。
従来、画像処理を実行するためのオブジェクトが、DAG(Directed Acyclic Graph:有向非循環(非巡回)グラフ)形態で複数連結されたオブジェクト群に従って、画像処理を行う技術が知られている(特開2012-118932号公報参照)。
また、DAG形態のタスクフローグラフに従って、複数のプロセッサを用いて並列処理を行う技術が知られている(特開2014-164664号公報参照)。この技術では、第1タスクと、第1タスクの先行タスクである第2タスクとが異なるプロセッサに割り当てられている場合に、第2タスクによる出力データが第1タスクに割り当てられている第1プロセッサにより参照可能となるまで、第1タスクの実行を待機する。
また、第1のプロセッサ・コアから第2のプロセッサ・コアへスレッドが移送されることを予測し、スレッドに関連するデータを第1のプロセッサ・コアから第2のプロセッサ・コアへ移送する技術が知られている(特表2013-501296号公報参照)。この技術では、スレッドに関連するデータを第1のプロセッサ・コアから第2のプロセッサ・コアへ移送した後に、スレッドを第1のプロセッサ・コアから第2のプロセッサ・コアへ移送する。
ところで、複数のプロセッサ・コアにより処理を実行する場合に、処理の実行単位であるスレッドを何れのプロセッサ・コア上で実行するかを決定するスケジュール方針の一例として、貪欲スケジュール(greedy schedule)が知られている。貪欲スケジュールとは、処理の実行を終えたスレッドがアイドル状態とならないようにするスケジュール方針であり、処理を実行していないプロセッサ・コアが存在する場合、プロセッサ・コアは直ちに次の処理を実行することになる。従って、貪欲スケジュールでは、同じメモリ上の領域を参照して連続的に実行される処理の各々が、異なるプロセッサ・コアにより実行されてしまうことがあるという問題点がある。
特開2012-118932号公報に記載の技術では、この問題点について考慮されていない。また、特開2014-164664号公報及び特表2013-501296号公報に記載の技術では、異なるプロセッサ・コア間でデータを移送(コピー)する時間がかかってしまい、かつデータを移送している間は、処理の実行が中断される結果、高速に画像処理を行うことができない場合がある。
本開示の技術は、複数の画像処理の各々を異なるプロセッサ・コアにより実行する場合に比較して、高速に画像処理を行うことができる画像処理装置、画像処理方法、及び画像処理プログラムを提供する。
本発明の第1の態様の画像処理装置は、複数のプロセッサ・コアを備えた画像処理装置であって、画像処理を実行するためのオブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群から直列に連結された複数のオブジェクトを抽出する抽出部と、抽出部により抽出された複数のオブジェクトの各々による画像処理を、複数のプロセッサ・コアの中の同一のプロセッサ・コアに実行させる実行部と、を備えている。
なお、本発明の第2の態様の画像処理装置は、第1の態様の画像処理装置において、抽出部が、直列に連結された複数のオブジェクトとして、前段に連結されたオブジェクト数が0又は1の複数のオブジェクトを抽出してもよい。
また、本発明の第3の態様の画像処理装置は、第1の態様又は第2の態様の画像処理装置において、実行部が、抽出部により抽出された複数のオブジェクトによる画像処理の実行対象とされる画像が複数の領域に分割された分割領域単位で、抽出された複数のオブジェクトの各々による画像処理を同一のプロセッサ・コアに実行させ、かつ分割領域毎に抽出された複数のオブジェクトの各々による画像処理を異なるプロセッサ・コアに実行させてもよい。
また、本発明の第4の態様の画像処理装置は、第3の態様の画像処理装置において、抽出部により抽出された複数のオブジェクトによる画像処理の実行対象とされる画像を、プロセッサ・コアの数以下の複数の分割領域に分割する分割部をさらに備えてもよい。
また、本発明の第5の態様の画像処理装置は、第3の態様の画像処理装置において、抽出部により抽出された複数のオブジェクトによる画像処理の実行対象とされる画像を、画像処理を実行する演算部が有するキャッシュメモリの容量以下のサイズで、複数の分割領域に分割する分割部をさらに備えてもよい。
また、本発明の第6の態様の画像処理装置は、第1の態様から第5の態様の何れか1つの態様の画像処理装置において、複数のプロセッサ・コアが、画像処理に用いられるキャッシュメモリを有してもよい。
本発明の第7の態様の画像処理方法は、複数のプロセッサ・コアを備えた画像処理装置による画像処理方法であって、画像処理を実行するためのオブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群から直列に連結された複数のオブジェクトを抽出し、抽出した複数のオブジェクトの各々による画像処理を、複数のプロセッサ・コアの中の同一のプロセッサ・コアに実行させるものである。
本発明の第8の態様の画像処理プログラムは、コンピュータを、本発明の第1の態様から第6の態様の何れか1つの態様の画像処理装置の抽出部、及び実行部として機能させるためのものである。
本発明の一実施形態によれば、複数の画像処理の各々を異なるプロセッサ・コアにより実行する場合に比較して、高速に画像処理を行うことができる。
以下、図面を参照して、本開示の技術を実施するための形態例を詳細に説明する。
まず、図1を参照して、画像処理装置として機能するコンピュータ10の構成を説明する。なお、コンピュータ10は、複写機、プリンタ、ファクシミリ装置、これらの装置の機能を兼ね備えた複合機、及びスキャナ等の内部で画像処理を行う画像取扱機器に組み込まれたコンピュータであってもよい。また、コンピュータ10は、PC(Personal Computer)等の独立したコンピュータであってもよく、PDA(Personal Digital Assistant)及び携帯電話機等の携帯機器に組み込まれたコンピュータであってもよい。
図1に示すように、本実施の形態に係るコンピュータ10は、第1演算部12A、第2演算部12B、メモリ14、表示部16、操作部18、記憶部20、画像データ供給部22、及び画像出力部24を備えている。また、第1演算部12A、第2演算部12B、メモリ14、表示部16、操作部18、記憶部20、画像データ供給部22、及び画像出力部24の各部は、バス26を介して互いに接続されている。
本実施の形態に係る第1演算部12Aは、コンピュータ10のメイン・プロセッサであり、一例としてCPU(Central Processing Unit)である。また、本実施の形態に係る第2演算部12Bは、一例として内部にローカルメモリ13を有するGPU(Graphics Processing Unit)である。また、本実施の形態に係る第2演算部12Bは、キャッシュメモリ、及び複数(本実施の形態では4つ)のプロセッサ・コアを有する。なお、第2演算部12Bは、第1演算部12Aと同じ種類のCPUでもよいし、異なる種類のCPUでもよい。また、第2演算部12Bは、第1演算部12Aに内蔵されたGPUでもよい。また、第2演算部12Bは内部にローカルメモリ13を有さないGPUでもよい。また、第1演算部12A及び第2演算部12Bは、FPGA(Field Programmable Gate Array)等の演算器でもよい。
メモリ14は、第1演算部12A及び第2演算部12Bが一時的にデータを記憶する不揮発性の記憶手段である。本実施の形態に係る第2演算部12Bにより画像処理を行う場合、第1演算部12Aはメモリ14又は記憶部20の記憶領域に記憶された画像データを第2演算部12Bにバス26を介して転送する。そして、第2演算部12Bは、第1演算部12Aから転送された画像データをローカルメモリ13に記憶し、記憶した画像データに対して画像処理を行う。なお、第2演算部12Bは、メモリ14又は記憶部20に記憶された画像データを直接読み出して画像処理を行ってもよい。
コンピュータ10が前述した画像取扱機器に組み込まれている場合、表示部16及び操作部18は、例えば画像取扱機器に設けられたLCD(Liquid Crystal Display)等の表示パネル及びテンキー等が適用される。また、コンピュータ10が独立したコンピュータである場合、表示部16及び操作部18は、例えばコンピュータ10に接続されたディスプレイ、及びキーボード、マウス等が適用される。また、表示部16及び操作部18は、タッチパネル及びディスプレイが一体化して構成されたタッチパネルディスプレイ等でもよい。また、記憶部20は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、及びフラッシュメモリ等の不揮発性の記憶媒体が適用される。
画像データ供給部22は、処理対象の画像データを供給するものであればよく、例えば紙や写真フィルム等の記録材料に記録されている画像を読み取って画像データを出力する画像読取部が適用される。また、画像データ供給部22は、例えば通信回線を介して外部装置から画像データを受信する受信部、及び画像データを記憶する画像記憶部(メモリ14又は記憶部20)等が適用される。
画像出力部24は、画像処理を経た画像データ又は画像処理を経た画像データが表す画像を出力するものであればよく、例えば画像データが表す画像を紙や感光材料等の記録材料に記録する画像記録部が適用される。また、画像出力部24は、画像データが表す画像をディスプレイ等に表示する表示部(表示部16)、画像データをCD-ROM(Compact Disk Read Only Memory)等の記録媒体に書き込む書込装置が適用される。また、画像出力部24は、画像処理を経た画像データを、通信回線を介して外部装置に送信する送信部が適用される。また、画像出力部24は、画像処理を経た画像データを記憶する画像記憶部(メモリ14又は記憶部20)であってもよい。
図1に示すように、記憶部20には、第1演算部12A及び第2演算部12Bによって実行される各種プログラムが記憶されている。記憶部20には、各種プログラムとして、リソースの管理、プログラムの実行の管理、及びコンピュータ10と外部装置との通信等を司るオペレーティングシステム30のプログラムが記憶されている。また、記憶部20には、各種プログラムとして、コンピュータ10を画像処理装置として機能させるための画像処理プログラム群34が記憶されている。また、記憶部20には、各種プログラムとして、上記画像処理装置に対して所望の画像処理を行わせる各種のアプリケーションプログラム群32(以下、「アプリケーション32」という。)が記憶されている。
画像処理プログラム群34は、前述した画像取扱機器、携帯機器、及びPC等で実行される画像処理プログラムを開発する際の負荷を軽減することを目的として開発されたプログラムである。また、画像処理プログラム群34は、前述した画像取扱機器、携帯機器、及びPC等の各種機器(プラットフォーム)で共通に実行可能に開発されたプログラムである。
画像処理プログラム群34によって実現される画像処理装置は、アプリケーション32からの構築指示に従い、アプリケーション32が指示した画像処理を行う画像処理DAG50A(詳細は後述)を構築する。そして、上記画像処理装置は、アプリケーション32からの実行指示に従い画像処理DAG50Aの処理を実行する。このため、画像処理プログラム群34は、所望の画像処理を行う画像処理DAG50Aの構築を指示したり、構築された画像処理DAG50Aによる画像処理の実行を指示したりするためのインタフェースをアプリケーション32に提供している。
以上の構成により、内部で画像処理を行う必要のある任意の機器を新規に開発する場合等にも、上記画像処理を行うプログラムの開発に関しては、以下に示すように開発すればよい。この場合、上記任意の機器で必要とされる画像処理を、上記インタフェースを利用して画像処理プログラム群34に行わせるアプリケーション32を開発すればよい。従って、開発者は、実際に画像処理を行うプログラムを新たに開発する必要が無くなり、開発者の負荷が軽減される。
次に、本実施の形態に係る画像処理プログラム群34について詳細に説明する。図1に示すように、画像処理プログラム群34は、モジュールライブラリ36、処理構築部42のプログラム、及び処理制御部46のプログラムを含む。
モジュールライブラリ36は、予め定められた互いに異なる画像処理を行う複数種類の画像処理モジュール38のプログラムが各々登録されている。この画像処理としては、例えば、入力処理、フィルタ処理、色変換処理、拡大・縮小処理(図1では「拡縮処理」と表記)、スキュー角検知処理、画像回転処理、画像合成処理、及び出力処理等が挙げられる。
また、モジュールライブラリ36には、画像処理の種類が同一で、かつ実行する画像処理の内容が異なる画像処理モジュール38も登録されている。図1では、この種の画像処理モジュールを「モジュール1」、「モジュール2」と、末尾に数字を付して区別している。例えば、拡大・縮小処理を行う画像処理モジュール38については、入力された画像データを、水平方向及び垂直方向の各方向ともに1画素おきに間引くことで画像の縦横のサイズを50%に縮小する縮小処理を行う画像処理モジュール38が用意されている。さらに、例えば、拡大・縮小処理を行う画像処理モジュール38については、入力された画像データに対して指定された拡大・縮小率で拡大・縮小処理を行う画像処理モジュール38等が用意されている。
また、例えば、色変換処理を行う画像処理モジュール38については、RGB(Red Green Blue)色空間の画像をCMYK(Cyan Magenta Yellow Key-Plate(黒))色空間の画像へ変換する画像処理モジュール38、及びCMYK色空間の画像をRGB色空間の画像へ変換する画像処理モジュール38が用意されている。さらに、例えば、色変換処理を行う画像処理モジュール38については、RGB色空間の画像をYCbCr色空間の画像へ変換する画像処理モジュール38、及びYCbCr色空間の画像をRGB色空間の画像へ変換する画像処理モジュール38等が用意されている。
また、モジュールライブラリ36には、画像データを記憶するための記憶領域(バッファ)を備えたバッファモジュール40も登録されている。
本実施の形態に係る処理構築部42は、アプリケーション32からの指示により、DAG形態の画像処理DAG50Aを構築する。画像処理DAG50Aは、一例として図2Aに示すように、1つ以上の画像処理モジュール38が、個々の画像処理モジュール38の前段及び後段の少なくとも一方に配置されたバッファモジュール40を介して連結される。
なお、個々の画像処理モジュール38は、入力画像データに対して画像処理を実行して出力画像データを出力するオブジェクトの一例である。また、画像処理DAG50Aは、画像処理モジュール38が複数連結されたオブジェクト群の一例である。また、図2Aに示す例では、バッファモジュール40を介して前段に画像処理モジュール38が連結された画像処理モジュール38は、前段の画像処理モジュール38による画像処理が終了した場合に、自身の画像処理の実行が可能となることを示している。また、バッファモジュール40を介して前段に複数の画像処理モジュール38が連結された画像処理モジュール38は、前段の複数の画像処理モジュール38の全ての画像処理が終了した場合に、自身の画像処理の実行が可能となることを示している。
また、図2Aでは、各モジュールのみが処理の順に接続されたDAGを示しているが、このDAGが実行される際には、図2Bに示すようにメモリ14に記憶された画像データが入力されてDAGに従って画像処理が行われる。そして、最終的にメモリ14に処理済みの画像データ等の処理結果が記憶される。なお、各画像処理モジュール38で実行される画像処理を第2演算部12Bにより実行する場合は、図2Bに示したメモリ14がローカルメモリ13となる。
次に、図3を参照して、本実施の形態に係る処理制御部46の機能的な構成を説明する。図3に示すように、処理制御部46は、抽出部60、合成部62、分割部64、実行部66、及び出力部68を備えている。
本実施の形態に係る抽出部60は、処理構築部42により構築された画像処理DAG50Aから直列に連結された複数の画像処理モジュール38を抽出する。本実施の形態では、抽出部60は、直列に連結された複数の画像処理モジュール38として、前段に連結された画像処理モジュール38の数が0又は1の複数の画像処理モジュール38を抽出する。
本実施の形態に係る合成部62は、抽出部60により抽出された複数の画像処理モジュール38を、抽出された複数の画像処理モジュール38を内包する合成モジュール52に置き換えた画像処理DAG50Bを構築する。図4~図7を参照して、抽出部60及び合成部62による処理について詳細に説明する。なお、図4~図7は、各々合成部62による処理後の画像処理DAG50Bの一例を示している。
3つの画像処理モジュール38が、図4に示すようにバッファモジュール40を介して一列に連結されている場合、抽出部60は直列に連結された3つの画像処理モジュール38を抽出する。そして、合成部62は、抽出部60により抽出された3つの画像処理モジュール38を、抽出された3つの画像処理モジュール38を内包する合成モジュール52に置き換えた画像処理DAG50Bを構築する。
一方、5つの画像処理モジュール38が、図5に示すようにバッファモジュール40を介して連結されている場合、抽出部60は図5の破線で囲まれた直列に連結された3つの画像処理モジュール38を抽出する。そして、合成部62は、抽出部60により抽出された3つの画像処理モジュール38を、抽出された3つの画像処理モジュール38を内包する合成モジュール52に置き換えた画像処理DAG50Bを構築する。
また、4つの画像処理モジュール38が、図6に示すようにバッファモジュール40を介して連結されている場合、抽出部60は図6の破線で囲まれた直列に連結された3つの画像処理モジュール38を抽出する。そして、合成部62は、抽出部60により抽出された3つの画像処理モジュール38を、抽出された3つの画像処理モジュール38を内包する合成モジュール52に置き換えた画像処理DAG50Bを構築する。なお、この場合、抽出部60は図6の一点鎖線で囲まれた直列に連結された3つの画像処理モジュール38を抽出してもよい。
図6に示すように、抽出部60が抽出対象とする直列に連結された複数の画像処理モジュール38であって、一部の画像処理モジュール38が重複する複数の画像処理モジュール38が複数組存在する場合、抽出部60による抽出方法は特に限定されない。この場合、例えば、抽出部60は、複数組の画像処理モジュール38群のうち、ランダムに何れか1つの画像処理モジュール38群を抽出してもよい。
また、この場合、例えば、抽出部60は、複数組の画像処理モジュール38群のうち、画像処理モジュール38の個数が最も多い画像処理モジュール38群を抽出してもよい。また、この場合、例えば、画像処理モジュール38毎に優先度を予め付与しておき、抽出部60は、複数組の画像処理モジュール38群のうち、優先度の合計値が最も大きい画像処理モジュール38群を抽出してもよい。
さらに、6つの画像処理モジュール38が、図7に示すようにバッファモジュール40を介して連結されている場合、抽出部60は図7の破線で囲まれた直列に連結された3つの画像処理モジュール38を抽出する。また、この場合、抽出部60は図7の一点鎖線で囲まれた直列に連結された2つの画像処理モジュール38も抽出する。そして、合成部62は、抽出部60により抽出された2組の画像処理モジュール38群を、各々抽出された画像処理モジュール38群を内包する合成モジュール52に置き換えた画像処理DAG50Bを構築する。
本実施の形態に係る分割部64は、入力画像データの処理対象とする部分により示される画像を複数の分割画像(分割領域)に分割する。一例として図8に示すように、分割部64は、入力画像データの処理対象とする部分により示される画像Gを、複数(図8に示す例では3つ)の分割画像B1~B3に分割する。なお、以下では分割画像を示す画像データを「分割画像データ」という。また、入力画像データの処理対象とする部分とは、色変換処理のように入力画像全体を処理対象とする画像処理では、入力画像データ全体が処理対象とする部分を意味する。また、入力画像データの処理対象とする部分とは、切り抜き(トリミング)処理のように、入力画像の一部を対象とする画像処理では、入力画像の一部を意味する。以下では、錯綜を回避するために、入力画像データの処理対象とする部分を、単に「入力画像データ」という。
また、図8に示した例では、分割部64が画像Gを上下に分割しているが、これに限定されない。例えば分割部64は画像Gを左右に分割してもよいし、上下左右に分割してもよい。
本実施の形態では、分割部64は、画像処理DAG50Bによる画像処理を実行する演算部(本実施の形態では第2演算部12B)が有するプロセッサ・コア数以下で、かつ2以上の数に入力画像データを分割する。なお、分割部64は、予め定められた数又はサイズで入力画像データを分割してもよい。
また、分割部64は、画像処理DAG50Bによる画像処理を実行する演算部が有するキャッシュメモリの容量以下のサイズで入力画像データを分割してもよい。この場合、例えば、分割部64は、画像処理DAG50Bによる画像処理を実行する演算部のプロセッサから最も遠いレベルのキャッシュメモリ、所謂LLC(Last Level Cache)の容量以下で、かつLLCの容量に極力一致するサイズで入力画像データを分割する形態が例示される。
また、一例として図9及び図10に示すように、分割部64は、画像処理DAG50Bに対し、各画像処理モジュール38で実行される画像処理を、分割画像データの各々に対応する部分処理39(タスク)に分割して画像処理DAG50Cを構築する。なお、図9は、図4に示した画像処理DAG50Bにおいて、入力画像データを2つの分割画像データに分割した場合の画像処理DAG50Cを示している。また、図10は、図5に示した画像処理DAG50Bにおいて、入力画像データを4つの分割画像データに分割した場合の画像処理DAG50Cを示している。なお、図9及び図10では、錯綜を回避するために、バッファモジュール40の図示を省略している。
さらに、分割部64は、画像処理モジュール38で実行される画像処理の種類に応じて、前段に連結された画像処理モジュール38の部分処理39と、後段に連結された画像処理モジュール38の部分処理39との間で依存関係を付与する。なお、図9及び図10では、この依存関係を破線の矢印で示している。
例えば、色変換処理のように、処理対象とする画素のみに対して画像処理を行う処理は、各部分処理39も1対1の依存関係となる。一方、例えば、フィルタ処理のように、処理対象とする画素の周辺画素も必要な画像処理では、周辺画素に対して画像処理を行う前段の部分処理39にも依存関係を付与することとなる。各部分処理39は、前段に依存関係のある部分処理39が存在しない場合か、又は依存関係のある全ての部分処理39が終了した場合に実行可能となる。
本実施の形態に係る実行部66は、画像処理DAG50Cに従って、第2演算部12Bに画像処理を実行させる。本実施の形態では、実行部66は、合成モジュール52に内包される複数の画像処理モジュール38の各々による画像処理を、第2演算部12Bの複数のプロセッサ・コアの中の同一のプロセッサ・コアに実行させる。具体的には、本実施の形態では、実行部66は、分割画像データ単位で合成モジュール52に内包される複数の画像処理モジュール38の各々による画像処理を同一のプロセッサ・コアに実行させる。また、実行部66は、分割画像データ毎に、合成モジュール52に内包される複数の画像処理モジュール38の各々による画像処理を異なるプロセッサ・コアに実行させる。なお、以下では、合成モジュール52における個々の分割画像データを処理する複数の部分処理39を「部分処理群54」という(図9及び図10も参照)。
例えば、図9に示した画像処理DAG50Cが構築された場合、実行部66は、個々の部分処理群54に内包される部分処理39の各々を、第2演算部12Bの同一のプロセッサ・コアに実行させる。また、この場合、実行部66は、各部分処理群54間では部分処理群54に内包される部分処理39を異なるプロセッサ・コアで実行させる。なお、合成モジュール52以外の画像処理モジュール38については、実行部66は、貪欲スケジュール等の予め定められたスケジュール方針で第2演算部12Bのプロセッサ・コアに実行させればよい。
本実施の形態に係る出力部68は、画像処理DAG50Cの最終段の画像処理モジュール38により実行された画像処理の結果得られた出力画像データを出力する。本実施の形態では、出力部68は、得られた出力画像データを表示部16に表示する。なお、出力部68は、出力画像データを外部装置に出力(送信)してもよい。また、コンピュータ10がプリンタに組み込まれている場合は、出力部68は、出力画像データにより示される出力画像を紙等の記録材料に出力(形成)してもよい。
次に、図11を参照して、本実施の形態に係るコンピュータ10の作用を説明する。なお、図11は、アプリケーション32により画像処理の実行開始の指示が入力された場合に第1演算部12Aによって実行される画像処理プログラムの処理の流れを示すフローチャートである。また、画像処理プログラムは記憶部20に予めインストールされている。また、第1演算部12Aが画像処理プログラムを実行することにより、第1演算部12Aが前述した処理構築部42、抽出部60、合成部62、分割部64、実行部66、及び出力部68として機能する。
図11のステップ100で、処理構築部42は、アプリケーション32からの構築指示に従い、アプリケーション32が指示した画像処理を行う画像処理DAG50Aを構築する。次のステップ102で、抽出部60は、前述したように、ステップ100で構築された画像処理DAG50Aから直列に連結された複数の画像処理モジュール38を抽出する。
次のステップ104で、合成部62は、ステップ102で抽出された複数の画像処理モジュール38を、抽出された複数の画像処理モジュール38を内包する合成モジュール52に置き換えた画像処理DAG50Bを構築する。
次のステップ106で、分割部64は、前述したように、入力画像データを複数の分割画像データに分割する。そして、分割部64は、画像処理モジュール38で実行される画像処理の種類に応じて、前段に連結された画像処理モジュール38の部分処理39と、後段に連結された画像処理モジュール38の部分処理39との間で依存関係を付与する。本ステップ106の処理により、分割部64は画像処理DAG50Cを構築する。
ステップ108で、実行部66は、前述したように、画像処理DAG50Cに従って、第2演算部12Bに画像処理を実行させる。第2演算部12Bは、第1演算部12Aから転送された入力画像データをローカルメモリ13に記憶し、画像処理DAG50Cに従って画像処理を実行する。第2演算部12Bは、画像処理DAG50Cによる画像処理が終了すると、最終的に得られた(すなわち画像処理DAG50Cの最終段の画像処理モジュール38から出力された)出力画像データをローカルメモリ13から第1演算部12Aに転送する。
そこで、ステップ110で、出力部68は、出力画像データの受信待ちを行う。出力部68が出力画像データを受信するとステップ110が肯定判定となり、処理がステップ112に移行する。ステップ112で、出力部68は、ステップ110で受信された出力画像データを表示部16に出力した後、本画像処理を終了する。
以上説明したように、本実施の形態によれば、画像処理DAG50Aから直列に連結された複数の画像処理モジュール38を抽出する。そして、抽出した複数の画像処理モジュール38を合成モジュール52に置き換えて、合成モジュール52を同一のプロセッサ・コアに実行させる。これにより、同じ領域の画像データを処理対象とする画像処理モジュール38による画像処理は同一のプロセッサ・コアにより実行される結果、プロセッサ・コア間でのスレッドの移送、及び画像データの転送の頻度が抑制される。従って、複数の画像処理の各々を異なるプロセッサ・コア上で実行する場合に比較して、高速に画像処理を行うことができる。
さらに、本実施の形態によれば、合成モジュール52を同一のプロセッサ・コアに実行させているので、キャッシュメモリのヒット率も向上する。これにより、複数の画像処理の各々を異なるプロセッサ・コア上で実行する場合に比較して、高速に画像処理を行うことができる。
また、本実施の形態によれば、入力画像データを複数の分割画像データに分割して、分割画像データ単位で画像処理を実行している。これにより、画像処理が並列に実行される度合が向上する結果、より高速に画像処理を行うことができる。
なお、上記実施の形態では、入力画像データを複数の分割画像データに分割する場合について説明したが、これに限定されない。例えば、入力画像データを分割せずに入力画像データに対して画像処理を行う形態としてもよい。この場合の形態例として、画像処理DAG50Bに従って画像処理を実行する形態が例示される。
また、上記実施の形態では、画像処理DAG50Cによる画像処理を第2演算部12Bに実行させる場合について説明したが、これに限定されない。例えば、画像処理DAG50Cによる画像処理を第1演算部12Aに実行させる形態としてもよいし、第1演算部12A及び第2演算部12Bの双方に実行させる形態としてもよい。
また、上記実施の形態では、各種プログラムが記憶部20に予め記憶(インストール)されている態様を説明したが、これに限定されない。各種プログラムは、CD-ROM、DVD-ROM(Digital Versatile Disk Read Only Memory)、USB(Universal Serial Bus)メモリ等の記録媒体に記録された形態で提供されてもよい。また、各種プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。
2016年3月24日出願の日本国特許出願2016-060523号の開示は、その全体が参照により本明細書に取り込まれる。
本明細書に記載された全ての文献、特許出願、及び技術規格は、個々の文献、特許出願、及び技術規格が参照により取り込まれることが具体的かつ個々に記された場合と同程度に、本明細書中に参照により取り込まれる。
本明細書に記載された全ての文献、特許出願、及び技術規格は、個々の文献、特許出願、及び技術規格が参照により取り込まれることが具体的かつ個々に記された場合と同程度に、本明細書中に参照により取り込まれる。
10 コンピュータ
12A 第1演算部
12B 第2演算部
13 ローカルメモリ
14 メモリ
16 表示部
18 操作部
20 記憶部
22 画像データ供給部
24 画像出力部
26 バス
30 オペレーティングシステム
32 アプリケーションプログラム群
34 画像処理プログラム群
36 モジュールライブラリ
38 画像処理モジュール
39 部分処理
40 バッファモジュール
42 処理構築部
46 処理制御部
50A、50B、50C 画像処理DAG
52 合成モジュール
54 部分処理群
60 抽出部
62 合成部
64 分割部
66 実行部
68 出力部
B1~B3 分割画像
G 画像
12A 第1演算部
12B 第2演算部
13 ローカルメモリ
14 メモリ
16 表示部
18 操作部
20 記憶部
22 画像データ供給部
24 画像出力部
26 バス
30 オペレーティングシステム
32 アプリケーションプログラム群
34 画像処理プログラム群
36 モジュールライブラリ
38 画像処理モジュール
39 部分処理
40 バッファモジュール
42 処理構築部
46 処理制御部
50A、50B、50C 画像処理DAG
52 合成モジュール
54 部分処理群
60 抽出部
62 合成部
64 分割部
66 実行部
68 出力部
B1~B3 分割画像
G 画像
Claims (8)
- 複数のプロセッサ・コアを備えた画像処理装置であって、
画像処理を実行するためのオブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群から直列に連結された複数のオブジェクトを抽出する抽出部と、
前記抽出部により抽出された複数のオブジェクトの各々による画像処理を、前記複数のプロセッサ・コアの中の同一のプロセッサ・コアに実行させる実行部と、
を備えた画像処理装置。 - 前記抽出部は、前記直列に連結された複数のオブジェクトとして、前段に連結されたオブジェクト数が0又は1の複数のオブジェクトを抽出する
請求項1記載の画像処理装置。 - 前記実行部は、前記抽出部により抽出された複数のオブジェクトによる画像処理の実行対象とされる画像が複数の領域に分割された分割領域単位で、該抽出された複数のオブジェクトの各々による画像処理を同一のプロセッサ・コアに実行させ、かつ分割領域毎に該抽出された複数のオブジェクトの各々による画像処理を異なるプロセッサ・コアに実行させる
請求項1又は請求項2記載の画像処理装置。 - 前記抽出部により抽出された複数のオブジェクトによる画像処理の実行対象とされる画像を、前記プロセッサ・コアの数以下の複数の前記分割領域に分割する分割部をさらに備えた
請求項3記載の画像処理装置。 - 前記抽出部により抽出された複数のオブジェクトによる画像処理の実行対象とされる画像を、前記画像処理を実行する演算部が有するキャッシュメモリの容量以下のサイズで、複数の前記分割領域に分割する分割部をさらに備えた
請求項3記載の画像処理装置。 - 前記複数のプロセッサ・コアは、前記画像処理に用いられるキャッシュメモリを有する
請求項1から請求項5の何れか1項記載の画像処理装置。 - 複数のプロセッサ・コアを備えた画像処理装置による画像処理方法であって、
画像処理を実行するためのオブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群から直列に連結された複数のオブジェクトを抽出し、
抽出した複数のオブジェクトの各々による画像処理を、前記複数のプロセッサ・コアの中の同一のプロセッサ・コアに実行させる
画像処理方法。 - コンピュータを、請求項1から請求項6の何れか1項記載の画像処理装置の抽出部、及び実行部として機能させるための画像処理プログラム。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201780019388.1A CN108885776B (zh) | 2016-03-24 | 2017-01-25 | 图像处理装置、图像处理方法及存储介质 |
| JP2018507079A JP6534492B2 (ja) | 2016-03-24 | 2017-01-25 | 画像処理装置、画像処理方法、及び画像処理プログラム |
| US16/134,974 US10949942B2 (en) | 2016-03-24 | 2018-09-19 | Image processing apparatus, image processing method, and image processing program |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016-060523 | 2016-03-24 | ||
| JP2016060523 | 2016-03-24 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US16/134,974 Continuation US10949942B2 (en) | 2016-03-24 | 2018-09-19 | Image processing apparatus, image processing method, and image processing program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2017163591A1 true WO2017163591A1 (ja) | 2017-09-28 |
Family
ID=59901143
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2017/002573 Ceased WO2017163591A1 (ja) | 2016-03-24 | 2017-01-25 | 画像処理装置、画像処理方法、及び画像処理プログラム |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US10949942B2 (ja) |
| JP (1) | JP6534492B2 (ja) |
| CN (1) | CN108885776B (ja) |
| WO (1) | WO2017163591A1 (ja) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021018711A (ja) * | 2019-07-23 | 2021-02-15 | 富士通株式会社 | タスク実行管理装置、タスク実行管理方法、および、タスク実行管理プログラム |
| KR20210047952A (ko) * | 2018-09-11 | 2021-04-30 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Dag을 순차적으로 계산하기 위한 이종 스케줄링 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7039424B2 (ja) * | 2018-08-31 | 2022-03-22 | 富士フイルム株式会社 | 画像処理装置、画像処理方法、及び画像処理プログラム |
| CN112750079A (zh) * | 2020-12-29 | 2021-05-04 | 深圳市鸿合创新信息技术有限责任公司 | 图像处理方法、装置及一体机 |
| GB2602475B (en) * | 2020-12-31 | 2023-09-13 | Seechange Tech Limited | Method and system for processing image data |
| US12075016B1 (en) | 2023-12-11 | 2024-08-27 | Ricoh Company, Ltd. | Reordered multibit halftone processing with a threshold array |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008181386A (ja) * | 2007-01-25 | 2008-08-07 | Internatl Business Mach Corp <Ibm> | マルチコア・プロセッサにより演算を行う技術 |
| JP2009054001A (ja) * | 2007-08-28 | 2009-03-12 | Fujifilm Corp | 画像処理装置及びプログラム |
| JP2013020580A (ja) * | 2011-07-14 | 2013-01-31 | Internatl Business Mach Corp <Ibm> | 並列化方法、システム、及びプログラム |
Family Cites Families (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4694270B2 (ja) * | 2005-06-03 | 2011-06-08 | 富士ゼロックス株式会社 | 画像処理装置、方法及びプログラム |
| US7554550B2 (en) * | 2005-06-24 | 2009-06-30 | Microsoft Corporation | Non-destructive processing of digital image data |
| JP2007287084A (ja) * | 2006-04-20 | 2007-11-01 | Fuji Xerox Co Ltd | 画像処理装置及びプログラム |
| US20110066830A1 (en) | 2009-09-11 | 2011-03-17 | Andrew Wolfe | Cache prefill on thread migration |
| JP2011048579A (ja) * | 2009-08-26 | 2011-03-10 | Univ Of Tokyo | 画像処理装置及び画像処理方法 |
| JP2012118932A (ja) | 2010-12-03 | 2012-06-21 | Fuji Xerox Co Ltd | 情報処理装置及びプログラム |
| CN102193826B (zh) * | 2011-05-24 | 2012-12-19 | 哈尔滨工程大学 | 一种异构多核处理器高效任务调度方法 |
| JP5479519B2 (ja) * | 2012-03-30 | 2014-04-23 | 富士フイルム株式会社 | 画像処理装置、方法及びプログラム |
| JP6011006B2 (ja) * | 2012-04-27 | 2016-10-19 | ブラザー工業株式会社 | 液滴噴射装置 |
| CN102707952A (zh) * | 2012-05-16 | 2012-10-03 | 上海大学 | 嵌入式异构多核处理器上基于用户描述的程序设计方法 |
| US9384522B2 (en) * | 2012-12-28 | 2016-07-05 | Qualcomm Incorporated | Reordering of command streams for graphical processing units (GPUs) |
| JP2014164664A (ja) | 2013-02-27 | 2014-09-08 | Nec Corp | タスク並列処理方法、装置及びプログラム |
| CN103336713A (zh) * | 2013-06-19 | 2013-10-02 | 西北工业大学 | 一种基于任务复制与聚簇的并行任务分配方法 |
| US9934043B2 (en) * | 2013-08-08 | 2018-04-03 | Linear Algebra Technologies Limited | Apparatus, systems, and methods for providing computational imaging pipeline |
| AU2013260722A1 (en) * | 2013-11-22 | 2015-06-11 | Canon Kabushiki Kaisha | Scheduling interpreting and rasterising tasks in a multi-threaded RIP |
| US9223551B1 (en) * | 2014-07-22 | 2015-12-29 | Here Global B.V. | Rendergraph compilation method and use thereof for low-latency execution |
| US9652817B2 (en) * | 2015-03-12 | 2017-05-16 | Samsung Electronics Co., Ltd. | Automated compute kernel fusion, resizing, and interleave |
| US9965824B2 (en) * | 2015-04-23 | 2018-05-08 | Google Llc | Architecture for high performance, power efficient, programmable image processing |
| US10387988B2 (en) * | 2016-02-26 | 2019-08-20 | Google Llc | Compiler techniques for mapping program code to a high performance, power efficient, programmable image processing hardware platform |
-
2017
- 2017-01-25 CN CN201780019388.1A patent/CN108885776B/zh active Active
- 2017-01-25 WO PCT/JP2017/002573 patent/WO2017163591A1/ja not_active Ceased
- 2017-01-25 JP JP2018507079A patent/JP6534492B2/ja active Active
-
2018
- 2018-09-19 US US16/134,974 patent/US10949942B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008181386A (ja) * | 2007-01-25 | 2008-08-07 | Internatl Business Mach Corp <Ibm> | マルチコア・プロセッサにより演算を行う技術 |
| JP2009054001A (ja) * | 2007-08-28 | 2009-03-12 | Fujifilm Corp | 画像処理装置及びプログラム |
| JP2013020580A (ja) * | 2011-07-14 | 2013-01-31 | Internatl Business Mach Corp <Ibm> | 並列化方法、システム、及びプログラム |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20210047952A (ko) * | 2018-09-11 | 2021-04-30 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Dag을 순차적으로 계산하기 위한 이종 스케줄링 |
| JP2022500755A (ja) * | 2018-09-11 | 2022-01-04 | ホアウェイ・テクノロジーズ・カンパニー・リミテッド | 順次計算dagのための異種スケジューリング |
| KR102579058B1 (ko) * | 2018-09-11 | 2023-09-14 | 후아웨이 테크놀러지 컴퍼니 리미티드 | Dag을 순차적으로 계산하기 위한 이종 스케줄링 |
| US12197955B2 (en) | 2018-09-11 | 2025-01-14 | Huawei Technologies Co., Ltd. | Heterogeneous scheduling for sequential compute DAG |
| JP2021018711A (ja) * | 2019-07-23 | 2021-02-15 | 富士通株式会社 | タスク実行管理装置、タスク実行管理方法、および、タスク実行管理プログラム |
| JP7367365B2 (ja) | 2019-07-23 | 2023-10-24 | 富士通株式会社 | タスク実行管理装置、タスク実行管理方法、および、タスク実行管理プログラム |
Also Published As
| Publication number | Publication date |
|---|---|
| US10949942B2 (en) | 2021-03-16 |
| CN108885776A (zh) | 2018-11-23 |
| JPWO2017163591A1 (ja) | 2018-08-09 |
| US20190019270A1 (en) | 2019-01-17 |
| CN108885776B (zh) | 2022-09-27 |
| JP6534492B2 (ja) | 2019-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10650481B2 (en) | Image processing device, image processing method, and non-transitory computer readable medium for image processing | |
| US10949942B2 (en) | Image processing apparatus, image processing method, and image processing program | |
| US10795725B2 (en) | Image processing device, image processing method, and non-transitory computer readable medium for image processing | |
| US10878526B2 (en) | Image processing apparatus, image processing method, and image processing program | |
| US11257178B2 (en) | Image processing device, image processing method, and storage medium | |
| US11341599B2 (en) | Image processing apparatus, image processing method, and computer readable medium storing image processing program | |
| US11315212B2 (en) | Image processing apparatus, image processing method, and computer readable medium for executing partial processes on image-section data items | |
| JP7039424B2 (ja) | 画像処理装置、画像処理方法、及び画像処理プログラム | |
| US10783604B2 (en) | Image processing apparatus, image processing method, and image processing program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2018507079 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17769638 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17769638 Country of ref document: EP Kind code of ref document: A1 |