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

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

Info

Publication number
WO2017163442A1
WO2017163442A1 PCT/JP2016/072032 JP2016072032W WO2017163442A1 WO 2017163442 A1 WO2017163442 A1 WO 2017163442A1 JP 2016072032 W JP2016072032 W JP 2016072032W WO 2017163442 A1 WO2017163442 A1 WO 2017163442A1
Authority
WO
WIPO (PCT)
Prior art keywords
image processing
processing
partial
image
image data
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
Application number
PCT/JP2016/072032
Other languages
English (en)
French (fr)
Inventor
長尾 隆
和幸 板垣
昂生 竹本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Corp
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 Fuji Xerox Co Ltd, Fujifilm Corp filed Critical Fuji Xerox Co Ltd
Priority to CN201680078715.6A priority Critical patent/CN108475213B/zh
Priority to JP2018506750A priority patent/JP6648257B2/ja
Priority to US16/061,075 priority patent/US10795725B2/en
Publication of WO2017163442A1 publication Critical patent/WO2017163442A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

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 object group When executing each partial process after performing the process of updating each object of the object group in which objects for executing the image process are connected in a DAG form to a plurality of partial processes, the object group In some cases, it took time to process images.
  • An object of at least an embodiment of the present invention is to perform a process of updating each object of an object group in which objects for performing image processing are connected in a DAG form to a plurality of partial processes, and then performing each partial process.
  • the present invention provides an image processing apparatus, an image processing method, and an image processing program capable of improving the processing speed of image processing as compared with the case of executing.
  • an image processing apparatus that executes image processing with each object in an object group in which a plurality of objects are connected in a directed acyclic graph form.
  • the image processing apparatus performs image processing on each divided image data indicating a divided image obtained by dividing the input image indicated by the input image data into a plurality of partial areas, by performing image processing executed by each object of the object group.
  • An update process for updating to a partial process to be performed a processing unit for performing a grant process for assigning a process dependency between the partial processes of the linked objects, and the update process and the grant process by the processing unit; And a control unit that performs control to cause the plurality of arithmetic devices to execute the partial processing that can be executed based on the dependency relationship.
  • the control unit performs a task of sequentially executing the update process and the assigning process for the object group for each object, and stores a stored task as the plurality of operations.
  • Each of the devices sequentially takes out and stores them in a task queue for execution, and stores the partial processes that can be executed based on the dependency relationship in order in the task queue, thereby executing the control in parallel. Preferably it is done.
  • the processing unit in the case where image processing is continuously performed on a plurality of input image data, the processing unit operates on input image data input in advance.
  • a priority assignment process for assigning a higher priority to the input image data input later than the partial process for performing image processing is further performed.
  • an image processing method by an image processing apparatus that executes image processing with each object in an object group in which a plurality of objects are connected in a directed acyclic graph form.
  • image processing performed by each object of the object group is performed on each divided image data indicating a divided image obtained by dividing the input image indicated by the input image data into a plurality of partial areas.
  • Control is performed to cause a plurality of arithmetic units to execute in parallel.
  • an image processing program that causes a computer to function as the processing unit and the control unit of the image processing apparatus according to any one of [1] to [4].
  • the apparatus of [1], the method of [5], and the program of [6] a process of updating each object of an object group in which objects for executing image processing are connected in a DAG form to a plurality of partial processes.
  • the processing speed of the image processing can be improved as compared with the case where each partial process is executed after all the objects are performed.
  • the processing speed of image processing can be easily improved by using a task queue.
  • 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 calculation unit 12, 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. Yes. Further, the calculation unit 12, 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 a bus 26.
  • the calculation unit 12 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 “cores 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 present invention is not limited to this.
  • the plurality of arithmetic units 12 may include a GPU (Graphics Processing Unit) or an arithmetic unit such as an FPGA (Field Programmable Gate Array).
  • the memory 14 is a non-volatile storage means in which the arithmetic unit 12 temporarily stores 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 calculation unit 12.
  • 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 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 when 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. Further, in the example shown in FIG. 2A, when all image processing of the plurality of image processing modules 38 in the preceding stage is completed for 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 the modules are 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.
  • the processing control unit 46 includes a processing unit 60, a control unit 62, a task queue 64, and an output unit 66.
  • the processing unit 60 divides an image indicated by a portion to be processed of input image data into a plurality of partial regions (hereinafter referred to as “divided images”). As an example, as shown in FIG. 4, the processing unit 60 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. 4) divided images B1 to B3. .
  • image data indicating a divided image is referred to as “divided image data”.
  • the part to be processed of the 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 in which a part of the input image is to be processed as in the cutout (trimming) process.
  • input image data a portion to be processed of input image data is simply referred to as “input image data”.
  • the processing unit 60 divides the image G vertically in front view, but the present invention is not limited to this.
  • the processing unit 60 may divide the image G into front view left and right, and may divide front view up and down and left and right.
  • the number of divisions of input image data by the processing unit 60 is not particularly limited.
  • the processing unit 60 may divide the input image data by a predetermined number or size. Further, for example, the processing unit 60 may divide the input image data into a number equal to or less than the number of processor cores included in the arithmetic unit that executes image processing by the image processing module 38.
  • the processing unit 60 may divide the input image data with a size equal to or smaller than the capacity of the cache memory included in the arithmetic unit that executes image processing by the image processing module 38.
  • the processing unit 60 is less than or equal to the capacity of a so-called LLC (Last Level Cache) cache memory at a level farthest from the processor of the arithmetic unit that executes image processing by the image processing module 38, and to the LLC capacity as much as possible
  • LLC Layer Level Cache
  • the processing unit 60 divides the image processing executed by each image processing module 38 of the image processing DAG 50 ⁇ / b> A into partial processing 39 corresponding to each of the divided image data, and performs image processing.
  • the DAG 50A is updated to the image processing DAG 50B.
  • 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.
  • the processing unit 60 includes a partial process 39 of the image processing module 38 connected to the preceding stage and an image processing module 38 connected to the succeeding stage according to the type of image processing executed by the image processing module 38.
  • 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. This is an executable relationship. Therefore, 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 is 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 control unit 62 parallels the update processing of the image processing DAG 50 ⁇ / b> A by the processing unit 60 and the dependency addition processing, and the partial processing 39 that can be executed based on the dependency in parallel to the plurality of cores 13. Control to be executed.
  • parallel here means that at least a part of the update process, the grant process, and the partial process 39 that can be executed based on the dependency relationship are parallel (simultaneously) by the plurality of cores 13. Means to be executed.
  • control unit 62 performs a task (process) for executing the update process of the image processing DAG 50 ⁇ / b> A and the dependency assignment process for each image processing module 38, and each of the plurality of cores 13 sequentially stores the stored tasks. It is stored in a task queue 64 for taking out and executing. Further, the control unit 62 sequentially stores the partial processes 39 that can be executed based on the dependency relationship in the task queue 64 during the update process and the grant process by the processing unit 60.
  • a task for executing the update process of the image processing DAG 50 ⁇ / b> A and the dependency assignment process for each image processing module 38
  • each of the plurality of cores 13 sequentially stores the stored tasks. It is stored in a task queue 64 for taking out and executing. Further, the control unit 62 sequentially stores the partial processes 39 that can be executed based on the dependency relationship in the task queue 64 during the update process and the grant process by the processing unit 60.
  • 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 the flow of processing of the DAG construction processing program executed by the arithmetic unit 12 when an instruction to start execution of image processing is input by the application 32.
  • the DAG construction processing program is preinstalled in the storage unit 20.
  • the core 13 capable of executing a task without executing any task in the arithmetic unit 12 executes the DAG construction 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.
  • the control unit 62 stores in the task queue 64 a task for executing the update processing and dependency assignment processing of the image processing DAG 50 ⁇ / b> A constructed in step 100 for each image processing module 38. The construction process ends.
  • the task T for executing the update processing of the image processing DAG 50 ⁇ / b> A and the dependency addition processing for each image processing module 38 is stored in the task queue 64 by the processing of step 102. Then, the core 13 that can execute the task (core 13C in the example shown in FIG. 7) takes out the task T from the task queue 64 and executes it, whereby the DAG update process shown in FIG. 8 is executed.
  • FIG. 8 is a flowchart showing the flow of processing of the DAG update processing program, and this DAG update processing program is also installed in the storage unit 20 in advance. Further, the core 13 that can execute the task executes the DAG update processing program, thereby functioning as the processing unit 60 and the control unit 62 described above.
  • the processing unit 60 sorts all the image processing modules 38 included in the image processing DAG 50A by a known sorting method such as topological sorting. It should be noted that the repetitive processing of the following steps 112 to 118 is performed for each image processing module 38 in order from the top of all the image processing modules 38 sorted in this step 110 (hereinafter referred to as “processing target module 38”). It will be described as being executed.
  • step 112 the processing unit 60 divides the input image data into a plurality of divided image data. Then, as described above, the processing unit 60 updates the image processing executed by the processing target module 38 to the partial processing 39 corresponding to each of the divided image data.
  • step 114 the processing unit 60 determines whether or not the image processing module 38 is connected to the previous stage of the processing target module 38. If the determination is affirmative, the processing unit 60 proceeds to step 118. If the determination is negative, the processing unit 60 proceeds to step 116.
  • step 116 the control unit 62 sequentially stores the partial processing 39 of the processing target module 38 divided in step 112 in the task queue 64.
  • step 118 the processing unit 60 determines the partial processing 39 of the image processing module 38 connected in the previous stage and the processing target module according to the type of image processing executed in the processing target module 38. Dependencies are given to 38 partial processes 39.
  • step 120 the processing unit 60 determines whether or not the processing in steps 112 to 118 has been executed for all the image processing modules 38 of the image processing DAG 50A. If the determination is negative, the processing unit 60 returns to step 112, whereas if the determination is affirmative, the processing unit 60 ends the DAG update process.
  • the partial processing 39 of the image processing module 38 in the foremost stage is sequentially stored in the task queue 64 by the processing of step 116.
  • the core 13 that can execute the task extracts the partial process 39 from the task queue 64 and executes it.
  • the processing of step 112 and step 116 is continued. That is, as shown in FIG. 9, the task T and the partial process 39 are executed in parallel by the plurality of cores 13.
  • FIG. 10 is a flowchart showing the flow of processing of the partial processing execution processing program executed by the arithmetic unit 12 when an instruction to start execution of image processing is input by the application 32.
  • This partial process execution processing program is also installed in the storage unit 20 in advance. Further, the core 13 that can execute the task executes the partial process execution processing program, thereby functioning as the control unit 62 described above.
  • control unit 62 determines whether or not the partial process 39 is stored in the task queue 64. When this determination is negative, the control unit 62 repeatedly executes the process of step 130. When the determination is affirmative, the control unit 62 proceeds to step 132.
  • step 132 the control unit 62 extracts one partial process 39 from the head of the task queue 64, and executes the extracted partial process 39.
  • step 134 the control unit 62 updates the dependency according to the execution of the partial process 39 by the process of step 132, and sequentially executes the partial process 39 that can be newly executed based on the dependency. Store in the queue 64.
  • the control unit 62 determines whether or not all the partial processes 39 of all the image processing modules 38 of the image processing DAG 50B have been completed. If this determination is a negative determination, the control unit 62 returns to step 130, whereas if the determination is a positive determination, the control unit 62 ends the partial process execution process.
  • the output unit 66 outputs the output image indicated by the output image data output by the partial process 39 of the image processing module 38 at the final stage of the image processing DAG 50B. Is output to the display unit 16.
  • the partial process 39 stored in the task queue 64 is executed by the core 13 (the cores 13A and 13B in the example shown in FIG. 11).
  • the dependency relationship of the image processing DAG 50A is updated, and the partial process 39 that can be newly executed based on the dependency relationship is stored in the task queue 64.
  • the partial process 39 that has been executed is indicated by a shaded circle, and the partial process 39 that can be newly executed based on the dependency relationship is indicated by a black circle.
  • the task T and the partial process 39 are executed in parallel. Therefore, as shown in FIG. 12 as an example, the processing speed of the image processing is improved as compared with the case where the task T and the partial processing 39 are executed in series.
  • the upper part of FIG. 12 shows the case where the task T and the partial process 39 are executed in series, and the lower part of FIG. 12 shows the case where the task T and the partial process 39 are executed in parallel as in this embodiment. Yes.
  • the partial processes 39 may be stored in the task queue 64 in order of priority. Thereby, it is prevented that the image processing for the image data input later is ended before the image processing for the image data input earlier is ended.

Landscapes

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

Abstract

画像処理装置は、画像処理モジュールがDAG形態で複数連結されたオブジェクト群の各画像処理モジュールが実行する画像処理を、入力画像データにより示される入力画像が複数の部分領域に分割された分割画像を示す各分割画像データに対して画像処理を行う部分処理に更新する更新処理、及び、連結された画像処理モジュールの部分処理間に処理の依存関係を付与する付与処理と、依存関係に基づいて実行可能となった部分処理と、を複数の演算装置に並列に実行させる。

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>
 画像処理を実行するオブジェクトがDAG形態で連結されたオブジェクト群の各オブジェクトを、複数の部分処理に更新する処理を全てのオブジェクトに対して行ってから、各部分処理を実行する場合、上記オブジェクト群による画像処理に時間がかかってしまう場合があった。
 本発明の少なくとも実施形態の目的は、画像処理を実行するオブジェクトがDAG形態で連結されたオブジェクト群の各オブジェクトを複数の部分処理に更新する処理を全てのオブジェクトに対して行ってから各部分処理を実行する場合に比較して、画像処理の処理速度を向上させることができる画像処理装置、画像処理方法、及び画像処理プログラムを提供することである。
 [1]本発明のある観点によれば、オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置が提供される。前記画像処理装置は、前記オブジェクト群の各オブジェクトが実行する画像処理を、入力画像データにより示される入力画像が複数の部分領域に分割された分割画像を示す各分割画像データに対して画像処理を行う部分処理に更新する更新処理、及び、連結された前記オブジェクトの前記部分処理間に処理の依存関係を付与する付与処理を行う処理部と、前記処理部による前記更新処理及び前記付与処理と、前記依存関係に基づいて実行可能となった前記部分処理と、を複数の演算装置に並列に実行させる制御を行う制御部と、を備える。
 [2] [1]に記載の画像処理装置において、前記制御部が、前記オブジェクト群について前記更新処理及び前記付与処理を前記オブジェクト毎に順次実行するタスクを、格納されたタスクを前記複数の演算装置の各々が順次取り出して実行するためのタスクキューに格納し、かつ前記依存関係に基づいて実行可能となった前記部分処理を順次前記タスクキューに格納することで、前記並列に実行させる制御を行うことが好ましい。
 [3] [1]又は[2]に記載の画像処理装置において、複数の入力画像データに対して連続的に画像処理を行う場合、前記処理部が、先に入力された入力画像データに対して画像処理を行う部分処理に対し、後に入力された入力画像データに対して画像処理を行う部分処理よりも高い優先度を付与する優先度付与処理をさらに行い、前記制御部が、前記依存関係に基づいて複数の前記部分処理が実行可能となった場合、前記優先度の高い順に前記部分処理を実行させる制御をさらに行うことが好ましい。
 [4] [1]から[3]の何れかに記載の画像処理装置において、前記依存関係が、連結された前記オブジェクト間において、前段に連結された前記オブジェクトの部分処理が終了した場合に、後段に連結された前記オブジェクトの部分処理が実行可能となる関係であることが好ましい。
 [5] 本発明の他の観点によればオブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置による画像処理方法が提供される。前記画像処理方法では、前記オブジェクト群の各オブジェクトが実行する画像処理を、入力画像データにより示される入力画像が複数の部分領域に分割された分割画像を示す各分割画像データに対して画像処理を行う部分処理に更新する更新処理、及び、連結された前記オブジェクトの前記部分処理間に処理の依存関係を付与する付与処理と、前記依存関係に基づいて実行可能となった前記部分処理と、を複数の演算装置に並列に実行させる制御を行う。
 [6] 本発明の他の観点によれば、コンピュータを、[1]から[4]の何れか記載の画像処理装置の処理部及び制御部として機能させる画像処理プログラムが提供される。
 [1]の装置、[5]の方法、及び[6]のプログラムによれば、画像処理を実行するオブジェクトがDAG形態で連結されたオブジェクト群の各オブジェクトを複数の部分処理に更新する処理を全てのオブジェクトに対して行ってから各部分処理を実行する場合に比較して、画像処理の処理速度を向上させることができる。
 [2]の装置によれば、タスクキューを用いることで、簡易に画像処理の処理速度を向上させることができる。
 [3]の装置によれば、複数の入力画像データに対して連続的に画像処理を行う場合に、先に入力された入力画像データに対する画像処理が終了するよりも前に、後に入力された入力画像データに対する画像処理が終了することを防止することができる。
 [4]の装置によれば、依存関係に基づいて、部分処理が実行可能となったか否かを確実に判定することができる。
実施の形態に係る画像処理装置として機能するコンピュータの構成の一例を示すブロック図である。 画像処理DAGの一例を示す概略図である。 画像処理DAGに入出力用のメモリを加えた場合の一例を示す概略図である。 実施の形態に係る処理制御部の機能的な構成の一例を示すブロック図である。 入力画像の分割処理の一例の説明に供する概略図である。 画像処理モジュールが部分処理に分割された画像処理DAGの一例を示す概略図である。 実施の形態に係るDAG構築処理プログラムの処理の流れを示すフローチャートである。 実施の形態に係るDAG更新処理の説明に供する概略図である。 実施の形態に係るDAG更新処理プログラムの処理の流れを示すフローチャートである。 最前段の画像処理モジュールにおける部分処理の実行の説明に供する概略図である。 実施の形態に係る部分処理実行処理プログラムの処理の流れを示すフローチャートである。 新たに実行可能となった部分処理の実行の説明に供する概略図である。 1つの画像データに対して画像処理DAGを更新するタスク及び部分処理を、直列に実行した場合と並列に実行した場合との実行時間の一例を示す概略図である。 複数の画像データに対して画像処理DAGを更新するタスク及び部分処理を、直列に実行した場合と並列に実行した場合との実行時間の一例を示す概略図である。
 以下、図面を参照して、本発明を実施するための形態例を詳細に説明する。
 まず、図1を参照して、画像処理装置として機能するコンピュータ10の構成を説明する。なお、コンピュータ10は、複写機、プリンタ、ファクシミリ装置、これらの装置の機能を兼ね備えた複合機、及びスキャナ等の内部で画像処理を行う画像取扱機器に組み込まれたコンピュータであってもよい。また、コンピュータ10は、PC(Personal Computer)等の独立したコンピュータであってもよく、PDA(Personal Digital Assistant)及び携帯電話機等の携帯機器に組み込まれたコンピュータであってもよい。
 図1に示すように、本実施の形態に係るコンピュータ10は、演算部12、メモリ14、表示部16、操作部18、記憶部20、画像データ供給部22、及び画像出力部24を備えている。また、演算部12、メモリ14、表示部16、操作部18、記憶部20、画像データ供給部22、及び画像出力部24の各部は、バス26を介して互いに接続されている。
 本実施の形態に係る演算部12は、コンピュータ10のメイン・プロセッサであり、一例として複数のプロセッサ・コア13(以下、「コア13」という。)を有するCPU(Central Processing Unit)である。なお、各コア13が、画像処理を実行する演算装置の一例である。また、以下では、各コア13を区別して説明する場合は、コア13A、コア13Bのように、符号の末尾にアルファベットを付して説明する。
 このように、本実施形態では、演算部12が1つである場合について説明するが、これに限定されない。演算部12が複数個あってもよいし、演算部12が複数ある場合は、複数の演算部12が同じ種類のCPUでもよいし、異なる種類のCPUでもよい。また、演算部12が複数ある場合は、複数の演算部12に、GPU(Graphics Processing Unit)を含んでもよいし、FPGA(Field Programmable Gate Array)等の演算器を含んでもよい。
 メモリ14は、演算部12が一時的にデータを記憶する不揮発性の記憶手段である。
 コンピュータ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には、演算部12によって実行される各種プログラムが記憶されている。記憶部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による画像処理が終了した場合に、自身の画像処理の実行が可能となることを示している。また、図2Aに示す例は、バッファモジュール40を介して前段に複数の画像処理モジュール38が連結された画像処理モジュール38について、前段の複数の画像処理モジュール38の全ての画像処理が終了した場合に、自身の画像処理の実行が可能となることを示している。
 また、図2Aは、各モジュールのみが処理の順に接続されたDAGを示しているが、このDAGが実行される際には、図2Bに示すようにメモリ14に記憶された画像データが入力されてDAGに従って画像処理が行われる。そして、最終的にメモリ14に処理済みの画像データ等の処理結果が記憶される。
 次に、図3を参照して、本実施形態に係る処理制御部46の機能的な構成を説明する。図3に示すように、処理制御部46は、処理部60、制御部62、タスクキュー64、及び出力部66を備えている。
 本実施形態に係る処理部60は、入力画像データの処理対象とする部分により示される画像を複数の部分領域(以下、「分割画像」という。)に分割する。一例として図4に示すように、処理部60は、入力画像データの処理対象とする部分により示される画像Gを、複数(図4に示す例では3つ)の分割画像B1~B3に分割する。なお、以下では分割画像を示す画像データを「分割画像データ」という。また、入力画像データの処理対象とする部分は、色変換処理のように入力画像全体を処理対象とする画像処理では、入力画像データ全体が処理対象とする部分を意味する。また、入力画像データの処理対象とする部分は、切り抜き(トリミング)処理のように入力画像の一部を処理対象とする画像処理では、入力画像の一部を意味する。以下では、錯綜を回避するために、入力画像データの処理対象とする部分を、単に「入力画像データ」という。
 また、図4に示した例では、処理部60が画像Gを正面視上下に分割しているが、これに限定されない。例えば処理部60は画像Gを正面視左右に分割してもよいし、正面視上下左右に分割してもよい。
 なお、処理部60による入力画像データの分割数は特に限定されない。例えば、処理部60は、予め定められた数又はサイズで入力画像データを分割してもよい。また、例えば、処理部60は、画像処理モジュール38による画像処理を実行する演算部が有するプロセッサ・コア数以下で、かつ2以上の数に入力画像データを分割してもよい。
 また、例えば、処理部60は、画像処理モジュール38による画像処理を実行する演算部が有するキャッシュメモリの容量以下のサイズで入力画像データを分割してもよい。この場合、例えば、処理部60は、画像処理モジュール38による画像処理を実行する演算部のプロセッサから最も遠いレベルのキャッシュメモリ、所謂LLC(Last Level Cache)の容量以下で、かつLLCの容量に極力一致するサイズで入力画像データを分割する形態が例示される。
 また、一例として図5に示すように、処理部60は、画像処理DAG50Aの各画像処理モジュール38で実行される画像処理を分割画像データの各々に対応する部分処理39に分割して、画像処理DAG50Aを画像処理DAG50Bに更新する。なお、図5は、図2Aに示した画像処理DAG50Aにおいて、入力画像データを4つの分割画像データに分割した場合の画像処理DAG50Bを示している。図5では、錯綜を回避するために、バッファモジュール40の図示を省略している。
 本実施形態に係る処理部60は、画像処理モジュール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の双方の処理が終了した場合に実行可能となる。
 本実施形態に係る制御部62は、処理部60による画像処理DAG50Aの更新処理及び依存関係の付与処理と、依存関係に基づいて実行可能となった部分処理39と、を複数のコア13に並列に実行させる制御を行う。なお、ここでいう並列は、上記更新処理及び上記付与処理と、依存関係に基づいて実行可能となった部分処理39と、の少なくとも一部の処理が、複数のコア13により並列に(同時に)実行されることを意味する。具体的には、制御部62は、画像処理DAG50Aの更新処理及び依存関係の付与処理を画像処理モジュール38毎に実行するタスク(処理)を、格納されたタスクを複数のコア13の各々が順次取り出して実行するためのタスクキュー64に格納する。さらに、制御部62は、処理部60による上記更新処理及び付与処理の処理中に、依存関係に基づいて実行可能となった部分処理39を順次タスクキュー64に格納する。
 本実施形態に係る出力部66は、制御部62による制御により、画像処理DAG50Bの最終段の画像処理モジュール38により実行された画像処理の結果得られた出力画像データを出力する。本実施形態では、出力部66は、得られた出力画像データにより示される出力画像を表示部16に表示する。なお、出力部66は、出力画像データを外部装置に出力(送信)してもよい。また、コンピュータ10がプリンタに組み込まれている場合は、出力部66は、出力画像データにより示される出力画像を紙等の記録材料に出力(形成)してもよい。
 次に、図6~図11を参照して、本実施形態に係るコンピュータ10の作用を説明する。なお、図6は、アプリケーション32により画像処理の実行開始の指示が入力された場合に演算部12によって実行されるDAG構築処理プログラムの処理の流れを示すフローチャートである。また、このDAG構築処理プログラムは記憶部20に予めインストールされている。また、演算部12における何らかのタスクを実行してなく、タスクを実行可能なコア13がDAG構築処理プログラムを実行することで、前述した処理構築部42及び制御部62として機能する。
 図6のステップ100で、処理構築部42は、アプリケーション32からの構築指示に従い、アプリケーション32が指示した画像処理を行う画像処理DAG50Aを構築する。次のステップ102で、制御部62は、ステップ100で構築された画像処理DAG50Aの更新処理及び依存関係の付与処理を画像処理モジュール38毎に実行するタスクをタスクキュー64に格納した後、本DAG構築処理を終了する。
 一例として図7に示すように、上記ステップ102の処理により、画像処理DAG50Aの更新処理及び依存関係の付与処理を画像処理モジュール38毎に実行するタスクTがタスクキュー64に格納される。そして、タスクを実行可能なコア13(図7に示す例ではコア13C)がタスクキュー64からタスクTを取り出して実行することで、図8に示すDAG更新処理が実行される。
 なお、図8は、DAG更新処理プログラムの処理の流れを示すフローチャートであり、このDAG更新処理プログラムも記憶部20に予めインストールされている。また、タスクを実行可能なコア13がDAG更新処理プログラムを実行することで、前述した処理部60及び制御部62として機能する。
 図8のステップ110で、処理部60は、画像処理DAG50Aに含まれる全ての画像処理モジュール38を、トポロジカルソート等の既知のソート手法でソートする。なお、以下のステップ112~ステップ118の繰り返し処理は、本ステップ110でソートされた全ての画像処理モジュール38の先頭から順に1つずつの画像処理モジュール38を処理対象(以下、「処理対象モジュール38」という。)として実行されるものとして説明する。
 ステップ112で、処理部60は、前述したように、入力画像データを複数の分割画像データに分割する。そして、処理部60は、前述したように、処理対象モジュール38で実行される画像処理を分割画像データの各々に対応する部分処理39に更新する。次のステップ114で、処理部60は、処理対象モジュール38の前段に画像処理モジュール38が連結されているか否かを判定する。処理部60は、この判定が肯定判定となった場合はステップ118に移行する一方、否定判定となった場合はステップ116に移行する。
 ステップ116で、制御部62は、ステップ112で分割された処理対象モジュール38の部分処理39を順次タスクキュー64に格納する。一方、ステップ118で、処理部60は、前述したように、処理対象モジュール38で実行される画像処理の種類に応じて、前段に連結された画像処理モジュール38の部分処理39と、処理対象モジュール38の部分処理39との間で依存関係を付与する。
 ステップ120で、処理部60は、上記ステップ112~118の処理を画像処理DAG50Aの全ての画像処理モジュール38に対して実行したか否かを判定する。処理部60は、この判定が否定判定となった場合はステップ112に戻る一方、肯定判定となった場合は本DAG更新処理を終了する。
 一例として図9に示すように、上記ステップ116の処理により、最前段の画像処理モジュール38の部分処理39が順次タスクキュー64に格納される。そして、タスクを実行可能なコア13(図9に示す例ではコア13A、13B)がタスクキュー64から部分処理39を取り出して実行する。一方、最前段以外の画像処理モジュール38については、引き続き上記ステップ112及びステップ116の処理が実行される。すなわち、図9に示すように、タスクTと部分処理39とが複数のコア13により並列に実行される。
 一方、図10は、アプリケーション32により画像処理の実行開始の指示が入力された場合に演算部12によって実行される部分処理実行処理プログラムの処理の流れを示すフローチャートである。また、この部分処理実行処理プログラムも記憶部20に予めインストールされている。また、タスクを実行可能なコア13が部分処理実行処理プログラムを実行することで、前述した制御部62として機能する。
 図10のステップ130で、制御部62は、タスクキュー64に部分処理39が格納されているか否かを判定する。制御部62は、この判定が否定判定となった場合は本ステップ130の処理を繰り返し実行する一方、肯定判定となった場合はステップ132に移行する。
 ステップ132で、制御部62は、タスクキュー64の先頭から1つの部分処理39を取り出して、取り出した部分処理39を実行する。次のステップ134で、制御部62は、ステップ132の処理により部分処理39の実行が終了したことに従って依存関係を更新し、依存関係に基づいて新たに実行可能となった部分処理39を順次タスクキュー64に格納する。
 次のステップ136で、制御部62は、画像処理DAG50Bの全ての画像処理モジュール38の全ての部分処理39が終了したか否かを判定する。制御部62は、この判定が否定判定となった場合はステップ130に戻る一方、肯定判定となった場合は本部分処理実行処理を終了する。また、全ての画像処理モジュール38の全ての部分処理39が終了すると、出力部66は、画像処理DAG50Bの最終段の画像処理モジュール38の部分処理39により出力された出力画像データにより示される出力画像を表示部16に出力する。
 一例として図11に示すように、タスクキュー64に格納された部分処理39がコア13(図11に示す例ではコア13A、13B)で実行される。そして、部分処理39の実行が終了すると、画像処理DAG50Aの依存関係が更新され、かつ依存関係に基づいて新たに実行可能となった部分処理39がタスクキュー64に格納される。なお、図11では、実行が終了した部分処理39を網掛けの丸印で図示し、依存関係に基づいて新たに実行可能となった部分処理39を黒塗りの丸印で図示している。
 以上説明したように、本実施形態によれば、タスクTと部分処理39とを並列に実行している。したがって、一例として図12に示すように、タスクTと部分処理39とを直列に実行する場合に比較して、画像処理の処理速度が向上される。なお、図12の上段はタスクTと部分処理39とを直列に実行した場合を示し、図12の下段は本実施形態のようにタスクTと部分処理39とを並列に実行した場合を示している。
 また、一例として図13に示すように、複数の入力画像データに対して連続して画像処理を実行する場合は、先に入力された入力画像データに対する部分処理39が全て終わっていなくても、後に入力された入力画像データに対するタスクT及び部分処理39の実行が開始される。したがって、この場合、タスクTと部分処理39とを直列に実行する場合に比較して、画像処理の処理速度がより向上される。なお、図13の上段はタスクTと部分処理39とを直列に実行した場合を示し、図13の下段は本実施形態のようにタスクTと部分処理39とを並列に実行した場合を示している。
 ここで、複数の入力画像データに対して連続して画像処理を実行する場合、例えば、先に入力された入力画像データに対して画像処理を行う部分処理39に対して、後に入力された入力画像データに対して画像処理を行う部分処理39よりも高い優先度を付与する形態としてもよい。そして、この場合、複数の部分処理39が実行可能となった場合は、優先度が高い順番で部分処理39をタスクキュー64に格納すればよい。これにより、先に入力された画像データに対する画像処理が終了するよりも前に、後に入力された画像データに対する画像処理が終了することが防止される。
 また、上記実施形態では、各種プログラムが記憶部20に予め記憶(インストール)されている態様を説明したが、これに限定されない。各種プログラムは、CD-ROM、DVD-ROM(Digital Versatile Disk Read Only Memory)、USB(Universal Serial Bus)メモリ等の記録媒体に記録された形態で提供されてもよい。また、各種プログラムは、ネットワークを介して外部装置からダウンロードされる形態としてもよい。
 上記では種々の実施の形態を説明したが、これらの実施の形態を組み合わせて構成してもよい。
 また、本開示は上記の実施の形態に何ら限定されるものではなく、本開示の要旨を逸脱しない範囲で種々の形態で実施することができる。
 本出願は、2016年3月24日出願の日本特許出願(特願2016-060526)に基づくものであり、それらの内容はここに参照として取り込まれる。
10 コンピュータ
12 演算部
13、13A~13C コア
14 メモリ
16 表示部
18 操作部
20 記憶部
22 画像データ供給部
24 画像出力部
26 バス
30 オペレーティングシステム
32 アプリケーションプログラム群
34 画像処理プログラム群
36 モジュールライブラリ
38 画像処理モジュール
39、39A~39C 部分処理
40 バッファモジュール
42 処理構築部
46 処理制御部
50A、50B 画像処理DAG
60 処理部
62 制御部
64 タスクキュー
66 出力部
B1~B3 分割画像
G 画像
T タスク
 

Claims (6)

  1.  オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置であって、
     前記オブジェクト群の各オブジェクトが実行する画像処理を、入力画像データにより示される入力画像が複数の部分領域に分割された分割画像を示す各分割画像データに対して画像処理を行う部分処理に更新する更新処理、及び、連結された前記オブジェクトの前記部分処理間に処理の依存関係を付与する付与処理を行う処理部と、
     前記処理部による前記更新処理及び前記付与処理と、前記依存関係に基づいて実行可能となった前記部分処理と、を複数の演算装置に並列に実行させる制御を行う制御部と、
     を備えた画像処理装置。
  2.  前記制御部は、前記オブジェクト群について前記更新処理及び前記付与処理を前記オブジェクト毎に順次実行するタスクを、格納されたタスクを前記複数の演算装置の各々が順次取り出して実行するためのタスクキューに格納し、かつ前記依存関係に基づいて実行可能となった前記部分処理を順次前記タスクキューに格納することで、前記並列に実行させる制御を行う
     請求項1記載の画像処理装置。
  3.  複数の入力画像データに対して連続的に画像処理を行う場合、
     前記処理部は、先に入力された入力画像データに対して画像処理を行う部分処理に対し、後に入力された入力画像データに対して画像処理を行う部分処理よりも高い優先度を付与する優先度付与処理をさらに行い、
     前記制御部は、前記依存関係に基づいて複数の前記部分処理が実行可能となった場合、前記優先度の高い順に前記部分処理を実行させる制御をさらに行う
     請求項1又は請求項2記載の画像処理装置。
  4.  前記依存関係は、連結された前記オブジェクト間において、前段に連結された前記オブジェクトの部分処理が終了した場合に、後段に連結された前記オブジェクトの部分処理が実行可能となる関係である
     請求項1から請求項3の何れか1項記載の画像処理装置。
  5.  オブジェクトが有向非循環グラフ形態で複数連結されたオブジェクト群の各オブジェクトにより画像処理を実行する画像処理装置による画像処理方法であって、
     前記オブジェクト群の各オブジェクトが実行する画像処理を、入力画像データにより示される入力画像が複数の部分領域に分割された分割画像を示す各分割画像データに対して画像処理を行う部分処理に更新する更新処理、及び、連結された前記オブジェクトの前記部分処理間に処理の依存関係を付与する付与処理と、前記依存関係に基づいて実行可能となった前記部分処理と、を複数の演算装置に並列に実行させる制御を行う
     画像処理方法。
  6.  コンピュータを、請求項1から請求項4の何れか1項記載の画像処理装置の処理部及び制御部として機能させるための画像処理プログラム。
     
PCT/JP2016/072032 2016-03-24 2016-07-27 画像処理装置、画像処理方法、及び画像処理プログラム Ceased WO2017163442A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201680078715.6A CN108475213B (zh) 2016-03-24 2016-07-27 图像处理装置、图像处理方法和图像处理程序
JP2018506750A JP6648257B2 (ja) 2016-03-24 2016-07-27 画像処理装置、画像処理方法、及び画像処理プログラム
US16/061,075 US10795725B2 (en) 2016-03-24 2016-07-27 Image processing device, image processing method, and non-transitory computer readable medium for image processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016-060526 2016-03-24
JP2016060526 2016-03-24

Publications (1)

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

Family

ID=59899872

Family Applications (1)

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

Country Status (4)

Country Link
US (1) US10795725B2 (ja)
JP (1) JP6648257B2 (ja)
CN (1) CN108475213B (ja)
WO (1) WO2017163442A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020522824A (ja) * 2017-11-20 2020-07-30 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッドShanghai Cambricon Information Technology Co.,Ltd. タスク並列処理方法、装置、システム、記憶媒体およびコンピュータ機器
JP2022130363A (ja) * 2018-10-10 2022-09-06 グーグル エルエルシー 機械学習モデルを改良して局所性を改善させること

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7039424B2 (ja) * 2018-08-31 2022-03-22 富士フイルム株式会社 画像処理装置、画像処理方法、及び画像処理プログラム
JP2022500755A (ja) * 2018-09-11 2022-01-04 ホアウェイ・テクノロジーズ・カンパニー・リミテッド 順次計算dagのための異種スケジューリング
JP6891153B2 (ja) * 2018-09-18 2021-06-18 富士フイルムビジネスイノベーション株式会社 画像処理装置、画像処理方法、及び画像処理プログラム
US11288765B2 (en) * 2020-04-28 2022-03-29 Sony Interactive Entertainment LLC System and method for efficient multi-GPU execution of kernels by region based dependencies
CN120929473B (zh) * 2025-10-15 2026-02-10 深圳金英拓联科技股份有限公司 穿戴设备图片资源的差分更新方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009199303A (ja) * 2008-02-21 2009-09-03 Fuji Xerox Co Ltd 画像処理装置、画像処理プログラム
JP2010146055A (ja) * 2008-12-16 2010-07-01 Fujifilm Corp 画像処理装置、方法及びプログラム
US20150046678A1 (en) * 2013-08-08 2015-02-12 Linear Algebra Technologies Limited Apparatus, systems, and methods for providing configurable computational imaging pipeline

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4965995B2 (ja) 2006-12-22 2012-07-04 株式会社東芝 プログラム処理方法、処理プログラム及び情報処理装置
CN101976348A (zh) * 2010-10-21 2011-02-16 中国科学院深圳先进技术研究院 图像聚类方法和系统
US9350899B2 (en) * 2012-09-14 2016-05-24 Qualcomm Incorporated Methods and device for efficient resampling and resizing of digital images
CN102930246B (zh) * 2012-10-16 2015-04-08 同济大学 一种基于点云片段分割的室内场景识别方法
CN103150148B (zh) * 2013-03-06 2016-06-01 中国科学院对地观测与数字地球科学中心 一种基于任务树的大尺度遥感影像并行镶嵌方法
US20140259563A1 (en) * 2013-03-15 2014-09-18 The Procter & Gamble Company Subassemblies comprising folded fastening tab members
CN103268614B (zh) * 2013-05-31 2016-01-20 电子科技大学 一种用于多前景共分割的前景谱图生成方法
US9348560B2 (en) * 2013-06-04 2016-05-24 Qualcomm Incorporated Efficient execution of graph-based programs
US9652817B2 (en) * 2015-03-12 2017-05-16 Samsung Electronics Co., Ltd. Automated compute kernel fusion, resizing, and interleave

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009199303A (ja) * 2008-02-21 2009-09-03 Fuji Xerox Co Ltd 画像処理装置、画像処理プログラム
JP2010146055A (ja) * 2008-12-16 2010-07-01 Fujifilm Corp 画像処理装置、方法及びプログラム
US20150046678A1 (en) * 2013-08-08 2015-02-12 Linear Algebra Technologies Limited Apparatus, systems, and methods for providing configurable computational imaging pipeline

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020522824A (ja) * 2017-11-20 2020-07-30 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッドShanghai Cambricon Information Technology Co.,Ltd. タスク並列処理方法、装置、システム、記憶媒体およびコンピュータ機器
US11113103B2 (en) 2017-11-20 2021-09-07 Shanghai Cambricon Information Technology Co., Ltd Task parallel processing method, apparatus and system, storage medium and computer device
US11113104B2 (en) 2017-11-20 2021-09-07 Shanghai Cambricon Information Technology Co., Ltd Task parallel processing method, apparatus and system, storage medium and computer device
US11221877B2 (en) 2017-11-20 2022-01-11 Shanghai Cambricon Information Technology Co., Ltd Task parallel processing method, apparatus and system, storage medium and computer device
JP7074777B2 (ja) 2017-11-20 2022-05-24 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッド タスク並列処理方法、装置、システム、記憶媒体およびコンピュータ機器
US11360811B2 (en) 2017-11-20 2022-06-14 Shanghai Cambricon Information Technology Co., Ltd Task parallel processing method, apparatus and system, storage medium and computer device
JP2022130363A (ja) * 2018-10-10 2022-09-06 グーグル エルエルシー 機械学習モデルを改良して局所性を改善させること
JP7430744B2 (ja) 2018-10-10 2024-02-13 グーグル エルエルシー 機械学習モデルを改良して局所性を改善させること
US11915139B2 (en) 2018-10-10 2024-02-27 Google Llc Modifying machine learning models to improve locality

Also Published As

Publication number Publication date
US20180365059A1 (en) 2018-12-20
JP6648257B2 (ja) 2020-02-14
CN108475213B (zh) 2021-11-30
CN108475213A (zh) 2018-08-31
US10795725B2 (en) 2020-10-06
JPWO2017163442A1 (ja) 2019-01-17

Similar Documents

Publication Publication Date Title
JP6648257B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP6632709B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
US11341599B2 (en) Image processing apparatus, image processing method, and computer readable medium storing image processing program
JP6592184B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP6534492B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP6945634B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
JP7039424B2 (ja) 画像処理装置、画像処理方法、及び画像処理プログラム
US11315212B2 (en) Image processing apparatus, image processing method, and computer readable medium for executing partial processes on image-section data items
US10783604B2 (en) Image processing apparatus, image processing method, and image processing program

Legal Events

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

Ref document number: 2018506750

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16895467

Country of ref document: EP

Kind code of ref document: A1