WO2017163441A1 - 画像処理装置、画像処理方法、及び画像処理プログラム - Google Patents

画像処理装置、画像処理方法、及び画像処理プログラム Download PDF

Info

Publication number
WO2017163441A1
WO2017163441A1 PCT/JP2016/072031 JP2016072031W WO2017163441A1 WO 2017163441 A1 WO2017163441 A1 WO 2017163441A1 JP 2016072031 W JP2016072031 W JP 2016072031W WO 2017163441 A1 WO2017163441 A1 WO 2017163441A1
Authority
WO
WIPO (PCT)
Prior art keywords
image processing
image data
task
processing
image
Prior art date
Application number
PCT/JP2016/072031
Other languages
English (en)
French (fr)
Inventor
長尾 隆
和幸 板垣
昂生 竹本
Original Assignee
富士ゼロックス株式会社
富士フイルム株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士ゼロックス株式会社, 富士フイルム株式会社 filed Critical 富士ゼロックス株式会社
Priority to US15/781,790 priority Critical patent/US10650481B2/en
Priority to JP2018506749A priority patent/JP6632709B2/ja
Priority to CN201680078443.XA priority patent/CN108463836B/zh
Publication of WO2017163441A1 publication Critical patent/WO2017163441A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0207Addressing or allocation; Relocation with multidimensional access, e.g. row/column, matrix
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0877Cache access modes
    • G06F12/0884Parallel mode, e.g. in parallel with main memory or CPU
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1048Scalability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory
    • G06F2212/603Details of cache memory of operating mode, e.g. cache mode or local memory mode

Definitions

  • the present invention relates to an image processing apparatus, an image processing method, and an image processing program.
  • Patent Document 1 a graph structure representing a combination of program modules is converted into a graph structure in which nodes are divided for each divided input data, and nodes that have been processed in the preceding node of the converted graph structure are processed in parallel An information processing apparatus is disclosed.
  • Non-Patent Document 1 and Non-Patent Document 2 disclose a technique for performing image processing in parallel according to the execution order of image processing represented by a DAG (Directed Acyclic Graph: directed acyclic graph). Has been.
  • DAG Directed Acyclic Graph: directed acyclic graph
  • the processing efficiency of the image processing may be lowered.
  • An object of at least an embodiment of the present invention is to improve the processing efficiency of image processing compared to a case where partial processing corresponding to divided image data obtained by dividing image data to be subjected to image processing is executed in parallel by a plurality of arithmetic devices.
  • an image processing apparatus that executes image processing with each object of an object group in which a plurality of objects are connected in a directed acyclic graph form.
  • the image processing apparatus includes a division unit that divides image data to be subjected to image processing into first-size divided image data, and a front-rear dependency for each partial process that is image processing performed on the divided image data.
  • a re-dividing unit that re-divides the divided image data corresponding to the partial processing determined to be processable based on a relationship into re-divided image data having a second size smaller than the first size; and the re-divided image data
  • a control unit that performs control to cause a plurality of arithmetic devices to execute in parallel the subdivision partial processing that is image processing performed on the computer.
  • control unit performs the re-division for an arithmetic device that executes partial processing using only a memory included in the plurality of arithmetic devices. Instead of image data, control for executing partial processing on the divided image data may be performed.
  • the first size is calculated from the plurality of arithmetic devices among the plurality of cache memories used by the plurality of arithmetic devices to execute the partial processing.
  • the size based on the capacity of the farthest level cache memory and the number of partial processes that can be stored in a task queue for each of the plurality of arithmetic devices to sequentially retrieve and execute the stored partial processes There may be.
  • the second size is the number of the cache memories used by the plurality of arithmetic devices for executing the subdivision partial processing.
  • the cache memory may have a size equal to or smaller than the capacity of the cache memory at a level closer to the plurality of arithmetic devices than the cache memory at the level farthest from the plurality of arithmetic devices.
  • the control unit performs a second operation that executes partial processing using only a memory included in the control device among the plurality of arithmetic devices.
  • the second arithmetic unit executes an execution instruction task that instructs the second arithmetic unit to execute the partial processing, and then executes the second arithmetic unit.
  • An end detection task for detecting the end of the partial process in the calculation unit may be repeatedly executed by the first calculation unit until the end is detected.
  • an image processing method by an image processing apparatus that executes image processing with each object of an object group in which a plurality of objects are connected in a directed acyclic graph form.
  • the image data to be subjected to the image processing is divided into divided image data of a first size, and for each partial process that is image processing performed on the divided image data, there is a dependency before and after.
  • Image processing performed on the re-divided image data by re-dividing the divided image data corresponding to the partial processing determined to be processable based on the re-divided image data having a second size smaller than the first size.
  • the re-partitioning partial process is performed by a plurality of arithmetic devices in parallel.
  • image processing for causing a computer to function as the dividing unit, the re-dividing unit, and the control unit of the image processing device according to any one of [1] to [5] A program is provided.
  • partial processing corresponding to the divided image data obtained by dividing the image data to be subjected to image processing is executed in parallel by a plurality of arithmetic devices. Compared with the case where it carries out, the parallel processing which raised the processing efficiency of image processing is realizable.
  • the device [3] it is possible to set the size appropriately according to the number of arithmetic devices that execute parallel processing.
  • 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 which shows an example 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 division
  • 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. Further, 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) or a mobile phone.
  • PC Personal Computer
  • PDA Personal Digital Assistant
  • 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 is provided. 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) having a plurality of processor cores 13 (hereinafter referred to as “core 13”) as an example.
  • Each core 13 is an example of an arithmetic device that executes image processing.
  • the description will be made by adding an alphabet at the end of the reference numerals, such as the cores 13A and 13B.
  • the 2nd calculating part 12B which concerns on this embodiment is GPU (Graphics Processing Unit) which has the local memory 15 inside as an example.
  • the second calculation unit 12B is not particularly limited as long as the second calculation unit 12B includes an internal memory such as the local memory 15 and performs image processing on image data stored in the internal memory.
  • a CPU may be used.
  • the second calculation unit 12B may be a GPU built in the first calculation unit 12A.
  • the first arithmetic unit 12A and the second arithmetic unit 12B may be an arithmetic unit such as an FPGA (Field Programmable Gate Array).
  • the memory 14 is a non-volatile storage unit in which the first arithmetic unit 12A temporarily stores data.
  • the first calculation unit 12A sends 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. Then, the second calculation unit 12B stores the image data transferred from the first calculation unit 12A in the local memory 15, and performs image processing on the stored image data.
  • 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.
  • 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 may be a non-volatile 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 an image represented by 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.
  • 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 and instructing the execution of the image processing by the constructed image processing DAG 50A. providing.
  • the development of a program for performing the image processing requires image processing required for the arbitrary device.
  • the application 32 to be executed by the image processing program group 34 may be developed using the interface. This eliminates the need for the developer to newly develop a program that actually performs image processing, thereby reducing the load on the developer.
  • 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 image processing module 38 that performs enlargement / reduction processing reduces the vertical / horizontal size of an image to 50% by thinning the input image data every other pixel in both the horizontal and vertical directions.
  • An image processing module 38 that performs processing is prepared. Further, for example, as the image processing module 38 that performs the enlargement / reduction process, an image processing module 38 that performs the enlargement / reduction process with the specified enlargement / reduction ratio for the 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.
  • an 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 executes image processing on input image data.
  • the image processing module 38 connected to the preceding stage via the buffer module 40 completes the image processing by the preceding image processing module 38
  • the image processing module 38 It is shown that it is possible to execute.
  • the image processing module 38 in which the plurality of image processing modules 38 are connected to the preceding stage via the buffer module 40 This indicates that it is possible to execute its own image processing.
  • FIG. 2A shows a DAG in which only each module is connected in the order of processing.
  • this DAG is executed, input 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 the processed output image data is stored in the memory 14.
  • the processing control unit 46 includes a division unit 60, a re-division unit 61, a control unit 62, a task queue 64, and an output unit 66.
  • the dividing unit 60 converts image data to be subjected to image processing (hereinafter, “image processing target” is simply referred to as “processing target”) out of input image data into a plurality of divided images having a first size. Divide into data.
  • image processing target is simply referred to as “processing target”
  • Divide into data as a specific example, an image indicated by a portion to be processed of input image data is divided into a plurality of partial regions (hereinafter referred to as “divided images”).
  • the dividing unit 60 divides a plurality of (three in the example illustrated in FIG. 4) divided images of the image G indicated by the portion to be processed of the input image data according to the first size. Divide into B1 to B3.
  • the portion to be processed of the input image data means a portion to be processed by the entire input image data in the image processing for processing the entire input image as in the color conversion processing.
  • the part to be processed of the input image data means a part of the input image in an image process in which a part of the input image is to be processed, such as a trimming process.
  • input image data a portion to be processed of input image data is simply referred to as “input image data”.
  • the dividing unit 60 divides the image G vertically in front view, but the present invention is not limited to this.
  • the dividing unit 60 may divide the image G into the front view left and right, or the front view up and down and left and right.
  • the first size at which the dividing unit 60 divides the input image data is the cache memory at the farthest level from the processor of the arithmetic unit that executes image processing by the image processing module 38, so-called LLC (Last Level). Cache) capacity is divided by the number of tasks T (details will be described later) stored in the task queue 64 (fractions after the decimal point are rounded down).
  • the first size is not limited to this embodiment. However, the first size is equal to or larger than the value obtained by dividing the capacity of the cache memory other than the cache memory provided for each core 13 other than LLC by the number of tasks T stored in the task queue 64, and the LLC capacity is stored in the task queue 64. It is preferable that the value is equal to or smaller than the value divided by the number of tasks T to be performed.
  • the re-dividing unit 61 divides the divided image data into second-size re-divided image data.
  • the re-dividing unit 61 further divides (re-divides) the divided image.
  • the re-division unit 61 divides the divided images B1 to B3 into a plurality of re-divided images C11 (two in the example shown in FIG. 4, two in total in the example shown in FIG. 4). Subdivide into ⁇ C32.
  • the task of the second size re-divided image data (task t, details will be described later) has a fine granularity
  • the first size divided image data task task T, details will be described later has a medium granularity
  • the second size by which the re-dividing unit 61 divides the input image data is smaller than the first size.
  • the second size is set to be equal to or smaller than the capacity of a so-called L1 (Level 1) cache that is closest to the processor of the arithmetic unit that executes image processing by the image processing module 38.
  • the control unit 62 performs control for causing the plurality of cores 13 to execute tasks corresponding to the re-divided image data in parallel.
  • parallel here means that tasks that can be executed based on the dependency relationship are executed in parallel (simultaneously) by the plurality of cores 13.
  • the control unit 62 performs image processing executed by each image processing module 38 of the image processing DAG 50A as divided image data (divided image data divided by the dividing unit 60). And the image processing DAG 50A is updated to the image processing DAG 50B.
  • the image processing DAG 50B represents the DAG in the task of each partial process 39, and is a so-called task DAG.
  • FIG. 5 shows an image processing DAG 50B when the input image data is divided into four divided image data in the image processing DAG 50A shown in FIG. 2A.
  • the buffer module 40 is not shown in order to avoid complications.
  • control unit 62 includes a partial process 39 of the image processing module 38 connected to the previous stage and an image processing module 38 connected to the subsequent stage.
  • Dependency relationship is given to the partial processing 39. In FIG. 5, this dependency relationship is indicated by a broken-line 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. That is, when the partial processing 39 of the image processing module 38 connected in the previous stage is completed between the connected image processing modules 38, the dependency processing 39 of the image processing module 38 connected in the subsequent stage is completed.
  • each partial process 39 can be executed when there is no partial process 39 to which the dependency relationship is given in the previous stage or when all the partial processes 39 in the previous stage to which the dependency relation is given are completed.
  • the partial processing 39A and the partial processing 39B shown in FIG. 5 can be executed at the start of execution of the image processing. Further, for example, the partial process 39C shown in FIG. 5 can be executed when both the partial process 39A and the partial process 39B in the preceding stage to which the dependency relationship is given are completed.
  • the partial process 39 corresponding to the divided image data is referred to as “task T”.
  • the subdivision partial process corresponding to the subdivision image data is referred to as “task t”.
  • the task T and the task t are collectively referred to without being distinguished, they are simply referred to as “tasks”.
  • subdividing the divided image data corresponding to the task T into the subdivided image data corresponding to the task t such as “subdividing the task T into the task t” or the like. That's it.
  • the control unit 62 stores the task T that can be executed in the task queue 64 for each of the cores 13 to sequentially extract and execute the stored task.
  • the number of tasks T simultaneously stored in the task queue 64 by the control unit 62 of this embodiment is two or less.
  • the number of tasks T stored simultaneously in the task queue 64 is not limited to this embodiment, but is preferably two or more.
  • the number of cores 13 that are not operated increases, and the operating rate of the core 13 decreases.
  • the task queue 64 does not limit the number of tasks T that can be stored at the same time, memory is secured for all tasks T stored in the task queue 64 in the preprocessing (described later in detail). Memory capacity to be increased. Therefore, by limiting the number of tasks T that can be stored in the task queue 64 at the same time, an increase in the amount of resources such as memory secured in the preprocessing is suppressed. Therefore, the number of tasks T that can be simultaneously stored in the task queue 64 may be determined according to the memory capacity or the like, or may be variable according to the operating rate of the core 13.
  • control unit 62 stores the task t corresponding to the re-divided image data re-divided by the re-division unit 61 in the task queue 64.
  • the output unit 66 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 50B under the control of the control unit 62.
  • the output unit 66 displays an output image indicated by the obtained output image data on the display unit 16.
  • the output unit 66 may output (transmit) the output image data to an external device.
  • the output unit 66 may output (form) an output image indicated by the output image data on a recording material such as paper.
  • FIG. 6 is a flowchart showing a flow of DAG construction / execution processing executed by the first arithmetic unit 12A when an instruction to start execution of image processing is input by the application 32.
  • a DAG construction / execution processing program (DAG construction / execution processing program) is installed in the storage unit 20 in advance. Further, the core 13 that can execute a task without executing any task in the first arithmetic unit 12A executes the DAG construction / execution processing program, thereby functioning as the processing construction unit 42 and the control unit 62 described above.
  • the process construction unit 42 constructs an image processing DAG 50A that performs image processing instructed by the application 32 in accordance with the construction instruction from the application 32. Further, the processing construction unit 42 updates the image processing DAG 50A to the image processing DAG 50B as described above. In this embodiment, information of the second size for re-dividing each task T is added at this time.
  • control unit 62 and the process construction unit 42 cause the first computation unit 12A (core 13) and the second computation unit 12B to execute the image processing by the image processing DAG 50B constructed in step 100.
  • the DAG construction / execution process ends.
  • the image processing result desired by the application 32 is obtained from the output unit 66.
  • the control unit 62 notifies the application 32 of information indicating the completion of the process.
  • the control unit 62 notifies the application 32 of information indicating that fact.
  • the DAG construction / execution process of the present embodiment includes a task storage process for storing an executable task T of the image processing DAG 50B in the task queue 64, a task execution process for executing a task stored in the task queue 64, Two processes are included.
  • FIG. 7 is a flowchart showing the flow of task storage processing.
  • a task storage processing program (task storage processing program) is preinstalled in the storage unit 20 as a part of the DAG construction / execution processing program or another so-called subprogram.
  • the core 13 that can execute the task without executing any task in the first arithmetic unit 12A executes the task storage processing program, thereby functioning as the control unit 62 and executes the task storage processing illustrated in FIG. .
  • the control unit 62 determines whether or not an executable task T is stored in the task queue 64. At this time, even if a task other than the task T (task t in this embodiment) is stored in the task queue 64, it is not involved in this determination. In the present embodiment, when the number of executable tasks T stored in the task queue 64 is 2 or more, the control unit 62 proceeds to step 114 as an affirmative determination.
  • control unit 62 makes a negative determination in step 110 and proceeds to step 112.
  • step 112 the control unit 62 finds an executable task from the image processing DAG 50B and stores it in the task queue 64.
  • the example shown in FIG. 8 shows a state where the task T that can be executed (hatched) by the image processing DAG 50B is stored in the task queue 64.
  • the number of tasks T stored in the task queue 64 may be two or less, and the number of tasks T that the control unit 62 simultaneously stores in the task queue 64 in this step is one. There may be two or two. Specifically, when the task T is not stored in the task queue 64, the control unit 62 may store one or two tasks T, and the task queue 64 stores one task T. In this case, the task queue 64 may store one task T. Whether the task queue 64 stores the number of tasks T to be simultaneously stored in the task queue 64 in this step may be determined in advance or may be variable according to the progress of task processing in each core 13. .
  • the control unit 62 determines whether or not all tasks T of the image processing DAG 50B have been stored in the task queue 64. When there is a task T that is not yet stored in the task queue 64, the control unit 62 returns to step 110 and repeats the task storage process as a negative determination. On the other hand, when all the tasks T are stored in the task queue 64, the control unit 62 ends the task storing process as an affirmative determination.
  • FIG. 9 is a flowchart showing the flow of task execution processing.
  • a task execution processing program (task execution processing program) is preinstalled in the storage unit 20 as a part of the DAG construction / execution processing program or another so-called subprogram.
  • Each of the cores 13 that can execute a task without executing any task in the first arithmetic unit 12A executes the task execution processing program, thereby functioning as the control unit 62 and performing the task execution processing shown in FIG. Execute.
  • the task storage process and the task execution process are executed in parallel by executing the task storage process and the task execution process on different cores 13.
  • control unit 62 acquires a task from the task queue 64 in step 120 of FIG.
  • the task acquired here may be a task T or may be another task (task t in this embodiment).
  • control unit 62 determines whether or not the acquired task is the task T.
  • control unit 62 proceeds to step 118 as an affirmative determination.
  • step 124 the control unit 62 performs pre-processing that is predetermined in the execution of the task T, and then proceeds to step 126.
  • the pre-processing to be executed in this step is predetermined processing to be performed before image processing, and is not particularly limited. For example, for securing an output buffer area for storing image processing results or for image processing This is processing for securing resources for operations such as initialization of variables.
  • control unit 62 proceeds to step 126 as a negative determination.
  • step 126 the control unit 62 determines whether or not the task acquired in step 120 can be subdivided.
  • the subdivision unit 61 does not perform subdivision.
  • processing added as overhead such as transfer of image data to the local memory 15 and activation of the second calculation unit 12B, executes the task by the first calculation unit 12A. Bigger than the case. Since this overhead occurs for each task, when task T is subdivided into tasks t, the overhead increases corresponding to the increase in the number of tasks. Therefore, in the present embodiment, for the task T that executes the image processing by the second arithmetic unit 12B, the image processing is executed as it is without re-division.
  • the task T is a task for executing the image processing by the second arithmetic unit 12B
  • the subdivision is impossible.
  • Information indicating whether or not the task T is a task to be executed by the second arithmetic unit 12B is obtained from the image processing DAG 50A by the processing construction unit 42 in step 100 of the DAG construction / execution processing (see FIG. 6). It is given when generating DAG50B.
  • the acquired task is a task executed by the core 13 of the first arithmetic unit 12A, and the size of the image data (divided image data or re-divided image data) corresponding to the acquired task corresponds to the task t. Even when the size is equal to or larger than the size of the divided image data (in this embodiment, the size of the divided image data corresponding to the task T), the re-division is impossible.
  • the control unit 62 can perform the subdivision. As a positive determination, the process proceeds to step 128.
  • step 128 the re-dividing unit 61 divides the task (task T in the present embodiment) by the second size described above to obtain a task t.
  • the re-division unit 61 of the present embodiment re-divides the task acquired in step 120 to obtain a task t.
  • a case where the core 13C subdivides the task T into three tasks t is illustrated.
  • all the tasks T are subdivided into tasks t to obtain a plurality of tasks t.
  • control unit 62 stores all the tasks t obtained by subdivision in the task queue 64, and then returns to step 120.
  • control unit 62 makes a negative determination and proceeds to step 132.
  • step 132 the control unit 62 causes the core 13 or the second calculation unit 12B of the first calculation unit 12A to execute the task.
  • the core 13 of the first arithmetic unit 12A performs a process for causing the second arithmetic unit 12B to execute the task T, whereby the second arithmetic unit 12B performs the task T. Is executed.
  • the control unit 62 determines whether or not the task executed in step 132 is the last task t. Specifically, the control unit 62 determines whether or not the task executed in step 132 is the task t and the task t having the same subdivision source task T is not stored in the task queue 64, that is, all of them. It is determined whether or not task t has been executed.
  • control unit 62 If it is not the last task t, the control unit 62 returns to step 120 as a negative determination. On the other hand, in the case of the last task t, the control unit 62 proceeds to step 136 as an affirmative determination.
  • step 136 the control unit 62 performs post-processing.
  • the post-processing executed in this step is a process that is determined in advance to be performed after the partial processing corresponding to the task T, and is not particularly limited.
  • the calculation resources secured in the processing in step 124 are released. It is a process to perform.
  • the task queue 64 notifies the process construction unit 42 of completion of the task T, and then ends the task execution process.
  • the process construction unit 42 updates the dependency relationship of the image processing DAG 50B. As described above, when the dependency relationship of the image processing DAG 50B is updated, in the task storage processing (see FIG. 7) described above, the process construction unit 42 determines an executable task T based on the updated dependency relationship. To do.
  • the core 13 executes the task T and instructs the CPU
  • the GPU is activated and controlled, and the task T is executed by the GPU.
  • the configuration is the same as the task T executed by the normal CPU, but the GPU in FIG. 10B
  • the core 13 is in a standby state until the processing is completed, and wasteful operation occurs in the operation of the core 13.
  • the core 13 performs GPU processing 1 and GPU processing 2. Since another task can be executed in parallel, the operation rate is improved.
  • the core 13 instructs to asynchronously process each of the transfer to the GPU, the processing, and the transfer of the processing result from the GPU (tasks T0 to T3).
  • the core 13 executes a task T4 for detecting the end of the task in the GPU, and re-injects the end detection task T4 into the task queue 64 when the end is not detected.
  • the core 13 removes a task different from the task T4 from the task queue 64 and proceeds with the processing, so that the standby state described with reference to FIG. 10B is eliminated, and waste in the operation of the core 13 is suppressed.
  • the task T executed by the GPU equalizes (including errors) the processing time on the GPU and the transfer time from the memory 14 to the local memory 15 and the transfer time from the local memory 15 to the memory 14. Therefore, since the transfer time is hidden, the performance such as the processing speed is further improved.
  • the computer 10 is a computer 10 that executes image processing using each object of an object group in which a plurality of objects that execute image processing are connected in a directed acyclic graph form.
  • the division unit 60 that divides the image data to be processed into first-size divided image data and the partial processing that is image processing performed on the divided image data are determined to be processable based on the preceding and following dependencies.
  • a re-dividing unit 61 that re-divides the divided image data corresponding to the divided partial processing into re-divided image data of a second size smaller than the first size, and re-division that is image processing performed on the re-divided image data
  • a control unit 62 that performs control to execute the partial processing in parallel with the plurality of first calculation units 12A (core 13) and the second calculation unit 12B.
  • the overhead due to the parallel processing is reduced by executing the task T corresponding to the divided image data obtained by dividing the image data by the first size larger than the second size. Further, by executing the task t corresponding to the divided image data obtained by re-dividing the divided image data with the second size, the operating rate of the core 13 and the second arithmetic unit 12B is improved and the necessary data amount is increased. Therefore, cache miss hits are less likely to occur.
  • step 134 (see FIG. 9) of the task execution process, all the tasks T are subdivided in advance in step 128, subdivided into a plurality of tasks t, and stored in the task queue 64.
  • the determination method is not limited to this. For example, when a counter having a shared pointer shared by each core 13 is linked to task T, the initial value of the counter is set to 0, and one task t is subdivided from task T (or one task t is (When stored in the task queue 64), the counter is incremented by 1.
  • the execution of the task t is completed (or when the task t is taken out from the task queue 64), the counter value is decremented by decrementing the counter. When it becomes 0, it may be determined that the task is the last task t.
  • the second calculation unit 12B may be provided inside the computer 10 in the present embodiment.
  • the second calculation unit 12B may be provided outside the computer 10, or It may be provided on a different computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Image Processing (AREA)

Abstract

オブジェクトがDAG形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行するコンピュータは、対象となる画像データを第1サイズの分割画像データに分割する分割部と、分割画像データに対する部分処理毎に、前後の依存関係に基づいて処理可能と判定された部分処理に対応する分割画像データを第1サイズよりも小さい第2サイズの再分割画像データに再分割する再分割部と、再分割画像データに対する再分割部分処理を複数の第1演算部及び第2演算部に並列して実行させる制御を行う制御部とを備える。

Description

画像処理装置、画像処理方法、及び画像処理プログラム
 本発明は、画像処理装置、画像処理方法、及び画像処理プログラムに関する。
 特許文献1には、プログラムモジュールの組合せを表したグラフ構造を、分割した入力データ毎にノードを分割したグラフ構造に変換し、変換したグラフ構造の先行ノードの処理が終わったノードを並列に処理する情報処理装置が開示されている。
 また、非特許文献1及び非特許文献2には、DAG(Directed Acyclic Graph:有向非循環(非巡回)グラフ)で表された画像処理の実行順序に従って、並列に画像処理を行う技術が開示されている。
日本国特許第4965995号公報
遅延モード画像処理フレームワーク、[online]、[平成28年3月11日検索]、インターネット<URL: http://www.isus.jp/article/library-special/deferred-mode-image-processing-framework/> The OpenVX Specification、[online]、[平成28年3月11日検索]、インターネット<URL: https://www.khronos.org/registry/vx/specs/1.0.1/OpenVX_Specification_1_0_1.pdf>
 画像処理の対象となる画像データを分割した分割画像データに対応する部分処理を複数の演算装置で並列に実行する場合、画像処理の処理効率が低下する場合があった。
 本発明の少なくとも実施形態の目的は、画像処理の対象となる画像データを分割した分割画像データに対応する部分処理を複数の演算装置で並列に実行する場合に比較して、画像処理の処理効率を高めた並列処理を実現できる画像処理装置、画像処理方法、及び画像処理プログラムを提供することである。
 [1] 本発明のある観点によれば、オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置が提供される。前記画像処理装置は、前記画像処理の対象となる画像データを第1サイズの分割画像データに分割する分割部と、前記分割画像データに対して行う画像処理である部分処理毎に、前後の依存関係に基づいて処理可能と判定された前記部分処理に対応する前記分割画像データを前記第1サイズよりも小さい第2サイズの再分割画像データに再分割する再分割部と、前記再分割画像データに対して行う画像処理である再分割部分処理を複数の演算装置に並列して実行させる制御を行う制御部と、を備える。
 [2] [1]に記載の画像処理装置において、前記制御部は、前記複数の演算装置のうち、自身が備えるメモリのみを用いて部分処理を実行する演算装置に対しては、前記再分割画像データに替わり、前記分割画像データに対する部分処理を実行させる制御を行ってもよい。
 [3] [1]または[2]に記載の画像処理装置において、前記第1サイズは、前記複数の演算装置が前記部分処理の実行に用いる複数のキャッシュメモリのうち、前記複数の演算装置から最も遠いレベルのキャッシュメモリの容量と、格納された前記部分処理を前記複数の演算装置の各々が順次取り出して実行するためのタスクキューに格納可能な前記部分処理の数と、に基づいたサイズであってもよい。
 [4] [1]から[3]のいずれかに記載の画像処理装置において、前記第2サイズは、前記複数の演算装置が前記再分割部分処理の実行に用いる複数のキャッシュメモリのうち、前記複数の演算装置から最も遠いレベルのキャッシュメモリよりも前記複数の演算装置に近いレベルのキャッシュメモリの容量以下のサイズであってもよい。
 [5] [1]から[4]のいずれかに記載の画像処理装置において、前記制御部は、前記複数の演算装置のうち、自身が備えるメモリのみを用いて部分処理を実行する第2演算部が他の第1演算部と非同期に前記部分処理を実行可能な場合、前記第2演算部に対する前記部分処理の実行を指示する実行指示タスクを前記第1演算部において実行後に、前記第2演算部における前記部分処理の終了を検知する終了検知タスクを、前記終了を検知するまで前記第1演算部に繰り返し実行させてもよい。
 [6] 本発明の他の観点によれば、オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置による画像処理方法が提供される。前記画像処理方法においては、前記画像処理の対象となる画像データを第1サイズの分割画像データに分割し、前記分割画像データに対して行う画像処理である部分処理毎に、前後の依存関係に基づいて処理可能と判定された前記部分処理に対応する前記分割画像データを前記第1サイズよりも小さい第2サイズの再分割画像データに再分割し、前記再分割画像データに対して行う画像処理である再分割部分処理を複数の演算装置に並列して実行させる制御を行う。
 [7] 本発明の他の観点によれば、コンピュータを、[1]から[5]のいずれかに記載の画像処理装置の分割部、再分割部、及び制御部として機能させるための画像処理プログラムが提供される。
 [1]の装置、[6]の方法、及び[7]のプログラムによれば、画像処理の対象となる画像データを分割した分割画像データに対応する部分処理を複数の演算装置で並列に実行する場合に比較して、画像処理の処理効率を高めた並列処理を実現できる。
 [2]の装置によれば、複数の演算装置のうち、自身が備えるメモリのみを用いて部分処理を実行する演算装置が再分割画像データに対応する再分割部分処理を実行する場合に比較して、処理の実行に要するオーバーヘッドの増加を抑制することができる。
 [3]の装置によれば、並列処理を実行する演算装置の数に応じて適切なサイズとすることができる。
 [4]の装置によれば、複数の演算装置の稼働率を向上させることができる。
 [5]の装置によれば、複数の演算装置の稼働率を向上させることができる。
実施形態に係る画像処理装置として機能するコンピュータの構成の一例を示すブロック図である。 画像処理DAGの一例を示す概略図である。 画像処理DAGに入出力用のメモリを加えた場合の一例を示す概略図である。 実施形態に係る処理制御部の機能的な構成の一例を示すブロック図である。 入力画像の分割処理の一例の説明に供する概略図である。 画像処理モジュールが部分処理に分割された画像処理DAGの一例を示す概略図である。 実施形態に係るDAG構築・実行処理の流れを示すフローチャートである。 実施形態に係るタスク格納処理の流れを示すフローチャートである。 実施形態に係る画像処理実行処理の説明に供する概略図である。 実施形態に係るタスク実行処理の流れを示すフローチャートである。 GPU処理である2つのタスクが連続して行われる場合における処理の流れの一例を示す概略図である。 第1演算部のコアと同期して第2演算部(GPU)が処理を行う場合における処理の流れの一例を示す概略図である。 第1演算部のコアと非同期に第2演算部(GPU)が処理を行う場合における処理の流れの一例を示す概略図である。
 以下、図面を参照して、本発明を実施するための形態例を詳細に説明する。
 まず、図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のメイン・プロセッサであり、一例として複数のプロセッサ・コア13(以下、「コア13」という。)を有するCPU(Central Processing Unit)である。なお、各コア13が、画像処理を実行する演算装置の一例である。また、以下では、各コア13を区別して説明する場合は、コア13A、コア13Bのように、符号の末尾にアルファベットを付して説明する。
 また、本実施形態に係る第2演算部12Bは、一例として内部にローカルメモリ15を有するGPU(Graphics Processing Unit)である。なお、第2演算部12Bは、ローカルメモリ15等の内部メモリを備え、内部メモリに記憶された画像データに対して画像処理を行う演算装置であれば、特に限定されず、例えば、CPUでもよい。また、第2演算部12Bは、第1演算部12Aに内蔵されたGPUでもよい。また、第1演算部12A及び第2演算部12Bは、FPGA(Field Programmable Gate Array)等の演算器でもよい。
 メモリ14は、第1演算部12Aが一時的にデータを記憶させる不揮発性の記憶手段である。本実施形態に係る第2演算部12Bにより画像処理を行う場合、第1演算部12Aはメモリ14又は記憶部20の記憶領域に記憶された画像データを第2演算部12Bにバス26を介して転送する。そして、第2演算部12Bは、第1演算部12Aから転送された画像データをローカルメモリ15に記憶し、記憶した画像データに対して画像処理を行う。
 コンピュータ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は、入力画像データに対して画像処理を実行するオブジェクトの一例である。また、図2Aに示す例は、バッファモジュール40を介して前段に画像処理モジュール38が連結された画像処理モジュール38について、前段の画像処理モジュール38による画像処理が終了した場合に、自身の画像処理の実行が可能となることを示している。また、図2Aに示す例は、バッファモジュール40を介して前段に複数の画像処理モジュール38が連結された画像処理モジュール38について、前段の複数の画像処理モジュール38の全ての画像処理が終了した場合に、自身の画像処理の実行が可能となることを示している。
 また、図2Aは、各モジュールのみが処理の順に接続されたDAGを示しているが、このDAGが実行される際には、図2Bに示すようにメモリ14に記憶された入力画像データが入力されてDAGに従って画像処理が行われる。そして、最終的にメモリ14に処理済みの出力画像データ等の処理結果が記憶される。
 次に、図3を参照して、本実施形態に係る処理制御部46の機能的な構成を説明する。図3に示すように、処理制御部46は、分割部60、再分割部61、制御部62、タスクキュー64、及び出力部66を備えている。
 本実施形態に係る分割部60は、入力画像データのうち、画像処理の対象(以下、「画像処理の対象」を単に「処理対象」という)となる画像データを第1サイズの複数の分割画像データに分割する。本実施形態では、具体例として、入力画像データの処理対象とする部分により示される画像を、複数の部分領域(以下、「分割画像」という。)に分割する。一例として図4に示すように、分割部60は、入力画像データの処理対象となる部分により示される画像Gを、第1サイズに応じて複数(図4に示す例では3つ)の分割画像B1~B3に分割する。入力画像データの処理対象とする部分は、色変換処理のように入力画像全体を処理対象とする画像処理では、入力画像データ全体が処理対象とする部分を意味する。また、入力画像データの処理対象とする部分は、切り抜き(トリミング)処理のように、入力画像の一部を処理対象とする画像処理では、入力画像の一部を意味する。以下では、錯綜を回避するために、入力画像データの処理対象とする部分を、単に「入力画像データ」という。
 また、図4に示した例では、分割部60が画像Gを正面視上下に分割しているが、これに限定されない。例えば分割部60は画像Gを正面視左右に分割してもよいし、正面視上下左右に分割してもよい。
 なお、本実施形態では、分割部60が入力画像データを分割する上記第1サイズは、画像処理モジュール38による画像処理を実行する演算部のプロセッサから最も遠いレベルのキャッシュメモリ、いわゆるLLC(Last Level Cache)の容量を、タスクキュー64に格納するタスクT(詳細後述)の数で除した値(小数点以下は切り捨て)としている。なお、第1サイズは、本実施形態に限られない。しかしながら、第1サイズは、LLC以外のコア13毎に備えられるキャッシュメモリ以外のキャッシュメモリの容量をタスクキュー64に格納するタスクTの数で除した値以上、LLCの容量をタスクキュー64に格納するタスクTの数で除した値以下であることが好ましい。
 本実施形態に係る再分割部61は、分割画像データを第2サイズの再分割画像データに分割する。本実施形態では、具体例として、再分割部61が、分割画像をさらに分割(再分割)する。一例として図4に示すように、再分割部61は、分割画像B1~B3を、第2サイズに応じて、複数(図4に示す例では2つずつ、合計6つ)の再分割画像C11~C32に再分割する。従って、第2サイズの再分割画像データのタスク(タスクt、詳細後述)は、細粒度となり、第1サイズの分割画像データタスク(タスクT、詳細後述)は、中粒度となる。
 なお、再分割部61が入力画像データを分割する上記第2サイズは、第1サイズよりも小さいサイズである。本実施形態では、第2サイズを、画像処理モジュール38による画像処理を実行する演算部のプロセッサに最も近いレベルのキャッシュメモリ、いわゆるL1(Level 1)キャッシュの容量以下としている。
 本実施形態に係る制御部62は、再分割画像データに対応するタスクを複数のコア13に並列に実行させる制御を行う。なお、ここでいう並列とは、依存関係に基づいて実行可能となったタスクが複数のコア13により並列に(同時に)実行されることを意味する。
 具体的には、制御部62は、一例として図5に示すように、画像処理DAG50Aの各画像処理モジュール38で実行される画像処理を分割画像データ(分割部60により分割された分割画像データ)の各々に対応する部分処理39に分割して、画像処理DAG50Aを画像処理DAG50Bに更新する。なお、画像処理DAG50Bは、各部分処理39のタスクにおけるDAGを表すものであり、いわゆるタスクDAGである。
 なお、図5は、図2Aに示した画像処理DAG50Aにおいて、入力画像データを4つの分割画像データに分割した場合の画像処理DAG50Bを示している。図5では、錯綜を回避するために、バッファモジュール40の図示を省略している。
 本実施形態に係る制御部62は、画像処理モジュール38で実行される画像処理の種類に応じて、前段に連結された画像処理モジュール38の部分処理39と、後段に連結された画像処理モジュール38の部分処理39との間で依存関係を付与する。なお、図5では、この依存関係を破線の矢印で示している。
 例えば、色変換処理のように、処理対象とする画素のみに対して画像処理を行う処理は、各部分処理39も1対1の依存関係となる。一方、例えば、フィルタ処理のように、処理対象とする画素の周辺画素も必要な画像処理では、周辺画素に対して画像処理を行う前段の部分処理39にも依存関係を付与することとなる。すなわち、この依存関係は、連結された画像処理モジュール38間において、前段に連結された画像処理モジュール38の部分処理39が終了した場合に、後段に連結された画像処理モジュール38の部分処理39が実行可能となる関係である。従って、各部分処理39は、前段に依存関係が付与された部分処理39が存在しない場合か、又は依存関係が付与された前段の全ての部分処理39が終了した場合に実行可能となる。
 具体的には、例えば、図5に示す部分処理39A及び部分処理39Bは、画像処理の実行開始時に実行可能となる。また、例えば、図5に示す部分処理39Cは、依存関係が付与された前段の部分処理39A及び部分処理39Bの双方の処理が終了した場合に実行可能となる。
 なお、本実施形態においては、分割画像データに対応する部分処理39について、「タスクT」と称している。また、再分割画像データに対応する再分割部分処理について、「タスクt」と称している。さらに、タスクT及びタスクtを区別せずに総称する場合は、単に「タスク」という。なお、説明の便宜上、以下では、タスクTに対応する分割画像データを再分割してタスクtに対応する再分割画像データとすることを、「タスクTを再分割してタスクtにする」等という。
 制御部62は、実行可能となっているタスクTを、格納されたタスクを複数のコア13の各々が順次取り出して実行するためのタスクキュー64に格納する。なお、一例として、本実施形態の制御部62がタスクキュー64に同時に格納するタスクTの数は、2つ以下としている。なお、タスクキュー64に同時に格納するタスクTの数は、本実施形態に限定されないが、2つ以上であることが好ましい。タスクキュー64にタスクTを1つだけ格納する場合に、タスクTの実行が完了するまで新たなタスクTをタスクキュー64に格納しないとすると、タスクTを再分割した複数のタスクtのうち1つでも実行が完了していないタスクtがあると新たなタスクTがタスクキュー64に格納されない。この場合、複数あるコア13のうち、稼働しないコア13が増加してしまい、コア13の稼働率が低下する。一方、タスクキュー64が同時に格納可能なタスクTの数を制限しない場合、タスクキュー64に格納された全てのタスクTに対して、前処理(詳細後述)において、メモリが確保されるため、確保されるメモリ容量が多くなってしまう。そのため、タスクキュー64が同時に格納可能なタスクTの数を制限することにより、前処理において確保されるメモリ等のリソースの量が増加するのが抑制される。そのため、タスクキュー64が同時に格納可能なタスクTの数は、メモリの容量等に応じて定めてもよいし、コア13の稼働率に応じて可変としてもよい。
 さらに制御部62は、再分割部61により再分割された再分割画像データに対応するタスクtを、タスクキュー64に格納する。
 本実施形態に係る出力部66は、制御部62による制御により、画像処理DAG50Bの最終段の画像処理モジュール38により実行された画像処理の結果得られた出力画像データを出力する。本実施形態では、出力部66は、得られた出力画像データにより示される出力画像を表示部16に表示する。なお、出力部66は、出力画像データを外部装置に出力(送信)してもよい。また、コンピュータ10がプリンタに組み込まれている場合は、出力部66は、出力画像データにより示される出力画像を紙等の記録材料に出力(形成)してもよい。
 次に、図6~図10を参照して、本実施形態に係るコンピュータ10の作用を説明する。なお、図6は、アプリケーション32により画像処理の実行開始の指示が入力された場合に第1演算部12Aによって実行されるDAG構築・実行処理の流れを示すフローチャートである。また、DAG構築・実行処理のプログラム(DAG構築・実行処理プログラム)は記憶部20に予めインストールされている。また、第1演算部12Aにおける何らかのタスクを実行してなく、タスクを実行可能なコア13がDAG構築・実行処理プログラムを実行することで、前述した処理構築部42及び制御部62として機能する。
 図6のステップ100で、処理構築部42は、アプリケーション32からの構築指示に従い、アプリケーション32が指示した画像処理を行う画像処理DAG50Aを構築する。また、処理構築部42は、画像処理DAG50Aを上述したように画像処理DAG50Bに更新する。なお、本実施形態では、この際に、各タスクTを再分割する第2サイズの情報を付加する。
 次のステップ102で、制御部62及び処理構築部42は、ステップ100で構築された画像処理DAG50Bによる画像処理の実行を、第1演算部12A(コア13)及び第2演算部12Bに実行させる画像処理DAG実行処理を実行した後、本DAG構築・実行処理を終了する。
 本DAG構築・実行処理を実行することにより、アプリケーション32が所望する画像処理の結果が出力部66から得られる。なお、本実施形態では、本DAG構築・実行処理が終了した場合、制御部62は、処理が完了したことを表す情報をアプリケーション32へ通知する。または、制御部62は、処理中に何らかのエラーが生じた場合、その旨を表す情報をアプリケーション32へ通知する。
 次に、上記DAG構築・実行処理のステップ102における画像処理DAG実行処理について詳細に説明する。本実施形態のDAG構築・実行処理には、画像処理DAG50Bの実行可能なタスクTをタスクキュー64に格納するタスク格納処理と、タスクキュー64に格納されているタスクを実行するタスク実行処理と、2つの処理が含まれる。
 まず、図7を参照してタスク格納処理について説明する。図7は、タスク格納処理の流れを示すフローチャートである。本実施形態では、タスク格納処理のプログラム(タスク格納処理プログラム)は、DAG構築・実行処理プログラムの一部、または別のいわゆるサブプログラム等として記憶部20に予めインストールされている。
 第1演算部12Aにおける何らかのタスクを実行してなく、タスクを実行可能なコア13がタスク格納処理プログラムを実行することで、制御部62として機能し、図7に示したタスク格納処理を実行する。
 図7のステップ110で制御部62は、タスクキュー64に、実行可能なタスクTが格納されているか否かを判定する。なお、この際、タスクキュー64にタスクT以外のタスク(本実施形態では、タスクt)が格納されていても、本判定には関与しない。本実施形態では、制御部62は、タスクキュー64に格納されている実行可能なタスクTが2以上の場合、肯定判定として、ステップ114へ移行する。
 一方、制御部62は、タスクキュー64に格納されている実行可能なタスクTが2つ未満の場合、ステップ110で否定判定として、ステップ112へ移行する。
 ステップ112で制御部62は、画像処理DAG50Bから実行可能なタスクを見つけ出してタスクキュー64に格納する。図8に示した例は、画像処理DAG50Bの実行可能な(ハッチングを施された)タスクTをタスクキュー64に格納した状態を示している。
 なお、この際、上述したように、タスクキュー64に格納されているタスクTの数は2以下であればよく、本ステップにおいて制御部62がタスクキュー64に同時に格納させるタスクTの数は1つでもよいし、2つでもよい。具体的には、タスクキュー64にタスクTが格納されていない場合、制御部62は、タスクTを1つもしくは2つ格納すればよいし、タスクキュー64にタスクTが1つ格納されている場合、タスクキュー64は、タスクTを1つ格納すればよい。タスクキュー64が、本ステップにおいてタスクキュー64に同時に格納させるタスクTの数をいずれとするかは、予め定めておいてもよいし、各コア13におけるタスク処理の進行に応じて可変としてもよい。
 次のステップ114で、制御部62は、画像処理DAG50Bの全タスクTをタスクキュー64に格納したか否かを判定する。制御部62は、未だタスクキュー64に格納していないタスクTが有る場合、否定判定として、ステップ110に戻り本タスク格納処理を繰り返す。一方、制御部62は、全てのタスクTをタスクキュー64に格納した場合、肯定判定として、本タスク格納処理を終了する。
 次に、図9を参照してタスク実行処理について説明する。図9は、タスク実行処理の流れを示すフローチャートである。本実施形態では、タスク実行処理のプログラム(タスク実行処理プログラム)は、DAG構築・実行処理プログラムの一部、または別のいわゆるサブプログラム等として記憶部20に予めインストールされている。
 第1演算部12Aにおける何らかのタスクを実行してなく、タスクを実行可能なコア13の各々がタスク実行処理プログラムを実行することで、制御部62として機能し、図9に示したタスク実行処理を実行する。なお、本実施形態では、上記タスク格納処理及びタスク実行処理を異なるコア13で実行することにより、タスク格納処理及びタスク実行処理が並列に実行される。
 図9のステップ120で、制御部62は、タスクキュー64からタスクを取得する。なお、ここで取得するタスクはタスクTである場合もあれば、その他のタスク(本実施形態では、タスクt)である場合もある。
 次のステップ122で、制御部62は、取得したタスクがタスクTであるか否かを判定する。制御部62は、取得したタスクがタスクTである場合、肯定判定として、ステップ118へ移行する。
 ステップ124で、制御部62は、タスクTの実行において予め定められた前処理を実行した後、ステップ126へ移行する。本ステップにおいて実行する前処理は画像処理前に行っておくことが予め定められている処理であり、特に限定されないが、例えば、画像処理結果を格納するための出力バッファ領域の確保や画像処理用の変数の初期化等の演算用のリソースの確保を行う処理である。
 一方、制御部62は、ステップ122において、取得したタスクがタスクTでない場合、本実施形態ではタスクtの場合、否定判定として、ステップ126へ移行する。
 ステップ126で、制御部62は、上記ステップ120で取得したタスクが、再分割可能であるか否かを判定する。
 本実施形態では、画像処理を第2演算部12Bで実行するタスクの場合、再分割部61による再分割を行わない。第2演算部12Bでタスクを実行する場合、ローカルメモリ15への画像データの転送や、第2演算部12Bの起動等、オーバーヘッドとして付加される処理が、第1演算部12Aでタスクを実行する場合に比べて大きい。このオーバーヘッドは、タスク毎に生じるため、タスクTをタスクtに再分割した場合、タスクの数が増加することに対応してオーバーヘッドが増加する。そのため、本実施形態では、画像処理を第2演算部12Bで実行するタスクTについては、再分割をせずタスクTのまま画像処理を実行する。したがって、タスクTが画像処理を第2演算部12Bで実行するタスクである場合、再分割不能となる。なお、タスクTが第2演算部12Bで実行するタスクであるか否かを表す情報は、上記DAG構築・実行処理のステップ100(図6参照)において処理構築部42が画像処理DAG50Aから画像処理DAG50Bを生成する際に付与される。
 また、本実施形態では、取得したタスクに対応する画像データ(分割画像データまたは再分割画像データ)のサイズがタスクtに対応する再分割画像データのサイズ以下の場合も、再分割不能となる。
 一方、取得したタスクが第1演算部12Aのコア13で実行するタスクであり、また、取得したタスクに対応する画像データ(分割画像データまたは再分割画像データ)のサイズがタスクtに対応する再分割画像データのサイズ以上の場合(本実施形態ではタスクTに対応する分割画像データのサイズの場合)も再分割不能となる。
 このように、本実施形態では、具体的には取得したタスクがタスクTであって、第1演算部12Aで実行するタスクの場合、再分割が可能であるため、制御部62は、ステップ126において肯定判定として、ステップ128へ移行する。
 ステップ128で再分割部61は、タスク(本実施形態ではタスクT)を、上述した第2サイズで分割してタスクtとする。なお、本実施形態の再分割部61は、上記ステップ120で取得したタスクを再分割することにより、タスクtとする。図8に示した一例では、コア13CがタスクTを3つのタスクtに再分割した場合を示している。このように本実施形態では、一例として、タスクTを全てタスクtに再分割して複数のタスクtを得る。
 次のステップ130で、制御部62は、再分割により得られたタスクtを全てタスクキュー64に格納した後、ステップ120に戻る。
 一方、制御部62は、上記ステップ126で上述したように再分割不能の場合、否定判定となして、ステップ132へ移行する。
 ステップ132で、制御部62は、タスクを、第1演算部12Aのコア13または第2演算部12Bに実行させる。なお、第2演算部12BにタスクTを実行させる場合、第1演算部12Aのコア13が、第2演算部12BにタスクTを実行させる処理を行うことにより、第2演算部12BによりタスクTが実行される。
 次のステップ134で、制御部62は、上記ステップ132で実行させたタスクが、最後のタスクtであるか否かを判定する。具体的には、制御部62は、ステップ132で実行させたタスクがタスクtであり、再分割元のタスクTが同一であるタスクtがタスクキュー64に格納されていないか否か、すなわち全てのタスクtが実行されたか否かを判定する。
 最後のタスクtではない場合、制御部62は、否定判定として、ステップ120に戻る。一方、最後のタスクtの場合、制御部62は、肯定判定として、ステップ136へ移行する。
 ステップ136で、制御部62は、後処理を行う。
 本ステップにおいて実行する後処理はタスクTに対応する部分処理後に行うことが予め定められている処理であり、特に限定されないが、例えば、上記ステップ124の処理において確保した演算用のリソースの解放等を行う処理である。
 次のステップ138でタスクキュー64は、処理構築部42にタスクTの完了通知を行った後、本タスク実行処理を終了する。タスクTの完了通知を受け取った処理構築部42は、画像処理DAG50Bの依存関係を更新する。このように、画像処理DAG50Bの依存関係が更新されると、上述したタスク格納処理(図7参照)において、処理構築部42は、更新された依存関係に基づいて、実行可能なタスクTを判定する。
 なお、タスクTが第2演算部12Bで実行されるタスクTの場合、高速に処理を行うため、一般的に処理に必要なデータ(画像データ)は第2演算部12Bのローカルメモリ15に転送して処理される。以下では、第2演算部12Bの一例としてGPUである場合を具体例として説明する。一例として、図10Aに示すように、GPU処理であるタスクT1、T2が連続して行われる場合、図10Bに一例を示すように、タスクT1の実行前にメモリ14から第2演算部12Bのローカルメモリ15への転送処理、及びタスクT2の実行後にローカルメモリ15からメモリ14への処理結果の転送処理が行われる。この転送処理はコア13の制御によりDMA(Diregt Memory Access)転送等を用いて行われるため、処理単位を小さくするとDMA転送の回数が増加して転送レートが低下する。また、小さい単位でGPUの起動を行うためその制御によるオーバーヘッドも増加するため、処理性能が低下する。そのためGPUで実行されるタスクTの分割画像データのサイズを第1サイズ以上と設定することにより、上述したようにタスクTの再分割は行わない。
 上述したように、コア13がタスクTを実行してCPUに指示することによりGPUが起動・制御され、GPUによりタスクTが実行される。図10Bに一例を示した同期処理(GPUにおける処理が完了するまでコア13に制御が戻らない)の場合、通常のCPUにより実行されるタスクTと同じように構成されるが、図10BにおけるGPU処理1とGPU処理2との間、コア13は処理が完了するまで待機状態となりコア13の稼働において無駄が生じる。
 図10Cに一例を示した非同期処理(コア13がGPUに処理の実行を指示すると処理の完了を待たずに、コア13側に制御が戻る)の場合、コア13はGPU処理1及びGPU処理2と並行して別のタスクが実行可能であるため稼働率が向上される。なお、非同期処理の場合、GPUにより実行されるタスク(図10Cでは、タスクT1、T2)の終了の検知を行う必要がある。そのため、図10Cに示すように、GPUへの転送、処理、及びGPUからの処理結果の転送の各々(タスクT0~T3)を非同期で処理するようコア13が指示する。そして、コア13側に制御が戻ると、コア13は、GPUにおけるタスクの終了を検知するタスクT4を実行し、終了を検知しない場合、終了検知タスクT4をタスクキュー64に再投入する。このコア13は、タスクT4と別のタスクをタスクキュー64から取り出して処理を進めることで、図10Bを一例として説明した待機状態が無くなるため、コア13の稼働における無駄が抑制される。
 なお、GPUにより実行されるタスクTは、GPU上での処理時間とメモリ14からローカルメモリ15への転送時間やローカルメモリ15からメモリ14への転送時間と、を等しく(誤差を含む)することにより、転送時間が隠れるため、より処理速度等の性能が向上される。
 以上説明したように、本実施形態のコンピュータ10は、画像処理を実行するオブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行するコンピュータ10であって、画像処理の対象となる画像データを第1サイズの分割画像データに分割する分割部60と、分割画像データに対して行う画像処理である部分処理毎に、前後の依存関係に基づいて処理可能と判定された部分処理に対応する分割画像データを前記第1サイズよりも小さい第2サイズの再分割画像データに再分割する再分割部61と、再分割画像データに対して行う画像処理である再分割部分処理を複数の第1演算部12A(コア13)及び第2演算部12Bに並列して実行させる制御を行う制御部62と、を備える。
 このように本実施形態のコンピュータ10では、画像データを第2サイズよりも大きい第1サイズで分割した分割画像データに対応するタスクTを実行することにより、並列処理によるオーバーヘッドが削減される。また、分割画像データを第2サイズで再分割した分割画像データに対応するタスクtを実行することにより、コア13及び第2演算部12Bの稼働率を向上させるとともに、必要なデータ量が大きくなるのが抑制されるため、キャッシュのミスヒットも生じにくくなる。
 従って、本実施形態のコンピュータ10によれば、画像処理の処理効率、いわゆるスケーラビリティを高めた並列処理を実現できる。
 なお、本実施形態において、上述した画像処理DAG50Bの更新やタスクキュー64へのタスクの格納、及びタスクキュー64からタスクの取り出しの各々の処理は、排他制御しながら行う必要があることは言うまでもない。
 なお、本実施形態では、タスク実行処理のステップ134(図9参照)において、予めステップ128においてタスクTを全て再分割して複数のタスクtに再分割してタスクキュー64に格納することにより、タスクキュー64に格納されているタスクtの有無により、最後のタスクtであるか否かを判定しているが、判定方法は、これに限られない。例えば、タスクTに各コア13が共有する共有ポインタを備えたカウンタを紐付けておき、カウンタの初期値を0とし、タスクTから1つのタスクtを再分割した場合(もしくは1つのタスクtをタスクキュー64に格納した場合)は、カウンタを1つインクリメントし、タスクtの実行が完了した場合(もしくはタスクキュー64からタスクtを取り出した場合)、カウンタをデクリメントすることにより、カウンタの値が0となった場合に最後のタスクtであると判定してもよい。
 なお、本実施形態では、第2演算部12Bがコンピュータ10内部に備えられている場合について説明したが、第2演算部12Bは、コンピュータ10の外部に設けられていてもよいし、コンピュータ10と異なるコンピュータに備えられていてもよい。
 また、上記実施形態では、各種プログラムが記憶部20に予め記憶(インストール)されている態様を説明したが、これに限定されない。各種プログラムは、CD-ROM、DVD-ROM(Digital Versatile Disk Read Only Memory)、USB(Universal Serial Bus)メモリ等の記録媒体に記録された形態で提供されてもよい。また、各種プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。
 上記では種々の実施の形態を説明したが、これらの実施の形態を組み合わせて構成してもよい。
 また、本開示は上記の実施の形態に何ら限定されるものではなく、本開示の要旨を逸脱しない範囲で種々の形態で実施することができる。
 本出願は、2016年3月24日出願の日本特許出願(特願2016-060525)に基づくものであり、それらの内容はここに参照として取り込まれる。
10 コンピュータ
12A 第1演算部
12B 第2演算部
13、13A~13C コア
14 メモリ
15 ローカルメモリ
16 表示部
18 操作部
20 記憶部
22 画像データ供給部
24 画像出力部
26 バス
30 オペレーティングシステム
32 アプリケーションプログラム群(アプリケーションプログラム)
34 画像処理プログラム群
36 モジュールライブラリ
38 画像処理モジュール
39、39A~39C 部分処理
40 バッファモジュール
42 処理構築部
46 処理制御部
50A、50B 画像処理DAG
60 分割部
61 再分割部
62 制御部
64 タスクキュー
66 出力部
B1~B3、C11~C32 分割画像
G 画像
T、t タスク
 

Claims (7)

  1.  オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置であって、
     前記画像処理の対象となる画像データを第1サイズの分割画像データに分割する分割部と、
     前記分割画像データに対して行う画像処理である部分処理毎に、前後の依存関係に基づいて処理可能と判定された前記部分処理に対応する前記分割画像データを前記第1サイズよりも小さい第2サイズの再分割画像データに再分割する再分割部と、
     前記再分割画像データに対して行う画像処理である再分割部分処理を複数の演算装置に並列して実行させる制御を行う制御部と、
     を備えた画像処理装置。
  2.  前記制御部は、前記複数の演算装置のうち、自身が備えるメモリのみを用いて部分処理を実行する演算装置に対しては、前記再分割画像データに替わり、前記分割画像データに対する部分処理を実行させる制御を行う、
     請求項1に記載の画像処理装置。
  3.  前記第1サイズは、前記複数の演算装置が前記部分処理の実行に用いる複数のキャッシュメモリのうち、前記複数の演算装置から最も遠いレベルのキャッシュメモリの容量と、格納された前記部分処理を前記複数の演算装置の各々が順次取り出して実行するためのタスクキューに格納可能な前記部分処理の数と、に基づいたサイズである、
     請求項1または請求項2に記載の画像処理装置。
  4.  前記第2サイズは、前記複数の演算装置が前記再分割部分処理の実行に用いる複数のキャッシュメモリのうち、前記複数の演算装置から最も遠いレベルのキャッシュメモリよりも前記複数の演算装置に近いレベルのキャッシュメモリの容量以下のサイズである、
     請求項1から請求項3のいずれか1項に記載の画像処理装置。
  5.  前記制御部は、前記複数の演算装置のうち、自身が備えるメモリのみを用いて部分処理を実行する第2演算部が他の第1演算部と非同期に前記部分処理を実行可能な場合、前記第2演算部に対する前記部分処理の実行を指示する実行指示タスクを前記第1演算部において実行後に、前記第2演算部における前記部分処理の終了を検知する終了検知タスクを、前記終了を検知するまで前記第1演算部に繰り返し実行させる、
     請求項1から請求項4のいずれか1項に記載の画像処理装置。
  6.  オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置による画像処理方法であって、
     前記画像処理の対象となる画像データを第1サイズの分割画像データに分割し、
     前記分割画像データに対して行う画像処理である部分処理毎に、前後の依存関係に基づいて処理可能と判定された前記部分処理に対応する前記分割画像データを前記第1サイズよりも小さい第2サイズの再分割画像データに再分割し、
     前記再分割画像データに対して行う画像処理である再分割部分処理を複数の演算装置に並列して実行させる制御を行う画像処理方法。
  7.  コンピュータを、請求項1から請求項5のいずれか1項に記載の画像処理装置の分割部、再分割部、及び制御部として機能させるための画像処理プログラム。
     
PCT/JP2016/072031 2016-03-24 2016-07-27 画像処理装置、画像処理方法、及び画像処理プログラム WO2017163441A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/781,790 US10650481B2 (en) 2016-03-24 2016-07-27 Image processing device, image processing method, and non-transitory computer readable medium for image processing
JP2018506749A JP6632709B2 (ja) 2016-03-24 2016-07-27 画像処理装置、画像処理方法、及び画像処理プログラム
CN201680078443.XA CN108463836B (zh) 2016-03-24 2016-07-27 图像处理装置、图像处理方法和图像处理程序

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016-060525 2016-03-24
JP2016060525 2016-03-24

Publications (1)

Publication Number Publication Date
WO2017163441A1 true WO2017163441A1 (ja) 2017-09-28

Family

ID=59899887

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/072031 WO2017163441A1 (ja) 2016-03-24 2016-07-27 画像処理装置、画像処理方法、及び画像処理プログラム

Country Status (4)

Country Link
US (1) US10650481B2 (ja)
JP (1) JP6632709B2 (ja)
CN (1) CN108463836B (ja)
WO (1) WO2017163441A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019192021A (ja) * 2018-04-26 2019-10-31 キヤノン株式会社 データ処理装置及びその方法
JP2020035393A (ja) * 2018-08-31 2020-03-05 富士フイルム株式会社 画像処理装置、画像処理方法、及び画像処理プログラム
CN112114960A (zh) * 2020-08-06 2020-12-22 河南大学 一种适应互联网场景的遥感影像并行集群处理的调度策略
JP2022188077A (ja) * 2019-07-27 2022-12-20 アナログ・ディヴァイシス・インターナショナル・アンリミテッド・カンパニー ハードウェアアクセラレータの自律ジョブキューイングシステム

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685748B (zh) * 2018-12-07 2021-03-30 Oppo广东移动通信有限公司 图像处理方法、装置、电子设备、计算机可读存储介质
KR102104246B1 (ko) * 2020-02-17 2020-04-24 주식회사 비에이템 화면 분할을 이용한 이미지 병렬 검색 시스템

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04172570A (ja) * 1990-11-06 1992-06-19 Nippon Telegr & Teleph Corp <Ntt> 画像信号のタスク分割並列処理方法
JPH0844678A (ja) * 1994-07-29 1996-02-16 Canon Inc 画像処理装置及びシステム
JP2002251610A (ja) * 2001-02-26 2002-09-06 Matsushita Electric Ind Co Ltd 並列画像処理装置
JP2013504127A (ja) * 2009-09-03 2013-02-04 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Gpuワークのハードウエアベースでのスケジューリング

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6628154B2 (en) * 2001-07-31 2003-09-30 Cypress Semiconductor Corp. Digitally controlled analog delay locked loop (DLL)
JP4219887B2 (ja) * 2004-12-28 2009-02-04 富士通マイクロエレクトロニクス株式会社 画像処理装置及び画像処理方法
JP4965995B2 (ja) 2006-12-22 2012-07-04 株式会社東芝 プログラム処理方法、処理プログラム及び情報処理装置
US7991237B2 (en) * 2007-06-28 2011-08-02 Mitsubishi Electric Corporation Image encoding device, image decoding device, image encoding method and image decoding method
JP2012003619A (ja) * 2010-06-18 2012-01-05 Sony Corp 情報処理装置、情報処理装置の制御方法、およびプログラム
CN103021017B (zh) * 2012-12-04 2015-05-20 上海交通大学 基于gpu加速的三维场景重建方法
US9652817B2 (en) * 2015-03-12 2017-05-16 Samsung Electronics Co., Ltd. Automated compute kernel fusion, resizing, and interleave

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04172570A (ja) * 1990-11-06 1992-06-19 Nippon Telegr & Teleph Corp <Ntt> 画像信号のタスク分割並列処理方法
JPH0844678A (ja) * 1994-07-29 1996-02-16 Canon Inc 画像処理装置及びシステム
JP2002251610A (ja) * 2001-02-26 2002-09-06 Matsushita Electric Ind Co Ltd 並列画像処理装置
JP2013504127A (ja) * 2009-09-03 2013-02-04 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Gpuワークのハードウエアベースでのスケジューリング

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019192021A (ja) * 2018-04-26 2019-10-31 キヤノン株式会社 データ処理装置及びその方法
JP7114321B2 (ja) 2018-04-26 2022-08-08 キヤノン株式会社 データ処理装置及びその方法
JP2020035393A (ja) * 2018-08-31 2020-03-05 富士フイルム株式会社 画像処理装置、画像処理方法、及び画像処理プログラム
WO2020045292A1 (ja) * 2018-08-31 2020-03-05 富士フイルム株式会社 画像処理装置、画像処理方法、及びプログラム
US20210183067A1 (en) * 2018-08-31 2021-06-17 Fujifilm Corporation Image processing device, image processing method and storage medium
JP7039424B2 (ja) 2018-08-31 2022-03-22 富士フイルム株式会社 画像処理装置、画像処理方法、及び画像処理プログラム
JP2022188077A (ja) * 2019-07-27 2022-12-20 アナログ・ディヴァイシス・インターナショナル・アンリミテッド・カンパニー ハードウェアアクセラレータの自律ジョブキューイングシステム
JP7467554B2 (ja) 2019-07-27 2024-04-15 アナログ・ディヴァイシス・インターナショナル・アンリミテッド・カンパニー ハードウェアアクセラレータの自律ジョブキューイングシステム
CN112114960A (zh) * 2020-08-06 2020-12-22 河南大学 一种适应互联网场景的遥感影像并行集群处理的调度策略
CN112114960B (zh) * 2020-08-06 2022-11-01 河南大学 一种适应互联网场景的遥感影像并行集群处理的调度策略

Also Published As

Publication number Publication date
JPWO2017163441A1 (ja) 2019-01-17
JP6632709B2 (ja) 2020-01-22
CN108463836A (zh) 2018-08-28
CN108463836B (zh) 2022-04-01
US10650481B2 (en) 2020-05-12
US20180365793A1 (en) 2018-12-20

Similar Documents

Publication Publication Date Title
WO2017163441A1 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP5046801B2 (ja) 画像処理装置及びプログラム
JP6648257B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP6945634B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
US10949942B2 (en) Image processing apparatus, image processing method, and image processing program
US10878526B2 (en) Image processing apparatus, image processing method, and image processing program
US11341599B2 (en) Image processing apparatus, image processing method, and computer readable medium storing image processing program
US20200402197A1 (en) Image processing apparatus, image processing method, and computer readable medium
JP7039424B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP6600077B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP4964219B2 (ja) 画像処理装置、方法及びプログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2018506749

Country of ref document: JP

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: 16895466

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16895466

Country of ref document: EP

Kind code of ref document: A1