JP2008139968A - Image processor and program - Google Patents

Image processor and program Download PDF

Info

Publication number
JP2008139968A
JP2008139968A JP2006323640A JP2006323640A JP2008139968A JP 2008139968 A JP2008139968 A JP 2008139968A JP 2006323640 A JP2006323640 A JP 2006323640A JP 2006323640 A JP2006323640 A JP 2006323640A JP 2008139968 A JP2008139968 A JP 2008139968A
Authority
JP
Japan
Prior art keywords
module
image processing
buffer
unit
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006323640A
Other languages
Japanese (ja)
Inventor
Takashi Igarashi
貴 五十嵐
Yusuke Sugimoto
裕介 杉本
Kazuyuki Itagaki
和幸 板垣
Yukio Kumazawa
幸夫 熊澤
Takashi Nagao
隆 長尾
Yoichi Isaka
洋一 井坂
Junichi Kaneko
順一 金子
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 JP2006323640A priority Critical patent/JP2008139968A/en
Publication of JP2008139968A publication Critical patent/JP2008139968A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Input (AREA)
  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To switch priority given to a decrease in the use amount of a storage resource or the processing efficiency of image processing according to an operating environment. <P>SOLUTION: An image processing part is configured to connect buffer modules each carrying out processing for writing image data outputted from a prior-stage module into a buffer in at least one of a preceding stage and a succeeding stage of each of a plurality of image processing modules which acquire image data from the preceding stages to perform image processing and output the image data to the succeeding stages, and for reading the image data by a succeeding-stage module. In constituting the image processing part, a memory capacity allottable to each buffer module is referred to when initializing the individual buffer modules (78). When the allottable memory capacity is smaller than a capacity for one image region as a memory region allotment request size used as the buffer, the allottable memory capacity is set (82), and when the allottable memory capacity is a capacity for the one image region or more, a capacity for the one image region is set (84). The allotment of the memory region of the set size is then requested (86). <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は画像処理装置及びプログラムに係り、特に、複数の画像処理モジュールの前段及び後段の少なくとも一方にバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて成る画像処理部を備えた画像処理装置、及び、コンピュータを前記画像処理装置として機能させるための画像処理プログラムに関する。   The present invention relates to an image processing apparatus and a program, and in particular, each module is in a pipeline form or a directed acyclic graph form so that a buffer module is connected to at least one of a front stage and a rear stage of a plurality of image processing modules. And an image processing program for causing a computer to function as the image processing apparatus.

入力された画像データに対して画像処理を行う画像処理装置や、画像を取扱可能なDTP(デスクトップ・パブリッシング)システム、入力された画像データが表す画像を記録材料に記録するプリントシステム等では、入力された画像データに対して拡大・縮小、回転、アフィン変換、色変換、フィルタ処理、画像合成等の各種の画像処理が行われる。これらの装置やシステムにおいて、入力される画像データの属性や画像データに対する画像処理の内容・手順・パラメータ等が固定されている場合には、専用に設計したハードウエアによって画像処理を行わせる場合もあるが、例えば色空間や1画素当たりのビット数が異なる様々な画像データが入力されたり、画像処理の内容や手順・パラメータ等が様々に変更される場合には、実行する画像処理をより柔軟に変更可能な構成が必要となる。   In an image processing device that performs image processing on input image data, a DTP (desktop publishing) system that can handle images, a print system that records an image represented by input image data on a recording material, etc. Various types of image processing such as enlargement / reduction, rotation, affine transformation, color conversion, filter processing, and image synthesis are performed on the image data. In these devices and systems, if the attributes of the input image data and the contents, procedures, parameters, etc. of the image processing for the image data are fixed, the image processing may be performed by specially designed hardware. However, for example, when various image data with different color space and the number of bits per pixel are input, or when the contents, procedures, and parameters of the image processing are changed variously, the image processing to be executed is more flexible. A changeable configuration is required.

このような要求を満たすために、例えば特許文献1には、プログラマブルな処理モジュールをパイプライン形態やDAG(Directed Acyclic Graph:有向非循環グラフ)形態に接続して、所望の画像処理を行うことを可能とする技術が提案されている。特許文献1に記載の技術では、複数のプログラマブル演算処理部の各々における演算処理の内容と、ネットワーク部による各プログラマブル演算処理部の接続形態を、ホストコントロール手段を通じて外部から自在に設定できるように構成することで、高速かつ高度な演算処理が可能で、機能変更や系統変更に対する自由度が高いデジタル映像信号処理装置を実現している。   In order to satisfy such a requirement, for example, in Patent Document 1, a programmable processing module is connected to a pipeline form or a DAG (Directed Acyclic Graph) form to perform desired image processing. Technologies that enable this have been proposed. The technology described in Patent Literature 1 is configured so that the contents of the arithmetic processing in each of the plurality of programmable arithmetic processing units and the connection form of each programmable arithmetic processing unit by the network unit can be freely set from the outside through the host control means. As a result, a digital video signal processing apparatus capable of high-speed and advanced arithmetic processing and having a high degree of freedom for function change and system change is realized.

一方、特許文献2には、変換処理をまとめて行う画素の領域を表す変換処理区分設定を解像度に対応させて記憶しておき、画像データに対して設定された解像度を取得し、取得した解像度に対応する変換処理区分設定で近隣する画素を変換処理区分とし、同変換処理区分内の全画素をまとめて変換対象として、誤差拡散法を用いた画像変換処理を同変換処理区分単位で行う技術が開示されている。
特開平5−260373号公報 特開2005−39388号公報
On the other hand, in Patent Document 2, conversion processing classification settings representing pixel areas for performing conversion processing collectively are stored in association with resolutions, the resolution set for the image data is acquired, and the acquired resolution is acquired. Technology that performs image conversion processing using the error diffusion method in units of the same conversion processing section, with neighboring pixels set as conversion processing sections in the conversion processing section setting corresponding to, and all the pixels in the conversion processing section as a conversion target Is disclosed.
JP-A-5-260373 JP 2005-39388 A

特許文献1に記載の技術のように、複数種の画像処理モジュールを任意に組み合わせて所望の画像処理を行う画像処理装置を構成する場合、以下に述べるような問題がある。すなわち、各画像処理モジュールには、実行する画像処理の種類や内容に応じて処理し易い単位(例えば画素単位、1ライン単位、複数ライン単位、面単位等)がある。しかし、各画像処理モジュールを任意の順番で連結し協調して処理することを可能とするためには、全ての画像処理モジュールの出力単位を揃えるか、或いは各画像処理モジュールが任意の入力単位に対応可能に構成する必要があり、各画像処理モジュールの構成が複雑になる。また、各画像処理モジュールは他の画像処理モジュールと連携して動作するため、各画像処理モジュールには、入力された画像データに対して実際に画像処理を行う部分以外に、自モジュールと連結された他の画像処理モジュールとの間で画像データを受け渡す処理を制御する部分も必要となり、各画像処理モジュールの構成は一層複雑になる。   When configuring an image processing apparatus that performs desired image processing by arbitrarily combining a plurality of types of image processing modules as in the technique described in Patent Document 1, there are the following problems. That is, each image processing module has a unit (for example, a pixel unit, a line unit, a plurality of line units, a surface unit, etc.) that can be easily processed according to the type and content of image processing to be executed. However, in order to be able to connect the image processing modules in an arbitrary order and process them in a coordinated manner, the output units of all the image processing modules are aligned, or each image processing module is set to an arbitrary input unit. It is necessary to be able to cope with it, and the configuration of each image processing module becomes complicated. In addition, since each image processing module operates in cooperation with other image processing modules, each image processing module is connected to its own module other than the part that actually performs image processing on the input image data. In addition, a part for controlling processing for transferring image data to and from other image processing modules is required, and the configuration of each image processing module is further complicated.

上記の問題は、画像処理モジュールの前後にバッファを設け、個々の画像処理モジュールで各種の画像処理を行わせると共に、例えば特許文献2に記載の、誤差拡散法を用いた画像変換処理における変換対象の処理区分(変換対象の画素数)を解像度に応じて切り替える技術のように、個々の画像処理モジュールを、実行する画像処理の種類や内容に応じた処理し易い単位ずつ前段のバッファから画像データを取得するように構成することで解決可能である。   The above problem is that a buffer is provided before and after the image processing module, and various image processing is performed by each image processing module. For example, the conversion target in the image conversion processing using the error diffusion method described in Patent Document 2 Image processing modules (number of pixels to be converted) according to the resolution, each image processing module can be processed from the previous buffer in units that are easy to process according to the type and content of the image processing to be executed. It can be solved by configuring to acquire

但し、この構成において、画像処理装置が動作する環境が、バッファとして使用可能なメモリ等の記憶リソースの容量に制限がある環境である場合を考慮すると、画像処理モジュールの前後に設けられる個々のバッファを、バッファが必要となる毎に前後の画像処理モジュールにおける処理単位に応じた容量の記憶リソースの割当を要求し、割り当てられた記憶リソースをバッファとして用いると共に、バッファが不要となる毎に当該バッファとして用いていた記憶リソースを解放する機能を備えたバッファモジュールとして構成することが望ましい。しかし、上記構成では個々のバッファモジュールによって、記憶リソースの割当が頻繁に要求されることで、オーバヘッド(画像処理以外の処理による負荷)が増大し、画像処理の処理効率が低下するという問題がある。   However, in this configuration, considering the case where the environment in which the image processing apparatus operates is an environment in which the capacity of storage resources such as a memory that can be used as a buffer is limited, the individual buffers provided before and after the image processing module Each time a buffer is required, it requests allocation of a storage resource having a capacity corresponding to the processing unit in the preceding and succeeding image processing modules, and uses the allocated storage resource as a buffer. It is desirable to configure as a buffer module having a function of releasing the storage resources used as the. However, in the above-described configuration, the allocation of storage resources is frequently requested by individual buffer modules, which increases the overhead (load due to processing other than image processing) and reduces the processing efficiency of image processing. .

本発明は上記事実を考慮して成されたもので、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切替可能な画像処理装置及び画像処理プログラムを得ることが目的である。   The present invention has been made in consideration of the above facts, and is an image processing apparatus and an image processing program that can switch according to the operating environment whether priority is given to reducing the use amount of storage resources or processing efficiency of image processing. Is the purpose.

上記目的を達成するために請求項1記載の発明に係る画像処理装置は、自モジュールの前段から画像データを取得し、取得した画像データに所定の画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する機能を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、バッファとして用いる記憶リソースが不足する毎に記憶リソースの割当を要求し、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させる処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部と、前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段と、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段と、を含み、個々の前記バッファモジュールが、前記保持手段に記憶されている情報に基づいて、前記記憶リソース管理手段への記憶リソースの割当要求において前記記憶リソース管理手段に要求する記憶リソースの容量を切り替える制御手段を備えていることを特徴としている。   In order to achieve the above object, an image processing apparatus according to the first aspect of the present invention acquires image data from the previous stage of its own module, performs predetermined image processing on the acquired image data, and receives the image processing. Alternatively, at least one of the front and rear stages of the plurality of image processing modules having a function of outputting the processing result of the image processing to the subsequent stage of the module requests the allocation of the storage resource every time the storage resource used as a buffer is insufficient. Using the allocated storage resource as a buffer, the image data output from the module in the previous stage of the own module is written into the buffer, and the image data stored in the buffer is read out by the module in the subsequent stage of the own module. The individual modules are connected so that the buffer modules that perform the processing Each time a storage resource allocation is requested from the image processing unit configured to be connected in a pipeline form or a directed acyclic graph form, and the buffer module requests storage resource allocation, the requested storage module is transferred to the requesting buffer module. Information indicating the storage resource management means to be allocated and the capacity of the storage resource that can be allocated to each buffer module, or set to each buffer module that is set according to the capacity of the storage resource that can be allocated to each buffer module Holding means for holding information representing a storage resource allocation rule, and each of the buffer modules requests storage resource allocation to the storage resource management means based on the information stored in the holding means For switching the capacity of the storage resource requested to the storage resource management means It is characterized in that it comprises a stage.

請求項1記載の発明に係る画像処理装置は、自モジュールの前段から画像データを取得し、取得した画像データに所定の画像処理を行い、当該画像処理を経た画像データ又は画像処理の処理結果を自モジュールの後段へ出力する機能を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、バッファとして用いる記憶リソースが不足する毎に記憶リソースの割当を要求し、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データをバッファに書き込ませ、バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させる処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成されている。   The image processing apparatus according to the first aspect of the present invention acquires image data from the previous stage of its own module, performs predetermined image processing on the acquired image data, and obtains the image data subjected to the image processing or the processing result of the image processing. At least one of the front and rear stages of a plurality of image processing modules having a function of outputting to the subsequent stage of the own module requests the allocation of the storage resource whenever the storage resource used as a buffer is insufficient, and the allocated storage resource is buffered. The buffer modules are connected to each other so that the image data output from the module preceding the module is written to the buffer and the image data stored in the buffer is read by the module subsequent to the module. Each module can be pipelined or directed acyclic graph In is constructed are connected.

また、記憶リソース管理手段は、バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当て、保持手段には、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報が保持されている。なお、上記の記憶リソースとしてはメモリが好適であるが、HDD(Hard Disk Drive)やフラッシュメモリ等であってもよい。また、個々のバッファモジュールへの記憶リソースの割当規則としては、具体的には、「個々のバッファモジュールに、例えば画像データ1面分、或いは1ライン分の(に相当する容量の)記憶リソースを割当てる」等の割当規則を適用することができるが、このような割当規則は、例えば請求項5に記載したように、利用者によって入力手段を介して入力され、保持手段は、入力手段を介して利用者によって入力された割当規則を表す情報を保持するように構成することができる。そして請求項1記載の発明では、個々のバッファモジュールに、保持手段に記憶されている情報に基づいて、記憶リソース管理手段への記憶リソースの割当要求において記憶リソース管理手段に要求する記憶リソースの容量を切り替える制御手段が設けられている。   The storage resource management means allocates the requested storage resource to the requesting buffer module each time a storage resource is requested from the buffer module, and the holding means can be assigned to each buffer module. The information indicating the storage resource capacity or the storage resource allocation rule to each buffer module set according to the storage resource capacity that can be allocated to each buffer module is stored. A memory is suitable as the storage resource, but an HDD (Hard Disk Drive), a flash memory, or the like may be used. In addition, as a rule for allocating storage resources to individual buffer modules, specifically, “For each buffer module, for example, storage resources for one surface of image data or for one line (corresponding capacity) An allocation rule such as “allocation” can be applied. Such an allocation rule is input by a user through an input unit as described in claim 5, for example, and a holding unit is input through the input unit. It is possible to configure so as to hold information representing the allocation rule input by the user. According to the first aspect of the present invention, the capacity of the storage resource requested to the storage resource management means in the storage resource allocation request to the storage resource management means based on the information stored in the holding means in each buffer module Control means for switching is provided.

これにより、例えばバッファとして使用可能な記憶リソースが限られている動作環境であれば、個々のバッファモジュールに割当可能な記憶リソースの容量を比較的小さい容量に制限する情報を保持手段に保持させておくことで、個々のバッファモジュールが、比較的小さい容量を単位として記憶リソースの割当を記憶リソース管理手段に要求することになり、記憶リソースの使用が節約される。また、例えばバッファとして使用可能な記憶リソースが潤沢に設けられている動作環境であれば、個々のバッファモジュールに割当可能な記憶リソースの容量を比較的大きい容量にする情報を保持手段に保持させておくことで、個々のバッファモジュールが、比較的大きい容量を単位として記憶リソースの割当を記憶リソース管理手段に要求することになり、記憶リソース管理手段に対して記憶リソースの割当が要求される頻度が低下(回数が減少)してオーバーヘッドが削減されることで、画像処理の処理効率が向上される。従って、請求項1記載の発明によれば、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切り替えることが可能となる。   Thus, for example, in an operating environment in which the storage resources that can be used as buffers are limited, the storage means holds information that limits the capacity of storage resources that can be allocated to individual buffer modules to a relatively small capacity. Thus, each buffer module requests storage resource management means to allocate storage resources in units of a relatively small capacity, and the use of storage resources is saved. Also, for example, in an operating environment where there are plenty of storage resources that can be used as buffers, the holding means holds information that makes the storage resource capacity that can be allocated to each buffer module relatively large. Thus, each buffer module requests storage resource management means to allocate storage resources in units of relatively large capacity, and the frequency with which storage resource management means is requested for storage resource management means. By reducing the overhead (reducing the number of times) and reducing the overhead, the processing efficiency of the image processing is improved. Therefore, according to the first aspect of the present invention, it is possible to switch according to the operating environment whether to give priority to reducing the use amount of storage resources or to give priority to the processing efficiency of image processing.

なお、バッファとして使用可能な記憶リソースが潤沢に設けられている場合、記憶リソースの割当要求においてバッファモジュールが記憶リソース管理手段に要求する記憶リソースの容量を大きくする程、記憶リソース管理手段に対して記憶リソースの割当が要求される頻度が低下(回数が減少)するものの、個々のバッファモジュールに必要以上の容量の記憶リソースを割当ててしまうと、割当てた記憶リソースのうちの一部が有効に利用されず、記憶リソースの有効利用率が低下する。   When there are plenty of storage resources that can be used as buffers, the larger the storage resource capacity that the buffer module requests from the storage resource management means in the storage resource allocation request, the more the storage resource management means Although the frequency at which storage resource allocation is requested decreases (the number of times decreases), if a storage resource with a capacity larger than necessary is allocated to each buffer module, part of the allocated storage resource is used effectively. In other words, the effective utilization rate of the storage resource is reduced.

上記を考慮すると、請求項1記載の発明において、個々のバッファモジュールの制御手段は、例えば請求項2に記載したように、保持手段に記憶されている情報に基づき、個々のバッファモジュールに割当可能な記憶リソースの容量を認識し、認識した容量及び予め定められた上限容量(例えば1面分の画像を記憶可能な容量)のうちの小さい方を、記憶リソース管理手段への記憶リソースの割当要求において記憶リソース管理手段に要求する記憶リソースの容量として設定するように構成することが好ましい。これにより、バッファとして使用可能な記憶リソースが潤沢に設けられている場合にも、記憶リソースの割当要求においてバッファモジュールが記憶リソース管理手段に要求する記憶リソースの容量は上限容量以下に制限されるので、記憶リソースを有効に利用することができる。   In consideration of the above, in the first aspect of the invention, the control means of each buffer module can be assigned to each buffer module based on the information stored in the holding means, for example, as described in claim 2 The storage resource management means is requested to allocate the smaller one of the recognized capacity and the predetermined upper limit capacity (for example, the capacity capable of storing an image for one surface). In this case, it is preferable to set the storage resource capacity required for the storage resource management means. As a result, even when there are plenty of storage resources that can be used as buffers, the storage resource capacity requested by the buffer module to the storage resource management means in the storage resource allocation request is limited to the upper limit capacity or less. The storage resource can be used effectively.

請求項3記載の発明に係る画像処理装置は、画像データに対する画像処理を予め設定された単位処理データ量ずつ行う画像処理エンジン、及び、前記画像処理エンジンが画像処理を行う画像データを自モジュールの前段から取得すると共に、前記画像処理エンジンによる画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する制御手段を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させると共に、バッファとして用いる記憶リソースが不足する毎に、自モジュールの前段のモジュールによる1回の書き込みによって前記バッファに書き込まれる画像データ量、及び、自モジュールの後段のモジュールによる1回の読み出しによって前記バッファから読み出される画像データ量に応じた容量の記憶モジュールの割当を要求する処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部と、前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段と、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段と、を含み、個々の前記画像処理モジュールの制御手段が、前記保持手段に記憶されている情報に基づいて画像処理の繰り返し回数Nを設定し、単位処理データ量にNを乗じた画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力を行うと共に、画像処理エンジンによる単位処理データ量ずつの画像処理をN回繰り返させることで、自モジュールの前段からの画像データに対する画像処理を行わせることを特徴としている。   An image processing apparatus according to a third aspect of the present invention provides an image processing engine that performs image processing on image data for each unit processing data amount set in advance, and image data that the image processing engine performs image processing on At least one of the front and rear stages of a plurality of image processing modules provided with control means for obtaining from the previous stage and outputting image data processed by the image processing engine or the processing result of the image processing to the subsequent stage of the own module Using the allocated storage resource as a buffer, the image data output from the module in the previous stage of the own module is written into the buffer, and the image data stored in the buffer is read out by the module in the subsequent stage of the own module. Each time a storage resource used as a buffer is insufficient Storage of a capacity corresponding to the amount of image data written to the buffer by one writing by the module preceding the module and the amount of image data read from the buffer by one reading by the module subsequent to the module An image processing unit configured such that individual modules are connected in a pipelined form or a directed acyclic graph form so that buffer modules that perform processing for requesting module allocation are connected to each other, and stored from the buffer module Each time resource allocation is requested, storage resource management means for allocating the requested storage resource to the requesting buffer module and information indicating the storage resource capacity that can be allocated to each buffer module, or individual Storage resources that can be assigned to different buffer modules Holding means for holding information indicating a rule for allocating storage resources to individual buffer modules, which is set according to the capacity of the storage module, and the control means of each of the image processing modules stores the information in the holding means The number of repetitions N of image processing is set based on the stored information, and image data is acquired from the previous stage of the own module and is sent to the subsequent stage of the own module in units of the amount of image data obtained by multiplying the unit processing data amount by N. In addition to outputting image data, the image processing for each unit processing data amount by the image processing engine is repeated N times to perform image processing on the image data from the previous stage of the own module.

請求項3記載の発明に係る画像処理部は、画像データに対する画像処理を予め設定された単位処理データ量ずつ行う画像処理エンジン、及び、画像処理エンジンが画像処理を行う画像データを自モジュールの前段から取得すると共に、画像処理エンジンによる画像処理を経た画像データ又は画像処理の処理結果を自モジュールの後段へ出力する制御手段を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データをバッファに書き込ませ、バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させると共に、バッファとして用いる記憶リソースが不足する毎に、自モジュールの前段のモジュールによる1回の書き込みによってバッファに書き込まれる画像データ量、及び、自モジュールの後段のモジュールによる1回の読み出しによってバッファから読み出される画像データ量に応じた容量の記憶モジュールの割当を要求する処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成されている。   An image processing unit according to a third aspect of the invention includes an image processing engine that performs image processing on image data by a predetermined unit processing data amount, and image data that the image processing engine performs image processing on the front stage of its own module. Assigned to at least one of the preceding and succeeding stages of a plurality of image processing modules having control means for outputting image data processed by the image processing engine or image processing results to the succeeding stage of the own module. The stored memory resource is used as a buffer, image data output from the module in the previous stage of its own module is written into the buffer, and the image data stored in the buffer is read out by the module in the subsequent stage of its own module, Each time there is a shortage of storage resources to use, Processing for requesting allocation of a storage module having a capacity corresponding to the amount of image data written to the buffer by one writing by the module and the amount of image data read from the buffer by one reading by the module subsequent to the module. The individual modules are connected in a pipeline form or a directed acyclic graph form so that the buffer modules to be performed are connected to each other.

また、請求項3記載の発明は、請求項1記載の発明と同様の記憶リソース管理手段及び保持手段が設けられており、個々の画像処理モジュールの制御手段は、保持手段に記憶されている情報に基づいて画像処理の繰り返し回数Nを設定し、単位処理データ量にNを乗じた画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力を行うと共に、画像処理エンジンによる単位処理データ量ずつの画像処理をN回繰り返させることで、自モジュールの前段からの画像データに対する画像処理を行わせる。   The invention described in claim 3 is provided with storage resource management means and holding means similar to those of the invention described in claim 1, and the control means of each image processing module is information stored in the holding means. The number N of image processing repetitions is set based on the above, and the image data amount obtained by multiplying the unit processing data amount by N is used as a unit to acquire image data from the previous stage of the own module and output the image data to the subsequent stage of the own module. In addition, the image processing for each unit processing data amount by the image processing engine is repeated N times to perform image processing on the image data from the previous stage of the own module.

このように、請求項3記載の発明に係るバッファモジュールは、バッファとして用いる記憶リソースが不足する毎に、自モジュールの前段のモジュールによる1回の書き込みによってバッファに書き込まれる画像データ量、及び、自モジュールの後段のモジュールによる1回の読み出しによってバッファから読み出される画像データ量に応じた容量の記憶モジュールの割当を要求するので、記憶リソースの割当要求においてバッファモジュールが記憶リソース管理手段に要求する記憶リソースの容量は、バッファモジュールの前段の画像処理モジュールによってバッファに一度に書き込まれる画像データ量及び後段の画像処理モジュールによってバッファから一度に読み出される画像データ量に応じて変化する。   As described above, the buffer module according to the third aspect of the present invention has the amount of image data written to the buffer by one writing by the module preceding the module each time the storage resource used as the buffer is insufficient, and the buffer module itself. Storage resource requested by the buffer module to the storage resource management means in the storage resource allocation request because the allocation of the storage module having a capacity corresponding to the amount of image data read from the buffer by one reading by the module subsequent to the module is requested. The capacity of the image data changes in accordance with the amount of image data written to the buffer at a time by the image processing module in the previous stage of the buffer module and the amount of image data read out from the buffer at the same time by the image processing module in the subsequent stage.

このため、例えばバッファとして使用可能な記憶リソースが限られている動作環境であれば、個々のバッファモジュールに割当可能な記憶リソースの容量を比較的小さい容量に制限する情報を保持手段に保持させておくことで、バッファモジュールに接続された画像処理モジュールの制御手段により、画像処理の繰り返し回数Nとして比較的小さい値が設定され、比較的小さい画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力が行われる。そして、これに伴って、個々のバッファモジュールが、比較的小さい容量を単位として記憶リソースの割当を記憶リソース管理手段に要求することになり、記憶リソースの使用が節約される。また、例えばバッファとして使用可能な記憶リソースが潤沢に設けられている動作環境であれば、個々のバッファモジュールに割当可能な記憶リソースの容量を比較的大きい容量にする情報を保持手段に保持させておくことで、バッファモジュールに接続された画像処理モジュールの制御手段により、画像処理の繰り返し回数Nとして比較的大きい値が設定され、比較的大きい画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力が行われる。そして、これに伴って、個々のバッファモジュールが、比較的大きい容量を単位として記憶リソースの割当を記憶リソース管理手段に要求することになり、記憶リソース管理手段に対して記憶リソースの割当が要求される頻度が低下(回数が減少)してオーバーヘッドが削減されることで、画像処理の処理効率が向上される。従って、請求項3記載の発明においても、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切り替えることが可能となる。   For this reason, for example, in an operating environment where the storage resources that can be used as buffers are limited, the storage means holds information that limits the storage resource capacity that can be allocated to each buffer module to a relatively small capacity. Thus, the control unit of the image processing module connected to the buffer module sets a relatively small value as the number of repetitions N of the image processing, and the image from the previous stage of the own module is set in units of a relatively small amount of image data. Data is acquired and image data is output to the subsequent stage of the module. Along with this, each buffer module requests storage resource management means to allocate storage resources in units of relatively small capacity, thereby saving the use of storage resources. Also, for example, in an operating environment where there are plenty of storage resources that can be used as buffers, the holding means holds information that makes the storage resource capacity that can be allocated to each buffer module relatively large. Thus, the control means of the image processing module connected to the buffer module sets a relatively large value as the number of repetitions N of the image processing, and the image from the previous stage of the own module in units of a relatively large amount of image data. Data is acquired and image data is output to the subsequent stage of the module. Along with this, each buffer module requests storage resource management means to allocate storage resources in units of relatively large capacity, and storage resource management means are requested to allocate storage resources. The frequency of image processing decreases (the number of times decreases) and overhead is reduced, so that the processing efficiency of image processing is improved. Therefore, in the invention as set forth in claim 3, it is possible to switch according to the operating environment whether priority is given to reducing the use amount of storage resources or priority is given to the processing efficiency of image processing.

なお、請求項3記載の発明において、個々の画像処理モジュールの制御手段は、例えば請求項4にも記載したように、画像処理エンジン、及び、画像処理エンジンが画像処理を行う画像データを単位処理データ量ずつ取得すると共に、画像処理エンジンによる画像処理を経た画像データ又は画像処理の処理結果を出力する第1制御手段を備えた画像処理モジュールに、保持手段に記憶されている情報に基づいて、画像処理の繰り返し回数Nを設定すると共に、単位処理データ量にNを乗じた画像データ量を単位として自モジュールの前段からの画像データを取得し、取得した画像データを単位処理データ量ずつ前記第1制御手段へ引き渡し、かつ、画像処理エンジンで画像処理が行われることで第1制御手段から出力される画像データ又は画像処理の処理結果をN回分蓄積した後に自モジュールの後段へ出力する第2制御部が追加され、第1制御部と第2制御部が協働することで実現されるようにしてもよい。   In addition, in the invention described in claim 3, the control means of each image processing module performs unit processing on the image processing engine and image data on which the image processing engine performs image processing as described in claim 4, for example. Based on the information stored in the holding means in the image processing module provided with the first control means for obtaining the data amount and outputting the image data processed by the image processing engine or the processing result of the image processing, The number N of repetitions of image processing is set, and image data from the previous stage of the module is acquired in units of the amount of image data obtained by multiplying the unit processing data amount by N. The acquired image data is incremented by the unit processing data amount. The image data or the image output from the first control means is delivered to the one control means and the image processing engine performs image processing. Processing result of the processing a second control unit for outputting to the subsequent module itself is added after N times accumulation, the second control unit and the first control unit may also be realized by cooperating.

これにより、請求項3記載の発明に係る画像処理装置を、コンピュータでプログラムを実行させることで実現する場合に、個々の画像処理モジュールの画像処理エンジンが行う画像処理の種類等に拘わらず、個々の画像処理モジュールの第2制御手段として機能するプログラムを全ての画像処理モジュールで共通化することができるので、画像処理装置の開発負荷を軽減することができる。   Thus, when the image processing apparatus according to the third aspect of the present invention is realized by causing a computer to execute a program, the image processing apparatus performs the individual processing regardless of the type of image processing performed by the image processing engine of each image processing module. Since the program that functions as the second control means of the image processing module can be shared by all the image processing modules, the development load of the image processing apparatus can be reduced.

請求項6記載の発明に係る画像処理プログラムは、コンピュータを、自モジュールの前段から画像データを取得し、取得した画像データに所定の画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する機能を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、バッファとして用いる記憶リソースが不足する毎に記憶リソースの割当を要求し、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させる処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部、前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段、及び、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段として機能させ、個々の前記バッファモジュールが、前記保持手段に記憶されている情報に基づいて、前記記憶リソース管理手段への記憶リソースの割当要求において前記記憶リソース管理手段に要求する記憶リソースの容量を切り替える制御手段を備えていることを特徴としている。   According to a sixth aspect of the present invention, there is provided an image processing program that obtains image data from a preceding stage of its own module, performs predetermined image processing on the acquired image data, and the image data that has undergone the image processing or the image processing When the storage resource used as a buffer is insufficient, at least one of the front and rear stages of the plurality of image processing modules having the function of outputting the processing result of the module to the subsequent stage of the module is requested and allocated. Using the storage resource as a buffer, the image data output from the module preceding the own module is written to the buffer, and the image data stored in the buffer is read by the module subsequent to the module. Individual modules are pied so that each buffer module is connected. An image processing unit configured to be connected in a line form or a directed acyclic graph form, and whenever a storage resource is requested to be allocated from the buffer module, a storage resource having a requested capacity is allocated to the requesting buffer module. Information indicating the storage resource management means and the storage resource capacity that can be allocated to each buffer module, or set to each buffer module that is set according to the storage resource capacity that can be allocated to each buffer module Functioning as a holding means for holding information representing an allocation rule of storage resources, and each of the buffer modules in a storage resource allocation request to the storage resource management means based on the information stored in the holding means Switching the storage resource capacity requested to the storage resource management means It is characterized in that it comprises a control means.

請求項6記載の発明に係る画像処理プログラムは、コンピュータを、上記の画像処理部、記憶リソース管理手段及び保持手段として機能させると共に、画像処理部を構成する個々のバッファモジュールを上記の制御手段を備えた構成とするためのプログラムであるので、コンピュータが請求項6記載の発明に係る画像処理プログラムを実行することで、前記コンピュータが請求項1に記載の画像処理装置として機能することになり、請求項1記載の発明と同様に、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切替可能とすることができる。   According to a sixth aspect of the present invention, there is provided an image processing program that causes a computer to function as the image processing unit, the storage resource management unit, and the holding unit, and that the individual buffer modules constituting the image processing unit are controlled by the control unit. Since the computer is a program for providing the configuration, the computer functions as the image processing apparatus according to claim 1 by executing the image processing program according to the invention according to claim 6, Similarly to the first aspect of the present invention, it is possible to switch according to the operating environment whether priority is given to reducing the use amount of storage resources or processing efficiency of image processing.

請求項7記載の発明に係る画像処理プログラムは、コンピュータを、画像データに対する画像処理を予め設定された単位処理データ量ずつ行う画像処理エンジン、及び、前記画像処理エンジンが画像処理を行う画像データを自モジュールの前段から取得すると共に、前記画像処理エンジンによる画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する制御手段を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させると共に、バッファとして用いる記憶リソースが不足する毎に、自モジュールの前段のモジュールによる1回の書き込みによって前記バッファに書き込まれる画像データ量、及び、自モジュールの後段のモジュールによる1回の読み出しによって前記バッファから読み出される画像データ量に応じた容量の記憶モジュールの割当を要求する処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部、前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段、及び個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段として機能させ、個々の前記画像処理モジュールの制御手段が、前記保持手段に記憶されている情報に基づいて画像処理の繰り返し回数Nを設定し、単位処理データ量にNを乗じた画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力を行うと共に、画像処理エンジンによる単位処理データ量ずつの画像処理をN回繰り返させることで、自モジュールの前段からの画像データに対する画像処理を行わせることを特徴としている。   According to a seventh aspect of the present invention, there is provided an image processing program for causing a computer to execute an image processing engine that performs image processing on image data by a predetermined unit processing data amount, and image data that the image processing engine performs image processing. Obtained from the previous stage of the own module and provided with control means for outputting the image data subjected to the image processing by the image processing engine or the processing result of the image processing to the subsequent stage of the own module. At least one of the allocated storage resources is used as a buffer, the image data output from the module in the previous stage of the own module is written into the buffer, and the image data stored in the buffer is transferred to the module in the subsequent stage of the own module. And read as a buffer. The amount of image data written to the buffer by one write by the module preceding the module each time the resource is insufficient, and the amount of image data read from the buffer by one read by the module subsequent to the module An image processing unit configured such that individual modules are connected in a pipeline form or a directed acyclic graph form so that buffer modules that perform processing for requesting allocation of storage modules according to Each time storage resource allocation is requested from the buffer module, storage resource management means for allocating the requested storage resource to the requesting buffer module, and the storage resource capacity that can be allocated to each buffer module Information or individual buffer modules Functioning as a holding unit that holds information representing a storage resource allocation rule for each buffer module, which is set according to the capacity of the storage resource that can be allocated to each of the image processing modules. Based on the information stored in the holding means, the number N of image processing repetitions is set, and the image data amount obtained from the previous stage of the own module and the own module are set in units of the image data amount obtained by multiplying the unit processing data amount by N. The image data is output to the subsequent stage, and the image processing is performed on the image data from the previous stage of the own module by repeating the image processing for each unit processing data amount by the image processing engine N times. Yes.

請求項7記載の発明に係る画像処理プログラムは、コンピュータを、上記の画像処理部、記憶リソース管理手段及び保持手段として機能させると共に、画像処理部を構成する個々の画像処理モジュールの制御手段を上記構成とするためのプログラムであるので、コンピュータが請求項7記載の発明に係る画像処理プログラムを実行することで、前記コンピュータが請求項3に記載の画像処理装置として機能することになり、請求項3記載の発明と同様に、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切替可能とすることができる。   An image processing program according to a seventh aspect of the present invention causes a computer to function as the image processing unit, the storage resource management unit, and the holding unit, and controls the control unit of each image processing module constituting the image processing unit. Since this is a program for configuring, when the computer executes the image processing program according to the invention described in claim 7, the computer functions as the image processing apparatus described in claim 3. Similarly to the invention described in 3, it is possible to switch whether to give priority to reduction of the use amount of storage resources or to give priority to the processing efficiency of image processing according to the operating environment.

以上説明したように本発明は、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報又は個々のバッファモジュールへの記憶リソースの割当規則を表す情報に基づいて、個々の前記バッファモジュールが、記憶リソース管理手段への記憶リソースの割当要求において記憶リソース管理手段に要求する記憶リソースの容量を切り替えるようにしたので、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切替可能となる、という優れた効果を有する。   As described above, the present invention is based on information indicating the capacity of storage resources that can be allocated to individual buffer modules or information indicating the rules for allocating storage resources to individual buffer modules. Since the storage resource capacity requested to the storage resource management means is switched in the storage resource allocation request to the storage resource management means, it is determined whether priority is given to reducing the use amount of the storage resource or processing efficiency of the image processing. It has an excellent effect that it can be switched according to the operating environment.

また本発明は、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報又は個々のバッファモジュールへの記憶リソースの割当規則を表す情報に基づいて、個々の画像処理モジュールが、画像処理の繰り返し回数Nを設定し、単位処理データ量にNを乗じた画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力を行うと共に、画像処理エンジンによる単位処理データ量ずつの画像処理をN回繰り返させることで、自モジュールの前段からの画像データに対する画像処理を行わせるようにしたので、記憶リソースの使用量低減を優先するか画像処理の処理効率を優先するかを動作環境に応じて切替可能となる、という優れた効果を有する。   According to the present invention, each image processing module repeats image processing based on information indicating the capacity of storage resources that can be allocated to individual buffer modules or information indicating rules for allocating storage resources to individual buffer modules. The number of times N is set, and the image data amount obtained by multiplying the unit processing data amount by N is used as a unit to acquire the image data from the previous stage of the own module and output the image data to the subsequent stage of the own module. By repeating the image processing for each unit processing data amount by N times, the image processing is performed on the image data from the previous stage of its own module. It has an excellent effect that it is possible to switch whether to give priority to efficiency according to the operating environment.

以下、図面を参照して本発明の実施形態の一例を詳細に説明する。   Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings.

〔第1実施形態〕
図1には、本発明に係る画像処理装置として機能することが可能なコンピュータ10が示されている。なお、このコンピュータ10は、複写機、プリンタ、ファクシミリ装置、これらの機能を兼ね備えた複合機、スキャナ、写真プリンタ等のように内部で画像処理を行う必要のある任意の画像取扱機器に組み込まれていてもよいし、パーソナル・コンピュータ(PC)等の独立したコンピュータであってもよく、更にPDA(Personal Digital Assistant)や携帯電話機等の携帯機器に組み込まれたコンピュータであってもよい。
[First Embodiment]
FIG. 1 shows a computer 10 that can function as an image processing apparatus according to the present invention. The computer 10 is incorporated in any image handling apparatus that needs to perform image processing internally, such as a copying machine, a printer, a facsimile machine, a multifunction machine having these functions, a scanner, a photographic printer, or the like. Alternatively, it may be an independent computer such as a personal computer (PC), or may be a computer incorporated in a portable device such as a PDA (Personal Digital Assistant) or a cellular phone.

コンピュータ10はCPU12、DRAM又はSRAM等から成るメモリ14、表示部16、操作部18、記憶部20、画像データ供給部22及び画像出力部24を備えており、これらはバス26を介して互いに接続されている。コンピュータ10が上述したような画像取扱機器に組み込まれている場合、表示部16や操作部18としては、画像取扱機器に設けられたLCD等から成る表示パネルやテンキー等を適用することができる。また、コンピュータ10が独立したコンピュータである場合、表示部16や操作部18としては、当該コンピュータに接続されたディスプレイやキーボード、マウス等を適用することができる。また、記憶部20としてはHDD(Hard Disk Drive)が好適であるが、これに代えてフラッシュメモリ等の他の不揮発性記憶手段を用いることも可能である。   The computer 10 includes a CPU 12, a memory 14 including a DRAM or SRAM, a display unit 16, an operation unit 18, a storage unit 20, an image data supply unit 22, and an image output unit 24, which are connected to each other via a bus 26. Has been. When the computer 10 is incorporated in the image handling device as described above, a display panel, a numeric keypad, or the like composed of an LCD or the like provided in the image handling device can be applied as the display unit 16 and the operation unit 18. When the computer 10 is an independent computer, a display, a keyboard, a mouse, or the like connected to the computer can be applied as the display unit 16 or the operation unit 18. The storage unit 20 is preferably an HDD (Hard Disk Drive), but other nonvolatile storage means such as a flash memory can be used instead.

また、画像データ供給部22は処理対象の画像データを供給できるものであればよく、例えば紙や写真フィルム等の記録材料に記録されている画像を読み取って画像データを出力する画像読取部、通信回線を介して外部から画像データを受信する受信部、画像データを記憶する画像記憶部(メモリ14又は記憶部20)等を適用することができる。また、画像出力部24は画像処理を経た画像データ又は該画像データが表す画像を出力するものであればよく、例えば画像データが表す画像を紙や感光材料等の記録材料に記録する画像記録部、画像データが表す画像をディスプレイ等に表示する表示部、画像データを記録メディアに書き込む書込装置、画像データを通信回線を介して送信する送信部を適用することができる。また、画像出力部24は画像処理を経た画像データを単に記憶する画像記憶部(メモリ14又は記憶部20)であっても構わない。   The image data supply unit 22 only needs to be able 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. A receiving unit that receives image data from the outside via a line, an image storage unit (memory 14 or storage unit 20) that stores image data, and the like can be applied. The image output unit 24 may be any unit that outputs image data that has undergone image processing or an image represented by the image data. For example, the image recording unit records an image represented by the image data on a recording material such as paper or a photosensitive material. A display unit that displays an image represented by image data on a display, a writing device that writes image data to a recording medium, and a transmission unit that transmits image data via a communication line can be applied. The image output unit 24 may be an image storage unit (memory 14 or storage unit 20) that simply stores image data that has undergone image processing.

図1に示すように、記憶部20には、CPU12によって実行される各種のプログラムとして、メモリ14等のリソースの管理やCPU12によるプログラムの実行の管理、コンピュータ10と外部との通信等を司るオペレーティングシステム30のプログラム、コンピュータ10を本発明に係る画像処理装置として機能させるための画像処理プログラム群34、CPU12が上記画像処理プログラム群を実行することで実現される画像処理装置に対して所望の画像処理を行わせる各種のアプリケーション32のプログラム(図1ではアプリケーションプログラム群32と表記)が各々記憶されている。   As shown in FIG. 1, the storage unit 20 includes various programs executed by the CPU 12, such as management of resources such as the memory 14, management of execution of programs by the CPU 12, and communication between the computer 10 and the outside. A program of the system 30, an image processing program group 34 for causing the computer 10 to function as an image processing apparatus according to the present invention, and a desired image for the image processing apparatus realized by the CPU 12 executing the image processing program group. Programs of various applications 32 to be processed (represented as application program group 32 in FIG. 1) are stored.

画像処理プログラム群34は、前述した各種の画像取扱機器や携帯機器を開発する際の開発負荷を軽減したり、PC等で利用可能な画像処理プログラムを開発する際の開発負荷を軽減することを目的として、各種の画像取扱機器や携帯機器、PC等の各種機器(プラットフォーム)で共通に使用可能に開発されたプログラムであり、本発明に係る画像処理プログラムに対応している。画像処理プログラム群34によって実現される画像処理装置は、アプリケーション32からの構築指示に従い、アプリケーション32が指示した画像処理を行う画像処理部を構築し、アプリケーション32からの実行指示に従い、前記画像処理部によって画像処理を行うが(詳細は後述)、画像処理プログラム群34は、所望の画像処理を行う画像処理部(所望の構成の画像処理部)の構築を指示したり、構築された画像処理部による画像処理の実行を指示するためのインタフェースをアプリケーション32に提供している。このため、内部で画像処理を行う必要のある任意の機器を新規開発する等の場合にも、前記画像処理を行うプログラムの開発に関しては、当該機器で必要とされる画像処理を上記のインタフェースを利用して画像処理プログラム群34に行わせるアプリケーション32を開発するのみで済み、実際に画像処理を行うプログラムを新たに開発する必要が無くなるので、開発負荷を軽減することができる。   The image processing program group 34 reduces the development load when developing the above-described various image handling devices and portable devices, and reduces the development load when developing an image processing program usable on a PC or the like. The purpose is a program developed so that it can be commonly used in various devices (platforms) such as various image handling devices, portable devices, and PCs, and corresponds to the image processing program according to the present invention. The image processing apparatus realized by the image processing program group 34 constructs an image processing unit that performs image processing instructed by the application 32 in accordance with a construction instruction from the application 32, and executes the image processing unit in accordance with an execution instruction from the application 32. The image processing program group 34 instructs the construction of an image processing unit (an image processing unit having a desired configuration) for performing desired image processing, or the constructed image processing unit. The application 32 is provided with an interface for instructing execution of image processing according to the above. For this reason, even when newly developing an arbitrary device that needs to perform image processing internally, regarding the development of a program for performing the image processing, the above-described interface is used to perform the image processing required for the device. It is only necessary to develop the application 32 to be used and executed by the image processing program group 34, and it is not necessary to newly develop a program for actually performing image processing, so that the development load can be reduced.

また、画像処理プログラム群34によって実現される画像処理装置は、前述のように、アプリケーション32からの構築指示に従い、アプリケーション32が指示した画像処理を行う画像処理部を構築し、構築した画像処理部によって画像処理を行うので、例えば画像処理対象の画像データの色空間や1画素当たりのビット数が不定であったり、実行すべき画像処理の内容や手順・パラメータ等が不定である場合にも、アプリケーション32が画像処理部の再構築を指示することで、画像処理装置(画像処理部)によって実行される画像処理を、処理対象の画像データ等に応じて柔軟に変更することができる。   Further, as described above, the image processing apparatus realized by the image processing program group 34 constructs an image processing unit that performs image processing instructed by the application 32 according to the construction instruction from the application 32, and constructs the constructed image processing unit. Therefore, for example, when the color space of the image data to be processed and the number of bits per pixel are indefinite or the contents of the image processing to be executed, the procedure / parameter, etc. are indefinite, When the application 32 instructs to reconstruct the image processing unit, the image processing executed by the image processing apparatus (image processing unit) can be flexibly changed according to the image data to be processed.

以下、画像処理プログラム群34について説明する。図1に示すように、画像処理プログラム群34はモジュールライブラリ36と、処理構築部42のプログラムと、処理管理部46のプログラムに大別される。詳細は後述するが、本実施形態に係る処理構築部42は、アプリケーションからの指示により、例として図2に示すように、予め定められた画像処理を行う1つ以上の画像処理モジュール38と、個々の画像処理モジュール38の前段及び後段の少なくとも一方に配置され画像データを記憶するためのバッファを備えたバッファモジュール40と、がパイプライン形態又はDAG(Directed Acyclic Graph:有向非循環グラフ)形態で連結されて成る画像処理部50を構築する。画像処理部50を構成する個々の画像処理モジュールの実体はCPU12によって実行されCPU12で所定の画像処理を行わせるための第1プログラム、又は、CPU12によって実行されCPU12により図1に図示されていない外部の画像処理装置(例えば専用画像処理ボード等)に対する処理の実行を指示するための第2プログラムであり、上述したモジュールライブラリ36には、予め定められた互いに異なる画像処理(例えば入力処理やフィルタ処理、色変換処理、拡大・縮小処理、スキュー角検知処理、画像回転処理、画像合成処理、出力処理等)を行う複数種の画像処理モジュール38のプログラムが各々登録されている。以下では、説明を簡単にするために、画像処理部50を構成する個々の画像処理モジュールの実体が上記の第1プログラムであるものとして説明する。   Hereinafter, the image processing program group 34 will be described. As shown in FIG. 1, the image processing program group 34 is roughly divided into a module library 36, a process construction unit 42 program, and a process management unit 46 program. As will be described in detail later, the processing construction unit 42 according to the present embodiment, according to an instruction from the application, as illustrated in FIG. 2 as an example, one or more image processing modules 38 that perform predetermined image processing, A buffer module 40 that is arranged in at least one of the preceding stage and the succeeding stage of each image processing module 38 and has a buffer for storing image data, and a pipeline form or a DAG (Directed Acyclic Graph) form An image processing unit 50 formed by linking is constructed. The entity of each image processing module constituting the image processing unit 50 is a first program executed by the CPU 12 and causing the CPU 12 to perform predetermined image processing, or an external unit that is executed by the CPU 12 and not shown in FIG. 2 is a second program for instructing execution of processing to the image processing apparatus (for example, a dedicated image processing board), and the module library 36 described above stores predetermined different image processing (for example, input processing and filter processing). , Color conversion processing, enlargement / reduction processing, skew angle detection processing, image rotation processing, image composition processing, output processing, and the like) are registered. Hereinafter, in order to simplify the description, it is assumed that the individual image processing modules constituting the image processing unit 50 are the first program.

個々の画像処理モジュール38は、例として図3(A)にも示すように、画像データに対する画像処理を所定の単位処理データ量ずつ行う画像処理エンジン38Aと、画像処理モジュール38の前段及び後段のモジュールとの画像データの入出力及び画像処理エンジン38Aの制御を行う制御部38Bから構成されている。個々の画像処理モジュール38における単位処理データ量は、画像の1ライン分、画像の複数ライン分、画像の1画素分、画像1面分等を含む任意のバイト数の中から、画像処理エンジン38Aが行う画像処理の種類等に応じて予め選択・設定されており、例えば色変換処理やフィルタ処理を行う画像処理モジュール38では単位処理データ量が1画素分とされ、拡大・縮小処理を行う画像処理モジュール38では単位処理データ量が画像の1ライン分又は画像の複数ライン分とされ、画像回転処理を行う画像処理モジュール38では単位処理データ量が画像1面分とされ、画像圧縮伸長処理を行う画像処理モジュール38では単位処理データ量が実行環境に依存するNバイトとされている。   As shown in FIG. 3A as an example, each image processing module 38 includes an image processing engine 38A that performs image processing on image data by a predetermined unit processing data amount, and a front stage and a rear stage of the image processing module 38. The control unit 38B is configured to input / output image data to / from the module and to control the image processing engine 38A. The unit processing data amount in each image processing module 38 is the image processing engine 38A from an arbitrary number of bytes including one line of the image, a plurality of lines of the image, one pixel of the image, one surface of the image, and the like. Is selected and set in advance according to the type of image processing to be performed. For example, in the image processing module 38 that performs color conversion processing and filter processing, the unit processing data amount is one pixel, and the image to be enlarged / reduced is processed. In the processing module 38, the unit processing data amount is equivalent to one line of the image or a plurality of lines of the image, and in the image processing module 38 that performs image rotation processing, the unit processing data amount is equivalent to one image, and the image compression / decompression processing is performed. In the image processing module 38 to be performed, the unit processing data amount is N bytes depending on the execution environment.

また、モジュールライブラリ36には、画像処理エンジン38Aが実行する画像処理の種類が同一でかつ実行する画像処理の内容が異なる画像処理モジュール38も登録されている(図1では、この種の画像処理モジュールを「モジュール1」「モジュール2」と表記して示している)。例えば拡大・縮小処理を行う画像処理モジュール38については、入力された画像データを1画素おきに間引くことで50%に縮小する縮小処理を行う画像処理モジュール38、入力された画像データに対して指定された拡大・縮小率で拡大・縮小処理を行う画像処理モジュール38等の複数の画像処理モジュール38が各々用意されている。また、例えば色変換処理を行う画像処理モジュール38については、RGB色空間をCMY色空間へ変換する画像処理モジュール38やその逆へ変換する画像処理モジュール38、L*a*b*色空間等の他の色空間変換を行う画像処理モジュール38が各々用意されている。   The module library 36 also registers image processing modules 38 having the same type of image processing executed by the image processing engine 38A and different contents of the image processing executed (in FIG. 1, this type of image processing is performed). Modules are indicated as “module 1” and “module 2”). For example, with respect to the image processing module 38 that performs enlargement / reduction processing, the image processing module 38 that performs reduction processing to reduce the input image data to 50% by thinning out every other pixel is designated for the input image data. A plurality of image processing modules 38 such as an image processing module 38 that performs enlargement / reduction processing at the enlarged / reduced rate are prepared. For example, the image processing module 38 that performs color conversion processing includes an image processing module 38 that converts the RGB color space to the CMY color space, an image processing module 38 that converts the color space to the opposite, and an L * a * b * color space. Image processing modules 38 for performing other color space conversions are prepared.

また、画像処理モジュール38の制御部38Bは、画像処理エンジン38Aが単位処理データ量ずつ処理するために必要な画像データを入力するために、自モジュールの前段のモジュール(例えばバッファモジュール40)から画像データを単位読出データ量ずつ取得し、画像処理エンジン38Aから出力される画像データを単位書込データ量ずつ後段のモジュール(例えばバッファモジュール40)へ出力する(画像処理エンジン38Aで圧縮等のデータ量の増減を伴う画像処理が行われなければ単位書込データ量=単位処理データ量となる)か、画像処理エンジン38Aによる画像処理の結果を自モジュールの外部へ出力する(例えば画像処理エンジン38Aがスキュー角検知処理等の画像解析処理を行う場合、画像データに代えてスキュー角検知結果等の画像解析処理結果が出力されることがある)処理を行うが、モジュールライブラリ36には、画像処理エンジン38Aが実行する画像処理の種類及び内容が同一で、上記の単位処理データ量や単位読出データ量、単位書込データ量が異なる画像処理モジュール38も登録されている。例えば画像回転処理を行う画像処理モジュール38における単位処理データ量についても、前述した画像1面分に限られるものではなく、同じ画像回転処理を行いかつ単位処理データ量が互いに異なる(例えば画像の1ライン分や複数ライン分等の)複数の画像処理モジュール38がモジュールライブラリ36に含まれていても良い。   In addition, the control unit 38B of the image processing module 38 receives an image from a module (for example, the buffer module 40) in the previous stage of its own module in order to input image data necessary for the image processing engine 38A to process each unit processing data amount. Data is acquired for each unit read data amount, and image data output from the image processing engine 38A is output for each unit write data amount to a subsequent module (for example, the buffer module 40) (data amount such as compression by the image processing engine 38A). If the image processing with the increase / decrease is not performed, the unit writing data amount = the unit processing data amount) or the result of the image processing by the image processing engine 38A is output to the outside of the module (for example, the image processing engine 38A When performing image analysis processing such as skew angle detection processing, a scan is performed instead of image data. The image analysis processing result such as the angle detection result may be output). However, the module library 36 has the same type and content of the image processing executed by the image processing engine 38A, and the unit processing described above. Image processing modules 38 having different data amounts, unit read data amounts, and unit write data amounts are also registered. For example, the unit processing data amount in the image processing module 38 that performs image rotation processing is not limited to the one image plane described above, and the same image rotation processing is performed and the unit processing data amounts are different from each other (for example, one image). A plurality of image processing modules 38 (for a line, a plurality of lines, etc.) may be included in the module library 36.

また、モジュールライブラリ36に登録されている個々の画像処理モジュール38のプログラムは、画像処理エンジン38Aに相当するプログラムと制御部38Bに相当するプログラムから構成されているが、制御部38Bに相当するプログラムは部品化されており、個々の画像処理モジュール38のうち単位読出データ量及び単位書込データ量が同一の画像処理モジュール38は、画像処理エンジン38Aで実行される画像処理の種類や内容に拘わらず、制御部38Bに相当するプログラムが共通化されている(制御部38Bに相当するプログラムとして同一のプログラムが用いられている)。これにより、画像処理モジュール38のプログラムの開発にあたっての開発負荷が軽減される。   The program of each image processing module 38 registered in the module library 36 is composed of a program corresponding to the image processing engine 38A and a program corresponding to the control unit 38B, but a program corresponding to the control unit 38B. The image processing module 38 having the same unit read data amount and unit write data amount among the individual image processing modules 38 is concerned with the type and content of image processing executed by the image processing engine 38A. However, the program corresponding to the control unit 38B is shared (the same program is used as the program corresponding to the control unit 38B). Thereby, the development load in developing the program of the image processing module 38 is reduced.

なお、画像処理モジュール38の中には、入力される画像の属性が未知の状態では単位読出データ量及び単位書込データ量が確定しておらず、入力画像データの属性を取得し、取得した属性を所定の演算式に代入して演算することで単位読出データ量や単位書込データ量が確定するモジュールが存在しているが、この種の画像処理モジュール38については、単位読出データ量と単位書込データ量が互いに同一の演算式を用いて導出される画像処理モジュール38について、制御部38Bに相当するプログラムを共通化するようにすればよい。また、本実施形態に係る画像処理プログラム群34は、前述のように各種機器に実装可能であるが、画像処理プログラム群34のうちモジュールライブラリ36に登録する画像処理モジュール38の数や種類等については、画像処理プログラム群34を実装する各種機器で必要とされる画像処理に応じて、適宜追加・削除・入替等が可能であることは言うまでもない。   In the image processing module 38, the unit read data amount and the unit write data amount are not fixed when the input image attribute is unknown, and the input image data attribute is acquired and acquired. There is a module in which the unit read data amount and the unit write data amount are determined by substituting the attribute into a predetermined arithmetic expression, and this type of image processing module 38 has a unit read data amount and For the image processing module 38 in which the unit write data amount is derived using the same arithmetic expression, a program corresponding to the control unit 38B may be shared. The image processing program group 34 according to the present embodiment can be mounted on various devices as described above, but the number and types of image processing modules 38 registered in the module library 36 in the image processing program group 34 are described. Needless to say, addition, deletion, replacement, and the like can be appropriately performed in accordance with image processing required by various devices that implement the image processing program group 34.

また、画像処理部50を構成する個々のバッファモジュール40は、例として図3(B)にも示すように、バッファ40Aと、バッファモジュール40の前段及び後段のモジュールとの画像データの入出力及びバッファ40Aの管理を行うバッファ制御部40Bから構成されている。なお、バッファ40Aはコンピュータ10に設けられたメモリ14からオペレーティングシステム30及びリソース管理部46Bを通じて確保されたメモリ領域で構成される。個々のバッファモジュール40のバッファ制御部40Bもその実体はCPU12によって実行されるプログラムであり、モジュールライブラリ36にはバッファ制御部40Bのプログラムも登録されている(図1ではバッファ制御部40Bのプログラムを「バッファモジュール」と表記して示している)。   In addition, as shown in FIG. 3B as an example, the individual buffer modules 40 constituting the image processing unit 50 include input / output of image data between the buffer 40A and modules upstream and downstream of the buffer module 40. The buffer control unit 40B manages the buffer 40A. The buffer 40A is composed of a memory area secured from the memory 14 provided in the computer 10 through the operating system 30 and the resource management unit 46B. The buffer control unit 40B of each buffer module 40 is also a program executed by the CPU 12, and the program of the buffer control unit 40B is also registered in the module library 36 (in FIG. 1, the program of the buffer control unit 40B is registered). "Buffer module")

また、アプリケーション32からの指示に従って画像処理部50を構築する処理構築部42は、図1に示すように複数種のモジュール生成部44から構成されている。複数種のモジュール生成部44は互いに異なる画像処理に対応しており、アプリケーション32によって起動されることで、対応する画像処理を実現するための画像処理モジュール38及びバッファモジュール40から成るモジュール群を生成する処理を行う。なお、図1ではモジュール生成部44の一例として、モジュールライブラリ36に登録されている個々の画像処理モジュール38が実行する画像処理の種類に対応するモジュール生成部44を示しているが、個々のモジュール生成部44に対応する画像処理は、複数種の画像処理モジュール38によって実現される画像処理(例えばスキュー角検知処理と画像回転処理から成るスキュー補正処理)であってもよい。必要とされる画像処理が複数種の画像処理を組み合わせた処理である場合、アプリケーション32は複数種の画像処理の何れかに対応するモジュール生成部44を順次起動する。これにより、アプリケーション32によって順次起動されたモジュール生成部44により、必要とされる画像処理を行う画像処理部50が構築されることになる。   Further, the processing construction unit 42 that constructs the image processing unit 50 in accordance with an instruction from the application 32 includes a plurality of types of module generation units 44 as shown in FIG. The plural types of module generation units 44 support different image processing, and are activated by the application 32 to generate a module group including an image processing module 38 and a buffer module 40 for realizing the corresponding image processing. Perform the process. In FIG. 1, as an example of the module generation unit 44, the module generation unit 44 corresponding to the type of image processing executed by each image processing module 38 registered in the module library 36 is shown. The image processing corresponding to the generation unit 44 may be image processing realized by a plurality of types of image processing modules 38 (for example, skew correction processing including skew angle detection processing and image rotation processing). When the required image processing is processing combining a plurality of types of image processing, the application 32 sequentially activates the module generation unit 44 corresponding to any of the plurality of types of image processing. As a result, an image processing unit 50 that performs necessary image processing is constructed by the module generation unit 44 that is sequentially activated by the application 32.

また図1に示すように、処理管理部46は、画像処理部50における画像処理の実行を制御するワークフロー管理部46A、画像処理部50の各モジュールによるメモリ14や各種のファイル等のコンピュータ10のリソースの使用を管理するリソース管理部46B、及び、画像処理部50で発生したエラーを管理するエラー管理部46Cを含んで構成されている。エラー管理部46Cは、画像処理部50が画像処理を実行している途中でエラーが発生した場合に、発生したエラーの種別・発生箇所等のエラー情報を取得し、画像処理プログラム群34がインストールされたコンピュータ10が組み込まれている機器の種別や構成等を表す装置環境情報を記憶部20等から取得し、取得した装置環境情報が表す装置環境に応じたエラー通知方法を判断し、判断したエラー通知方法でエラーの発生を通知する処理を行う。   As shown in FIG. 1, the process management unit 46 includes a workflow management unit 46 </ b> A that controls execution of image processing in the image processing unit 50, a memory 14 by each module of the image processing unit 50, and various files of the computer 10. It includes a resource management unit 46B that manages the use of resources, and an error management unit 46C that manages errors that have occurred in the image processing unit 50. When an error occurs while the image processing unit 50 is executing image processing, the error management unit 46C acquires error information such as the type and location of the error that has occurred, and the image processing program group 34 is installed. The device environment information representing the type or configuration of the device in which the computer 10 is incorporated is acquired from the storage unit 20 or the like, and an error notification method according to the device environment represented by the acquired device environment information is determined and determined. Performs processing to notify the occurrence of an error using the error notification method.

なお、リソース管理部46Bによるメモリ管理の方式としては、例えば、画像処理部50の個々のモジュールからの要求の都度、メモリ14から要求元のモジュールに割り当てるメモリ領域をオペレーティングシステム30を通じて確保する第1管理方式、メモリ14から一定サイズのメモリ領域をオペレーティングシステム30を通じて事前に(例えばコンピュータ10の電源投入時に)確保し、個々のモジュールからの要求があると、事前に確保したメモリ領域のうちの一部領域を要求元のモジュールに割り当てる第2管理方式、及び、メモリ14から一定サイズのメモリ領域をオペレーティングシステム30を通じて事前に確保し、個々のモジュールからの要求があると、要求されたメモリ領域のサイズが閾値未満であれば事前に確保したメモリ領域のうちの一部領域を要求元のモジュールに割り当て、要求されたメモリ領域のサイズが閾値以上であれば要求元のモジュールに割り当てるメモリ領域をオペレーティングシステム30を通じて確保する第3管理方式の何れかを採用することができる。また、何れの管理方式でメモリ管理を行うかを選択・設定可能としてもよい。リソース管理部46Bは本発明に係るリソース管理手段に対応している。   As a memory management method by the resource management unit 46B, for example, a first memory area allocated from the memory 14 to the request source module is secured through the operating system 30 for each request from each module of the image processing unit 50. Management method, a memory area of a certain size is secured in advance from the memory 14 through the operating system 30 (for example, when the computer 10 is turned on), and if there is a request from an individual module, one of the memory areas secured in advance A second management method for allocating a partial area to a requesting module, and a memory area of a certain size is secured in advance from the memory 14 through the operating system 30, and when there is a request from an individual module, the requested memory area Secure in advance if size is below threshold In the third management method, a part of the allocated memory area is allocated to the request source module, and if the size of the requested memory area is equal to or larger than the threshold, the memory area allocated to the request source module is secured through the operating system 30. Either can be adopted. Further, it may be possible to select and set which management method is used for memory management. The resource manager 46B corresponds to resource management means according to the present invention.

次に本実施形態の作用を説明する。画像処理プログラム群34が実装されている機器において、何らかの画像処理を行う必要のある状況になると、この状況が特定のアプリケーション32によって検知される。なお、画像処理を行う必要のある状況としては、例えば画像データ供給部22としての画像読取部によって画像を読み取り、画像出力部24としての画像記録部により記録材料に画像として記録するか、画像出力部24としての表示部に画像として表示させるか、画像出力部24としての書込装置により画像データを記録メディアに書き込むか、画像出力部24としての送信部により画像データを送信するか、画像出力部24としての画像記憶部に記憶させるジョブの実行がユーザによって指示された場合、或いは、画像データ供給部22としての受信部によって受信されるか、画像データ供給部22としての画像記憶部に記憶されている画像データに対して、上記の記録材料への記録、表示部への表示、記録メディアへの書き込み、送信、画像記憶部への記憶の何れかを行うジョブの実行がユーザによって指示された場合が挙げられる。また、画像処理を行う必要のある状況は上記に限られるものではなく、例えばユーザからの指示に応じてアプリケーション32が実行可能な処理の名称等を表示部16に一覧表示している状態で、実行対象の処理がユーザによって選択された等の場合であってもよい。   Next, the operation of this embodiment will be described. In a device in which the image processing program group 34 is installed, when a situation where it is necessary to perform some kind of image processing, this situation is detected by a specific application 32. In addition, as a situation where it is necessary to perform image processing, for example, an image is read by an image reading unit as the image data supply unit 22, and is recorded as an image on a recording material by an image recording unit as the image output unit 24, or image output Whether the image is displayed on the display unit as the unit 24, the image data is written on the recording medium by the writing device as the image output unit 24, the image data is transmitted by the transmission unit as the image output unit 24, or the image output When the execution of a job to be stored in the image storage unit as the unit 24 is instructed by the user, or received by the reception unit as the image data supply unit 22 or stored in the image storage unit as the image data supply unit 22 For the image data being recorded, recording on the recording material, display on the display unit, writing to the recording medium, transmission, Any execution of a job for the storage of the image storage unit include when instructed by the user. In addition, the situation where image processing needs to be performed is not limited to the above. For example, in a state where the names of processes that can be executed by the application 32 in accordance with an instruction from the user are displayed in a list on the display unit 16, For example, the execution target process may be selected by the user.

上記のように、何らかの画像処理を行う必要のある状況になったことを検知すると、アプリケーション32は、まず画像処理対象の画像データを供給する画像データ供給部22の種別を認識し、認識した種別がバッファ領域(メモリ14又は記憶部20の一部領域)であった場合には、画像データ供給部22として指定されたバッファ領域を既に確保されたバッファ40Aとしてバッファ制御部40Bに認識させるパラメータを設定し、バッファ制御部40Bのプログラムを実行するスレッドを生成する(バッファ制御部40Bを生成する)ことで、指定されたバッファ領域を含むバッファモジュール40(画像データ供給部22として機能するバッファモジュール40)を生成する。また、スレッドに代えてプロセス又はオブジェクトとしてバッファモジュール40を生成するようにしてもよい。   As described above, when detecting that it is necessary to perform some kind of image processing, the application 32 first recognizes the type of the image data supply unit 22 that supplies the image data to be processed, and recognizes the recognized type. Is a buffer area (a partial area of the memory 14 or the storage unit 20), a parameter for causing the buffer control unit 40B to recognize the buffer area designated as the image data supply unit 22 as the already secured buffer 40A. The buffer module 40 including the designated buffer area (the buffer module 40 functioning as the image data supply unit 22) is generated by generating a thread for executing the program of the buffer control unit 40B (generating the buffer control unit 40B). ) Is generated. Further, the buffer module 40 may be generated as a process or an object instead of a thread.

続いてアプリケーション32は、上記と同様に、画像処理を行った画像データの出力先としての画像出力部24の種別を認識し、認識した種別がバッファ領域(メモリ14又は記憶部20の一部領域)であった場合は、画像出力部24として指定されたバッファ領域を含むバッファモジュール40を上記と同様にして生成する。ここで生成されたバッファモジュール40は画像出力部24として機能する。また、アプリケーション32は実行すべき画像処理の内容を認識し、実行すべき画像処理を、個々のモジュール生成部44に対応するレベルの画像処理の組み合わせに分解し、実行すべき画像処理を実現するために必要な画像処理の種類及び個々の画像処理の実行順序を判定する。なお、この判定は、例えば上記の画像処理の種類及び個々の画像処理の実行順序を、ユーザが実行を指示可能なジョブの種類と対応付けて予め情報として登録しておき、アプリケーション32が、実行が指示されたジョブの種類に対応する情報を読み出す処理を行うことによって実現することができる。   Subsequently, in the same manner as described above, the application 32 recognizes the type of the image output unit 24 as an output destination of the image data subjected to image processing, and the recognized type is a buffer area (a partial area of the memory 14 or the storage unit 20). ), The buffer module 40 including the buffer area designated as the image output unit 24 is generated in the same manner as described above. The buffer module 40 generated here functions as the image output unit 24. Further, the application 32 recognizes the contents of the image processing to be executed, decomposes the image processing to be executed into a combination of image processing at a level corresponding to each module generation unit 44, and realizes the image processing to be executed. Therefore, the type of image processing necessary for the purpose and the execution order of the individual image processing are determined. In this determination, for example, the type of image processing and the execution order of the individual image processing are registered in advance in association with the type of job that can be instructed by the user, and the application 32 executes Can be realized by performing a process of reading information corresponding to the type of job instructed.

そしてアプリケーション32は、上記で判定した画像処理の種類及び実行順序に基づいて、特定の画像処理に対応するモジュール生成部44を起動(モジュール生成部44のプログラムを実行するプロセス、スレッド又はオブジェクトを生成)した後に、起動したモジュール生成部44に対し、当該モジュール生成部44によるモジュール群の生成に必要な情報として、前記モジュール群に画像データを入力する入力モジュールを識別するための入力モジュール識別情報、前記モジュール群が画像データを出力する出力モジュールを識別するための出力モジュール識別情報、前記モジュール群に入力される入力画像データの属性を表す入力画像属性情報、実行すべき画像処理のパラメータを通知して対応するモジュール群の生成を指示する。また、必要とされる画像処理が複数種の画像処理を組み合わせた処理である場合、アプリケーション32は、指示したモジュール生成部44からモジュール群の生成完了が通知されると、個々の画像処理に対応する他のモジュール生成部44を起動してモジュール群の生成に必要な情報を通知する処理を個々の画像処理の実行順序の昇順に繰り返す。   Then, the application 32 activates the module generation unit 44 corresponding to the specific image processing based on the image processing type and execution order determined above (generates a process, a thread, or an object for executing the program of the module generation unit 44). ), The input module identification information for identifying the input module that inputs the image data to the module group as information necessary for generating the module group by the module generation unit 44. Output module identification information for identifying an output module from which the module group outputs image data, input image attribute information representing an attribute of input image data input to the module group, and parameters of image processing to be executed To generate a corresponding module group. In addition, when the required image processing is a combination of a plurality of types of image processing, the application 32 responds to individual image processing when notified of completion of generation of the module group from the instructed module generation unit 44. The process of starting the other module generation unit 44 and notifying the information necessary for generating the module group is repeated in ascending order of the execution order of the individual image processes.

なお、上記の入力モジュールは、実行順序が1番目のモジュール群については画像データ供給部22が入力モジュールとなり、実行順序が2番目以降のモジュール群については前段のモジュール群の最終モジュール(通常はバッファモジュール40)が入力モジュールとなる。また、上記の出力モジュールについては、実行順序が最後のモジュール群では画像出力部24が出力モジュールとなるので、画像出力部24が出力モジュールとして指定されるが、その他のモジュール群では出力モジュールは未確定のためにアプリケーション32による指定は行われず、必要な場合はモジュール生成部44によって生成・設定される。また、入力画像属性や画像処理のパラメータについては、例えばユーザが実行を指示可能なジョブの種類と対応付けて予め情報として登録しておき、実行が指示されたジョブの種類に対応する情報を読み出すことでアプリケーション32が認識するようにしてもよいし、ユーザに指定させるようにしてもよい。   In the above input module, the image data supply unit 22 is the input module for the module group with the first execution order, and the last module (usually the buffer) for the module group with the second execution order or later. Module 40) is the input module. For the above output modules, the image output unit 24 is designated as the output module in the module group whose execution order is the last, so that the image output unit 24 is designated as the output module. Specification by the application 32 is not performed for confirmation, and it is generated and set by the module generation unit 44 when necessary. The input image attributes and image processing parameters are registered as information in advance in association with, for example, the type of job that the user can instruct execution, and information corresponding to the type of job instructed to execute is read out. Thus, the application 32 may be recognized, or the user may be designated.

一方、モジュール生成部44は、アプリケーション32によって起動されるとモジュール生成処理を行う。モジュール生成処理では、まず生成対象の画像処理モジュール38に入力される入力画像データの属性を表す入力画像属性情報を取得する。なお、入力画像データの属性を取得する処理は、生成対象の画像処理モジュール38の前段にバッファモジュール40が存在している場合、当該バッファモジュール40に画像データの書き込みを行う更に前段の画像処理モジュール38から出力画像データの属性を取得することによって実現できる。   On the other hand, the module generation unit 44 performs module generation processing when activated by the application 32. In the module generation process, first, input image attribute information representing an attribute of input image data input to the generation target image processing module 38 is acquired. Note that the processing for acquiring the attributes of the input image data is performed in the case where the buffer module 40 exists in the previous stage of the generation target image processing module 38 and the image processing module in the previous stage that writes image data in the buffer module 40. This can be realized by acquiring the attributes of the output image data from the image data 38.

そして、取得した情報が表す入力画像データの属性に基づいて、生成対象の画像処理モジュール38の生成が必要か否か判定する。例えばモジュール生成部44が色変換処理を行うモジュール群を生成するモジュール生成部であり、画像処理のパラメータにより出力画像データの色空間としてCMY色空間がアプリケーション32から指定された場合、取得した入力画像属性情報に基づいて入力画像データがRGB色空間のデータであることが判明したときには、色空間処理を行う画像処理モジュール38としてRGB→CMYの色空間変換を行う画像処理モジュール38を生成する必要があるが、入力画像データがCMY色空間のデータであったときには、入力画像データの属性と出力画像データの属性が色空間に関して一致しているので、色空間変換処理を行う画像処理モジュール38は生成不要と判断する。   Then, based on the attribute of the input image data represented by the acquired information, it is determined whether the generation of the image processing module 38 to be generated is necessary. For example, the module generation unit 44 is a module generation unit that generates a group of modules that perform color conversion processing. When the CMY color space is designated as the color space of the output image data by the image processing parameter from the application 32, the acquired input image When it is determined that the input image data is RGB color space data based on the attribute information, it is necessary to generate an image processing module 38 that performs RGB → CMY color space conversion as an image processing module 38 that performs color space processing. However, when the input image data is data in the CMY color space, the attribute of the input image data and the attribute of the output image data match with respect to the color space, so that the image processing module 38 that performs color space conversion processing generates Judge as unnecessary.

生成対象の画像処理モジュール38の生成が必要と判断した場合には、生成対象の画像処理モジュール38の後段にバッファモジュール40が必要が否かを判定する。この判定は、画像処理モジュールの後段が出力モジュール(画像出力部24)である場合(例えば図2(A)〜(C)に示す画像処理部50における最後段の画像処理モジュール38を参照)や、例として図2(B)に示す画像処理部50においてスキュー角検知処理を行う画像処理モジュール38のように、画像処理モジュールが、画像データに対して解析等の画像処理を行いその結果を他の画像処理モジュール38へ出力するモジュールである場合は否定されるが、上記以外の場合は判定が肯定されてバッファ制御部40Bを起動する(バッファ制御部40Bのプログラムを実行するスレッドを各々生成する)ことで、画像処理モジュール38の後段に連結するバッファモジュール40を生成する。なお、スレッドに代えてプロセス又はオブジェクトとしてバッファモジュール40を生成するようにしてもよい。   When it is determined that the generation of the generation target image processing module 38 is necessary, it is determined whether the buffer module 40 is necessary after the generation target image processing module 38. This determination is made when the subsequent stage of the image processing module is the output module (image output unit 24) (see, for example, the last stage image processing module 38 in the image processing unit 50 shown in FIGS. 2A to 2C). As an example, like the image processing module 38 that performs skew angle detection processing in the image processing unit 50 shown in FIG. In the other cases, the determination is affirmed and the buffer control unit 40B is activated (a thread for executing the program of the buffer control unit 40B is generated). Thus, the buffer module 40 connected to the subsequent stage of the image processing module 38 is generated. Note that the buffer module 40 may be generated as a process or an object instead of a thread.

続いて、前段のモジュール(例えばバッファモジュール40)の情報、後段のバッファモジュール40の情報(後段にバッファモジュール40を生成した画像処理モジュール38のみ)、画像処理モジュール38に入力される入力画像データの属性、処理パラメータを与えて、モジュールライブラリ36に登録されており、画像処理モジュール38として利用可能な複数の候補モジュールの中から、先に取得した入力画像データの属性、及び、画像処理モジュール38で実行すべき処理パラメータに合致する画像処理モジュール38を選択・生成(画像処理エンジン38A及び制御部38Bのプログラムを実行するスレッドを生成)する。なお、スレッドに代えてプロセス又はオブジェクトとして画像処理モジュール38を生成するようにしてもよい。   Subsequently, information on the preceding module (for example, the buffer module 40), information on the succeeding buffer module 40 (only the image processing module 38 that generated the buffer module 40 in the succeeding stage), and input image data input to the image processing module 38 Attributes and processing parameters are given and registered in the module library 36. Among a plurality of candidate modules that can be used as the image processing module 38, the attributes of the input image data acquired earlier and the image processing module 38 The image processing module 38 that matches the processing parameter to be executed is selected and generated (a thread for executing the program of the image processing engine 38A and the control unit 38B is generated). Note that the image processing module 38 may be generated as a process or an object instead of a thread.

例えばモジュール生成部44が色変換処理を行うモジュール群を生成するモジュール生成部であり、処理パラメータにより出力画像データの色空間としてCMY色空間が指定され、更に入力画像データがRGB色空間のデータであった場合には、モジュールライブラリ36に登録されている各種の色空間処理を行う複数種の画像処理モジュール38の中から、RGB→CMYの色空間変換を行う画像処理モジュール38が選択・生成される。また、画像処理モジュールが拡大・縮小処理を行う画像処理モジュール38であり、指定された拡大縮小率が50%以外であれば、入力された画像データに対して指定された拡大・縮小率で拡大・縮小処理を行う画像処理モジュール38が選択・生成され、指定された拡大縮小率が50%であれば、拡大縮小率50%に特化した拡大縮小処理、すなわち入力された画像データを1画素おきに間引くことで50%に縮小する縮小処理を行う画像処理モジュール38が選択・生成される。   For example, the module generation unit 44 is a module generation unit that generates a group of modules that perform color conversion processing. The CMY color space is designated as the color space of the output image data by the processing parameters, and the input image data is data in the RGB color space. If there is, an image processing module 38 that performs RGB → CMY color space conversion is selected and generated from a plurality of types of image processing modules 38 that perform various color space processing registered in the module library 36. The The image processing module 38 is an image processing module 38 that performs enlargement / reduction processing. If the designated enlargement / reduction ratio is other than 50%, the input image data is enlarged at the designated enlargement / reduction ratio. If the image processing module 38 that performs the reduction process is selected and generated and the designated enlargement / reduction ratio is 50%, the enlargement / reduction process specialized for the enlargement / reduction ratio of 50%, that is, the input image data is one pixel. An image processing module 38 that performs a reduction process to reduce to 50% by thinning out at intervals is selected and generated.

なお、画像処理モジュール38の選択は上記に限られるものではなく、例えば画像処理エンジン38Aによる画像処理における単位処理データ量が異なる画像処理モジュール38をモジュールライブラリ36に複数登録しておき、画像処理部50へ割当可能なメモリ領域のサイズ等の動作環境に応じて、適切な単位処理データ量の画像処理モジュール38を選択する(例えば上記サイズが小さくなるに従って単位処理データ量の小さい画像処理モジュール38を選択する等)ようにしてもよいし、アプリケーション32或いはユーザに選択させるようにしてもよい。   The selection of the image processing module 38 is not limited to the above. For example, a plurality of image processing modules 38 having different unit processing data amounts in image processing by the image processing engine 38A are registered in the module library 36, and the image processing unit The image processing module 38 having an appropriate unit processing data amount is selected according to the operating environment such as the size of the memory area that can be allocated to 50 (for example, the image processing module 38 having a smaller unit processing data amount as the size decreases). Or the application 32 or the user may select it.

画像処理モジュール38の生成が完了すると、後段のバッファモジュール40のIDと生成した画像処理モジュール38のIDの組をワークフロー管理部46Aに通知する。このIDは、個々のモジュールを一意に判別できる情報であればよく、例えば個々のモジュールの生成順に付与した番号や、バッファモジュール40や画像処理モジュール38のオブジェクトのメモリ上でのアドレス等でも良い。またモジュール生成部44が、複数種の画像処理モジュール38によって実現される画像処理(例えばスキュー角検知処理を行う画像処理モジュール38と画像回転処理を行う画像処理モジュール38によって実現されるスキュー補正処理)を行うモジュール群を生成する場合には、上記処理が繰り返されて2個以上の画像処理モジュール38を含むモジュール群が生成される。アプリケーション32によって順次起動された個々のモジュール生成部44により、以上のモジュール生成処理が順次行われることで、例として図2(A)〜(C)に示すように、必要とされる画像処理を行う画像処理部50が構築される。   When the generation of the image processing module 38 is completed, the workflow management unit 46A is notified of the set of the ID of the subsequent buffer module 40 and the ID of the generated image processing module 38. The ID may be information that can uniquely identify each module, and may be, for example, a number given in the order of generation of each module, an address of an object of the buffer module 40 or the image processing module 38 on a memory, or the like. Further, the module generation unit 44 performs image processing realized by a plurality of types of image processing modules 38 (for example, skew correction processing realized by the image processing module 38 that performs skew angle detection processing and the image processing module 38 that performs image rotation processing). When generating a module group for performing the above, the above process is repeated to generate a module group including two or more image processing modules 38. The module generation processing described above is sequentially performed by the individual module generation units 44 that are sequentially activated by the application 32, so that the necessary image processing can be performed as shown in FIGS. An image processing unit 50 to perform is constructed.

なお、本実施形態では、特定の画像処理の実行頻度が高い等の場合に、アプリケーション32が、特定の画像処理を行う画像処理部50を生成するための複数種のモジュール生成部44に対し、特定の画像処理を行う画像処理部50を生成させた後も処理終了を指示しないことでスレッド(プロセス又はオブジェクトでもよい)として残しておき、特定の画像処理を行う必要が生ずる毎に、スレッドとして残しておいた各モジュール生成部44に対してモジュール群の生成を順次指示することで、特定の画像処理を行う画像処理部50を再生成させることも可能とされている。これにより、特定の画像処理を行う必要が生ずる毎に対応する各モジュール生成部44を各々起動する処理が不要となり、特定の画像処理を行う画像処理部50を再生成するのに要する時間を短縮することができる。   In the present embodiment, when the execution frequency of specific image processing is high, the application 32 generates a plurality of types of module generation units 44 for generating the image processing unit 50 that performs specific image processing. Even after the image processing unit 50 that performs specific image processing is generated, it is left as a thread (may be a process or an object) by not instructing the end of processing, and each time it is necessary to perform specific image processing, It is also possible to regenerate the image processing unit 50 that performs specific image processing by sequentially instructing the remaining module generation units 44 to generate module groups. This eliminates the need to start each of the corresponding module generation units 44 every time specific image processing needs to be performed, thereby reducing the time required to regenerate the image processing unit 50 that performs specific image processing. can do.

ところで、画像処理モジュール38の制御部38Bは、モジュール生成部44によって起動されると画像処理モジュール38の初期化を行う。この初期化では、まずモジュール生成部44から与えられた自モジュールの前段及び後段のモジュールの情報を記憶する。続いて自モジュールの前段のモジュールを判定する。自モジュールの前段にモジュールが存在していない場合には何ら処理を行わないが、前段のモジュールがバッファモジュール40以外、例えば画像データ供給部22や特定のファイル等である場合には、必要に応じてその初期化処理を行う。また、自モジュールの前段にバッファモジュール40が存在している場合には、前段のバッファモジュール40からの1回の画像データの読み出しによって取得する画像データのデータ量(単位読出データ量)を認識する。この単位読出データ量は、自モジュールの前段のバッファモジュール40の数が1個であれば1個だけであるが、例えば図2(C)に示す画像処理部50において画像合成処理を行う画像処理モジュール38のように、前段のバッファモジュール40の数が複数で、複数のバッファモジュール40から各々取得した画像データを用いて画像処理エンジン38Aが画像処理を行う等の場合、前段の個々のバッファモジュール40に対応する単位読出データ量は、自モジュールの画像処理エンジン38Aが行う画像処理の種類や内容、前段のバッファモジュール40の数等に応じて定まる。そして、認識した単位読出データ量を、前段に存在している全てのバッファモジュール40へ通知することで、前段に存在している全てのバッファモジュール40に単位読出データ量を設定する(図3(A)の(1)も参照)。   Incidentally, the control unit 38B of the image processing module 38 initializes the image processing module 38 when activated by the module generation unit 44. In this initialization, first, the information of the modules before and after the own module given from the module generation unit 44 is stored. Subsequently, the module preceding the own module is determined. No processing is performed when no module exists in the previous stage of the own module, but if the previous module is other than the buffer module 40, for example, the image data supply unit 22, a specific file, or the like, as necessary. The initialization process is performed. When the buffer module 40 exists in the previous stage of the own module, the data amount (unit read data amount) of the image data acquired by reading the image data from the previous buffer module 40 once is recognized. . This unit read data amount is only one if the number of buffer modules 40 in the previous stage of the own module is one, but for example, image processing for performing image composition processing in the image processing unit 50 shown in FIG. As in the case of the module 38, when there are a plurality of buffer modules 40 in the previous stage and the image processing engine 38A performs image processing using image data acquired from the plurality of buffer modules 40, the individual buffer modules in the previous stage The unit read data amount corresponding to 40 is determined according to the type and content of image processing performed by the image processing engine 38A of the own module, the number of buffer modules 40 in the previous stage, and the like. Then, the unit read data amount is set in all the buffer modules 40 existing in the preceding stage by notifying the recognized unit read data amount to all the buffer modules 40 existing in the preceding stage (FIG. 3 ( (See also A) (1)).

次に、自モジュールの後段のモジュールを判定する。自モジュールの後段のモジュールがバッファモジュール40以外、例えば画像出力部24や特定のファイル等の場合には、必要に応じてその初期化処理(例えば後段のモジュールが画像出力部24であれば、単位書込データ量に相当するデータ量ずつ画像データを出力することを通知する処理等)を行う。また、後段のモジュールがバッファモジュール40であれば、1回の画像データの書き込みにおける画像データのデータ量(単位書込データ量)を認識し、後段のバッファモジュールに当該単位書込データ量を設定(図3(A)の(2)も参照)する。そして、当該画像処理モジュール38の初期化の完了をモジュール生成部44に通知して処理を終了する。   Next, the module following the own module is determined. If the module subsequent to the own module is other than the buffer module 40, such as the image output unit 24 or a specific file, the initialization process is performed as necessary (for example, if the subsequent module is the image output unit 24, the unit For example, processing for notifying output of image data by the amount of data corresponding to the amount of write data). If the subsequent module is the buffer module 40, the amount of image data (unit write data amount) in one image data write is recognized, and the unit write data amount is set in the subsequent buffer module. (See also (2) in FIG. 3A). Then, the completion of initialization of the image processing module 38 is notified to the module generation unit 44, and the process is terminated.

一方、画像処理部50を構成する個々のバッファモジュール40のバッファ制御部40Bは、モジュール生成部44又はアプリケーション32によって起動されると、図4に示すバッファモジュール初期化処理を行う。このバッファモジュール初期化処理では、まずステップ70において、自モジュールの前段の画像処理モジュール38から単位書込データ量が通知されるか又は自モジュールの後段の画像処理モジュール38から単位読出データ量が通知される毎に、通知された単位書込データ量又は単位読出データ量を記憶する(図3(B)の(1),(2)も参照)。ステップ72では、自モジュールと連結されている全ての画像処理モジュール38から単位書込データ量又は単位読出データ量が通知されたか否か判定する。判定が否定された場合はステップ70に戻り、ステップ72の判定が肯定される迄ステップ70,72を繰り返す。   On the other hand, when the buffer control unit 40B of each buffer module 40 constituting the image processing unit 50 is activated by the module generation unit 44 or the application 32, the buffer module initialization process shown in FIG. 4 is performed. In this buffer module initialization process, first, in step 70, the unit write data amount is notified from the image processing module 38 in the previous stage of the own module, or the unit read data amount is notified from the image processing module 38 in the subsequent stage of the own module. Each time it is done, the notified unit write data amount or unit read data amount is stored (see also (1) and (2) in FIG. 3B). In step 72, it is determined whether the unit write data amount or the unit read data amount is notified from all the image processing modules 38 connected to the own module. If the determination is negative, the process returns to step 70, and steps 70 and 72 are repeated until the determination of step 72 is affirmed.

自モジュールと連結されている全ての画像処理モジュール38から単位書込データ量又は単位読出データ量が通知されてステップ72の判定が肯定されるとステップ74へ移行し、自モジュールと連結されている個々の画像処理モジュール38によって各々設定された単位書込データ量及び単位読出データ量に基づいて、自モジュールのバッファ40Aの管理単位である単位バッファ領域のサイズを決定し、決定した単位バッファ領域のサイズを記憶する。単位バッファ領域のサイズとしては、自モジュールに設定された単位書込データ量及び単位読出データ量のうちの最大値が好適であるが、単位書込データ量を設定してもよいし、単位読出データ量(自モジュールの後段に複数の画像処理モジュール38が連結されている場合は、個々の画像処理モジュール38によって各々設定された単位読出データ量の最大値)を設定してもよいし、単位書込データ量と単位読出データ量(の最大値)の最小公倍数を設定してもよいし、この最小公倍数が所定値未満であれば最小公倍数を、最小公倍数が所定値以上であれば別の値(例えば上述した単位書込データ量及び単位読出データ量のうちの最大値、単位書込データ量、単位読出データ量(の最大値)の何れか)を設定するようにしてもよい。   When the unit write data amount or the unit read data amount is notified from all the image processing modules 38 connected to the own module and the determination in step 72 is affirmed, the process proceeds to step 74 and connected to the own module. Based on the unit write data amount and the unit read data amount set by each image processing module 38, the size of the unit buffer area, which is the management unit of the buffer 40A of the own module, is determined, and the determined unit buffer area Remember the size. As the size of the unit buffer area, the maximum value of the unit write data amount and the unit read data amount set in the own module is suitable. However, the unit write data amount may be set or the unit read data amount may be set. The amount of data (the maximum value of the unit read data amount set by each image processing module 38 when a plurality of image processing modules 38 are connected to the subsequent stage of the own module) may be set. The least common multiple of the write data amount and the unit read data amount (the maximum value thereof) may be set. If the least common multiple is less than the predetermined value, the least common multiple is set. A value (for example, any one of the above-mentioned unit write data amount and unit read data amount, the unit write data amount, and the unit read data amount (the maximum value)) may be set.

次のステップ76では、確保すべきメモリ領域のサイズとして単位書込データ量及び単位読出データ量をリソース管理部46Bに通知し、書込に用いるメモリ領域(書込用バッファ領域:図6(B)も参照)及び読出に用いるメモリ領域(読出用バッファ領域:図8(B)も参照)の確保をリソース管理部46Bに要求することで、書込用バッファ領域として用いるメモリ領域及び読出用バッファ領域として用いるメモリ領域をリソース管理部46Bによって各々確保させる。   In the next step 76, the amount of unit write data and the amount of unit read data are notified to the resource manager 46B as the size of the memory region to be secured, and the memory region used for writing (write buffer region: FIG. )) And a memory area used as a write buffer area and a read buffer by requesting the resource manager 46B to secure a memory area used for reading (read buffer area: see also FIG. 8B). Each memory area used as an area is secured by the resource manager 46B.

また、図3(B)にも示すように、本実施形態に係る処理管理部46のワークフロー管理部46Aは、バッファ40Aとして使用する目的で個々のバッファモジュール40に割当可能なメモリ領域の容量(割当可能メモリ容量)を、メモリ14上の所定の領域に保持している。この割当可能メモリ容量は、例えばワークフロー管理部46Aのプログラムを実行するスレッド又はプロセス又はオブジェクトが生成され、当該スレッド又はプロセス又はオブジェクトが実行されることでワークフロー管理部46Aが稼働を開始した段階で、ワークフロー管理部46Aにより、コンピュータ10に設けられたメモリ14の総容量を取得し、取得した総容量を所定の演算式に代入して割当可能メモリ容量を算出し、算出した割当可能メモリ容量を所定の領域に記憶させる処理が行われることで、所定の領域に保持される。なお、割当可能メモリ容量を保持している所定の領域は本発明に係る保持手段に対応している。   Also, as shown in FIG. 3B, the workflow management unit 46A of the process management unit 46 according to the present embodiment has a memory area capacity (which can be allocated to each buffer module 40 for the purpose of use as the buffer 40A). (Allocable memory capacity) is held in a predetermined area on the memory 14. This allocatable memory capacity is, for example, when a thread or a process or object that executes a program of the workflow management unit 46A is generated and the workflow management unit 46A starts operating by executing the thread or process or object. The workflow management unit 46A obtains the total capacity of the memory 14 provided in the computer 10, calculates the allocatable memory capacity by substituting the obtained total capacity into a predetermined arithmetic expression, and calculates the calculated allocatable memory capacity. By performing the process of storing in this area, it is held in the predetermined area. The predetermined area holding the allocatable memory capacity corresponds to the holding means according to the present invention.

ステップ78では処理管理部46(のワークフロー管理部46A)によって所定の領域に保持されている割当可能メモリ容量を参照し、次のステップ80では、割当可能メモリ容量が画像1面分の画像データを記憶するために必要なメモリ容量(請求項2に記載の上限容量に相当)よりも小さいか否か判定する。この判定が肯定された場合、画像処理部50が動作する環境ではバッファ40Aとして使用可能なメモリ領域の容量が限られている(コンピュータ10に設けられているメモリ14が比較的小容量)と判断できるので、ステップ82へ移行し、割当要求サイズとして割当可能メモリ容量を設定し、ステップ86へ移行する。一方、ステップ80の判定が否定された場合は、画像処理部50が動作する環境ではバッファ40Aとして使用可能なメモリ領域が潤沢に存在している(コンピュータ10に設けられているメモリ14が比較的大容量)と判断できるので、ステップ84へ移行し、メモリ14の有効利用も考慮して、割当要求サイズとして画像1面分の画像データに相当するメモリ容量を設定した後にステップ86へ移行する。なお、ステップ82,84において、割当要求サイズを、割当可能メモリ容量又は画像1面分の画像データに相当するメモリ容量以下、かつ、先のステップ74で決定した単位バッファ領域の整数倍を満足する最大サイズに設定するようにしてもよい。   In step 78, the allocatable memory capacity held in a predetermined area by the process management unit 46 (the workflow management unit 46A) is referred to, and in the next step 80, the allocatable memory capacity contains image data for one image. It is determined whether or not it is smaller than the memory capacity necessary for storage (corresponding to the upper limit capacity described in claim 2). If this determination is affirmative, it is determined that the capacity of the memory area that can be used as the buffer 40A is limited in the environment in which the image processing unit 50 operates (the memory 14 provided in the computer 10 is relatively small capacity). Therefore, the process proceeds to step 82, the allocatable memory capacity is set as the allocation request size, and the process proceeds to step 86. On the other hand, if the determination in step 80 is negative, there are plenty of memory areas that can be used as the buffer 40A in the environment where the image processing unit 50 operates (the memory 14 provided in the computer 10 is relatively small). Therefore, the process proceeds to step 84. In consideration of effective use of the memory 14, the memory capacity corresponding to the image data for one image is set as the allocation request size, and then the process proceeds to step 86. In steps 82 and 84, the allocation request size is equal to or smaller than an allocatable memory capacity or a memory capacity corresponding to image data for one image, and satisfies an integral multiple of the unit buffer area determined in the previous step 74. The maximum size may be set.

ステップ86では、確保すべきメモリ領域のサイズとしてステップ82又はステップ84で設定した割当要求サイズをリソース管理部46Bに通知し、バッファ40Aとして用いるメモリ領域の確保をリソース管理部46Bに要求し、バッファ40Aとして用いるメモリ領域をリソース管理部46Bによって確保させる。そしてステップ88では、バッファ40A用として確保したメモリ領域を、先のステップ74で決定した単位バッファ領域のサイズ毎に分割する(以下では、分割したメモリ領域の各々を保管用単位バッファ領域と称する)と共に、自モジュールの後段の個々の画像処理モジュール38に対応する有効データポインタを初期化する。上記の有効データポインタは、自モジュールの前段の画像処理モジュールによって自モジュールのバッファ40Aに書き込まれた画像データのうち、対応する後段の画像処理モジュール38によって読み出されていない画像データ(有効データ)の先頭位置(次の読出開始位置)と末尾位置を各々指し示すポインタであり、初期化時には有効データが存在していないことを意味する特定の情報が設定される。   In step 86, the allocation request size set in step 82 or 84 is notified to the resource manager 46B as the size of the memory area to be secured, and the resource manager 46B is requested to secure the memory area used as the buffer 40A. The memory area used as 40A is secured by the resource management unit 46B. In step 88, the memory area reserved for the buffer 40A is divided for each unit buffer area size determined in the previous step 74 (hereinafter, each divided memory area is referred to as a storage unit buffer area). At the same time, the valid data pointer corresponding to each image processing module 38 in the subsequent stage of its own module is initialized. The valid data pointer is image data (valid data) that has not been read by the corresponding succeeding image processing module 38 among the image data written in the buffer 40A of the own module by the preceding image processing module of the own module. Are pointers that respectively indicate the start position (next read start position) and the end position of the, and specific information that means that no valid data exists at the time of initialization is set.

なお、自モジュールがアプリケーション32によって生成され、画像データ供給部22又は画像出力部24として機能するバッファモジュール40であった場合、自モジュールのバッファ40Aとして用いるメモリ領域が既に存在している場合には、上述した各処理のうち、バッファ40Aとして用いるメモリ領域を確保する処理は省略される。また、上記の既に存在しているメモリ領域には、既に画像処理対象の画像データが書き込まれていることがあり、この場合は当該画像データの先頭位置及び末尾位置が後段の個々の画像処理モジュール38に対応する有効データポインタに各々設定される。以上の処理によりバッファモジュール40の初期化が完了し、バッファ制御部40Bはバッファモジュール初期化処理の完了をワークフロー管理部46Aへ通知する。   When the own module is generated by the application 32 and is the buffer module 40 functioning as the image data supply unit 22 or the image output unit 24, when the memory area used as the buffer 40A of the own module already exists. Of the above-described processes, the process of securing the memory area used as the buffer 40A is omitted. In addition, image data to be image-processed may already be written in the memory area that already exists. In this case, each image processing module in which the head position and the end position of the image data are in the subsequent stage Each is set to a valid data pointer corresponding to 38. With the above processing, the initialization of the buffer module 40 is completed, and the buffer control unit 40B notifies the completion of the buffer module initialization processing to the workflow management unit 46A.

一方、アプリケーション32は、順次起動したモジュール生成部44によって前述のモジュール生成処理が順次行われることで、必要とされる画像処理を行う画像処理部50の構築が完了すると、ワークフロー管理部46Aのプログラムを実行するスレッド(又はプロセス又はオブジェクト)を起動することで、ワークフロー管理部46Aに対して画像処理部50による画像処理の実行を指示する。   On the other hand, when the construction of the image processing unit 50 that performs the required image processing is completed by the above-described module generation processing being sequentially performed by the module generation unit 44 that is sequentially activated, the application 32 starts the program of the workflow management unit 46A. By starting a thread (or process or object) that executes the process, the image management unit 46A is instructed to execute image processing by the image processing unit 50.

処理管理部46のワークフロー管理部46Aは、プログラムが起動されることで図10に示す並列制御処理を行う。ワークフロー管理部46Aは並列制御処理において、画像処理部50を構成する個々の画像処理モジュール38に処理要求を入力することで、画像処理部50による画像処理を個々の画像処理モジュール38単位で並列に行わせるが、以下では画像処理部50全体の動作説明に先立ち、個々のバッファモジュール40のバッファ制御部40Bによって行われる初期化処理完了以降の処理、個々の画像処理モジュール38の制御部38Bによって行われる画像処理モジュール制御処理について順に説明する。   The workflow management unit 46A of the process management unit 46 performs the parallel control process shown in FIG. 10 when the program is started. In the parallel control processing, the workflow management unit 46A inputs processing requests to the individual image processing modules 38 constituting the image processing unit 50, so that the image processing by the image processing unit 50 is performed in parallel for each individual image processing module 38. However, in the following, prior to the description of the operation of the entire image processing unit 50, the processing after the completion of the initialization process performed by the buffer control unit 40B of each buffer module 40, the control unit 38B of each image processing module 38, The image processing module control process will be described in order.

本実施形態では、画像処理モジュール38が後段のバッファモジュール40に画像データを書き込む場合には、画像処理モジュール38からバッファモジュール40へ書込要求が入力され、画像処理モジュール38が前段のバッファモジュール40から画像データを読み出す場合には、画像処理モジュール38からバッファモジュール40へ読出要求が入力される。前段の画像処理モジュール38からの書込要求を含む何らかの情報がバッファモジュール40に入力された場合(及び、後述するタイマがタイムアウトした場合)は、図5に示すデータ書込処理がバッファ制御部40Bによって実行される。なお、以下で説明するデータ書込処理は、関数やメソッドの呼び出しで処理が始まるようにしてもよい。   In this embodiment, when the image processing module 38 writes image data to the subsequent buffer module 40, a write request is input from the image processing module 38 to the buffer module 40, and the image processing module 38 receives the previous buffer module 40. When reading image data from the image processing module 38, a read request is input from the image processing module 38 to the buffer module 40. When some information including a write request from the previous image processing module 38 is input to the buffer module 40 (and a timer described later times out), the data writing process shown in FIG. 5 is performed by the buffer control unit 40B. Executed by. Note that the data writing process described below may be started by calling a function or method.

データ書込処理では、まずステップ100において、今回のデータ書込処理の起動要因が、タイマがタイムアウトしたことによる起動か否か判定する。判定が否定された場合はステップ104へ移行するが、上記判定が肯定された場合はステップ102へ移行し、過去に入力されてワークメモリ等に保管している書込要求情報をワークメモリ等から取り出す。ステップ106では自モジュールのバッファ40Aがアクセス中か否か判定する。バッファ40Aに対してはデータの読み出しも行われるので、当該判定が肯定された場合はステップ108へ移行して今回の処理対象の書込要求情報をワークメモリ等に保管し、次のステップ110でタイマをスタートさせてデータ書込処理を一旦終了する。   In the data writing process, first, in step 100, it is determined whether or not the activation factor of the current data writing process is the activation due to the time-out of the timer. If the determination is negative, the process proceeds to step 104. If the determination is affirmative, the process proceeds to step 102, and the write request information input in the past and stored in the work memory or the like is read from the work memory or the like. Take out. In step 106, it is determined whether or not the buffer 40A of the own module is being accessed. Since data is also read from the buffer 40A, if the determination is affirmative, the routine proceeds to step 108, where the write request information to be processed at this time is stored in the work memory or the like, and in the next step 110. The timer is started and the data writing process is temporarily terminated.

一方、ステップ106の判定が否定された場合にはステップ114へ移行し、自モジュールのバッファ40Aを構成する保管用単位バッファ領域の中に、単位書込データ量以上の空き領域が有る保管用単位バッファ領域(単位書込データ量の画像データを書き込み可能な保管用単位バッファ領域)が存在しているか否か判定する。画像データの書込はバッファ40Aを構成する保管用単位バッファ領域に対して順に行われるが、画像データの書込の進行に伴って単位書込データ量以上の空き領域が有る保管用単位バッファ領域が無くなると、上記判定が否定される。   On the other hand, if the determination in step 106 is negative, the process proceeds to step 114, where a storage unit having a free area larger than the unit write data amount in the storage unit buffer area constituting the buffer 40A of the own module. It is determined whether or not there is a buffer area (a storage unit buffer area into which image data of the unit write data amount can be written). The image data is written sequentially to the storage unit buffer area constituting the buffer 40A, but the storage unit buffer area has a free area larger than the unit write data amount as the writing of the image data proceeds. When there is no more, the above determination is denied.

ステップ114の判定が否定された場合はステップ115へ移行し、確保すべきメモリ領域のサイズとして先に設定した割当要求サイズをリソース管理部46Bに通知し、バッファ40Aとして用いるメモリ領域の確保をリソース管理部46Bに要求し、バッファ40Aとして用いるメモリ領域をリソース管理部46Bによって確保させる。そしてステップ116において、バッファ40A用として確保したメモリ領域を、先に決定した単位バッファ領域のサイズ毎に分割すると共に、自モジュールの後段の個々の画像処理モジュール38に対応する有効データポインタを更新し、ステップ118へ移行する。また、ステップ114の判定が肯定された場合はステップ115,116をスキップしてステップ118へ移行する。そしてステップ118では、先に確保した書込用バッファ領域を書込領域として、当該書込領域の先頭アドレスを書込要求元の画像処理モジュール38へ通知すると共に、書込対象の画像データを通知した先頭アドレスから順に書き込むよう要請する。これにより、書込要求元の画像処理モジュール38は、先頭アドレスが通知された書込領域(書込用バッファ領域(又は保管用単位バッファ領域:後述))に画像データを書き込む(図6(B)も参照)。   If the determination in step 114 is negative, the process proceeds to step 115, the allocation request size previously set as the size of the memory area to be secured is notified to the resource management unit 46B, and the reservation of the memory area to be used as the buffer 40A is a resource. A request is made to the management unit 46B, and a memory area used as the buffer 40A is secured by the resource management unit 46B. In step 116, the memory area reserved for the buffer 40A is divided for each unit buffer area size determined previously, and the valid data pointers corresponding to the individual image processing modules 38 subsequent to the own module are updated. The process proceeds to step 118. If the determination in step 114 is affirmed, steps 115 and 116 are skipped and the process proceeds to step 118. In step 118, the write buffer area previously secured is used as the write area, and the start address of the write area is notified to the image processing module 38 that is the write request source, and the image data to be written is also notified. Request to write in order from the first address. As a result, the image processing module 38 of the write request source writes the image data in the write area (write buffer area (or storage unit buffer area: described later)) to which the start address is notified (FIG. 6B See also)).

例えば保管用単位バッファ領域のサイズが単位書込データ量の整数倍でない場合、保管用単位バッファ領域への単位書込データ量の画像データの書込が繰り返されることで、例として図6(A)にも示すように、空き領域有りの保管用単位バッファ領域における空き領域のサイズが単位書込データ量よりも小さい状態が生ずる。この場合、単位書込データ量の画像データが書き込まれる領域が複数の保管用単位バッファ領域に跨ることになるが、この複数の保管用単位バッファ領域は異なるタイミングで確保したメモリ領域である可能性があり、この場合、複数の保管用単位バッファ領域が、実際のメモリ14上で連続する領域であることは保証されない。これに対して本実施形態では、画像処理モジュール38による画像データの書き込みを、保管用単位バッファ領域と別に確保した書込用バッファ領域に対して行わせ、図6(C)に示すように、書込用バッファ領域に一旦書き込まれた画像データを単一又は複数の保管用単位バッファ領域へ複写するので、画像データが書き込まれる領域が複数の保管用単位バッファ領域に跨るか否かに拘わらず、書込要求元の画像処理モジュール38への書込領域の通知は、上記のようにその先頭アドレスを通知するのみで済み、画像処理モジュール38とのインタフェースが簡単になる。   For example, when the size of the storage unit buffer area is not an integral multiple of the unit write data amount, the image data of the unit write data amount is repeatedly written to the storage unit buffer area, as an example, as shown in FIG. ), The size of the empty area in the storage unit buffer area with the empty area is smaller than the unit write data amount. In this case, the area in which the image data of the unit write data amount is written extends over a plurality of storage unit buffer areas. The plurality of storage unit buffer areas may be memory areas secured at different timings. In this case, it is not guaranteed that the plurality of storage unit buffer areas are continuous areas on the actual memory 14. On the other hand, in the present embodiment, the image processing module 38 writes the image data to the writing buffer area secured separately from the storage unit buffer area, and as shown in FIG. Since the image data once written in the write buffer area is copied to a single or a plurality of storage unit buffer areas, regardless of whether the area in which the image data is written spans a plurality of storage unit buffer areas As described above, the notification of the write area to the image processing module 38 that is the write request source only needs to be notified of the start address, and the interface with the image processing module 38 is simplified.

なお、自モジュールがアプリケーション32によって生成されたバッファモジュール40である場合、すなわちバッファ40Aとして用いるメモリ領域が既に確保されている場合には、先に説明したステップ114〜ステップ116をスキップしてステップ118へ移行し、既に確保されているメモリ領域のアドレスを画像処理モジュール38に書込領域のアドレスとして通知し、書込領域への画像データの書き込みを行わせる。   If the own module is the buffer module 40 generated by the application 32, that is, if the memory area used as the buffer 40A has already been secured, step 114 to step 116 described above are skipped and step 118 is skipped. , The address of the memory area already secured is notified to the image processing module 38 as the address of the writing area, and the image data is written to the writing area.

前段の画像処理モジュール38による書込領域への画像データの書き込みが完了するとステップ120へ移行し、書込用バッファ領域に書き込まれた画像データを保管用単位バッファ領域に書き込む。なお、空き領域有りの保管用単位バッファ領域における空き領域のサイズが単位書込データ量よりも小さい場合、書込用バッファ領域に書き込まれた画像データは、図6(C)に示すように、複数の保管用単位バッファ領域へ分けて書き込まれる。次のステップ122では、自モジュールの後段の個々の画像処理モジュール38に対応する有効データポインタのうち有効データの末尾位置を表すポインタを、該ポインタが指し示す有効データの末尾位置が単位書込データ量分だけ後へ移動するように更新し(図6(C)も参照)、データ書込処理を終了する。   When the writing of the image data to the writing area by the preceding image processing module 38 is completed, the process proceeds to step 120, and the image data written in the writing buffer area is written in the storage unit buffer area. When the size of the empty area in the storage unit buffer area with the empty area is smaller than the unit write data amount, the image data written in the write buffer area is as shown in FIG. The data is written separately into a plurality of storage unit buffer areas. In the next step 122, the pointer indicating the end position of the effective data among the effective data pointers corresponding to the individual image processing modules 38 subsequent to the own module is used, and the end position of the effective data indicated by the pointer is the unit write data amount. The data is updated so as to move backward (see FIG. 6C), and the data writing process is terminated.

続いて、後段の画像処理モジュール38から読出要求がバッファモジュール40に入力された場合(及び、後述するタイマがタイムアウトした場合)に、バッファモジュール40のバッファ制御部40Bによって実行されるデータ読出処理について、図7を参照して説明する。なお、以下で説明するデータ読出処理についても、関数やメソッドの呼び出しで処理が始まるようにしてもよい。   Subsequently, a data read process executed by the buffer control unit 40B of the buffer module 40 when a read request is input from the subsequent image processing module 38 to the buffer module 40 (and a timer described later times out). This will be described with reference to FIG. Note that the data reading process described below may be started by calling a function or method.

データ読出処理では、まずステップ170において、今回のデータ読出処理の起動要因が、後段の画像処理モジュールから読出要求を受信したことによる起動か否か判定する。判定が否定された場合はステップ174へ移行するが、上記判定が肯定された場合はステップ172へ移行し、後段の画像処理モジュールから今回受信した読出要求情報を読出用の待ち行列の末尾に登録する。ステップ174では、自モジュールのバッファ40Aがアクセス中か否か判定する。バッファ40Aに対してはデータの書き込みも行われるので、当該判定が肯定された場合はステップ208へ移行し、読出用の待ち行列に読出要求情報が登録されているか否か判定する。判定が否定された場合はデータ読出処理を終了するが、判定が肯定された場合はステップ210でタイマをスタートさせてデータ読出処理を一旦終了する。タイマをスタートさせた場合には、タイマがタイムアウトするとデータ読出処理が再度起動され、読出用の待ち行列に登録されている未処理の読出要求(情報)が再度取り出され、当該読出要求に応じた処理が行われる。   In the data reading process, first, in step 170, it is determined whether or not the activation factor of the current data reading process is an activation due to reception of a reading request from the subsequent image processing module. If the determination is negative, the process proceeds to step 174. If the above determination is affirmative, the process proceeds to step 172, and the read request information received this time from the subsequent image processing module is registered at the end of the read queue. To do. In step 174, it is determined whether or not the buffer 40A of the own module is being accessed. Since data is also written to the buffer 40A, if the determination is affirmative, the process proceeds to step 208, and it is determined whether or not the read request information is registered in the read queue. If the determination is negative, the data reading process is terminated. If the determination is affirmative, a timer is started at step 210 to end the data reading process once. When the timer is started, when the timer times out, the data read process is started again, and an unprocessed read request (information) registered in the read queue is taken out again. Processing is performed.

一方、ステップ174の判定が否定された場合にはステップ176へ移行し、読出用の待ち行列から先頭に登録されている読出要求情報を取り出す。次のステップ178では、読出用の待ち行列から取り出した読出要求情報に含まれる要求元識別情報に基づいて読出要求元の画像処理モジュール38を認識し、読出要求元の画像処理モジュール38によって設定された単位読出データ量を認識すると共に、読出要求元の画像処理モジュール38に対応する有効データポインタに基づいて、読出要求元の画像処理モジュール38に対応する有効データのバッファ40A上での先頭位置及び末尾位置を認識する。次のステップ180では、ステップ178で認識した有効データの先頭位置及び末尾位置に基づいて、読出要求元の画像処理モジュール38に対応する有効データ(読出要求元の画像処理モジュール38が読出可能な画像データ)が単位読出データ量以上有るか否か判定する。   On the other hand, if the determination in step 174 is negative, the process proceeds to step 176, and the read request information registered at the head is taken out from the read queue. In the next step 178, the image processing module 38 of the read request source is recognized based on the request source identification information included in the read request information extracted from the read queue, and is set by the image processing module 38 of the read request source. In addition to recognizing the unit read data amount, based on the valid data pointer corresponding to the image processing module 38 of the read request source, the head position of the valid data corresponding to the image processing module 38 of the read request source on the buffer 40A and Recognize the end position. In the next step 180, based on the start position and the end position of the valid data recognized in step 178, the valid data corresponding to the image processing module 38 of the read request source (the image that can be read by the image processing module 38 of the read request source). It is determined whether or not (data) exceeds the unit read data amount.

ステップ180の判定が否定された場合はステップ182へ移行し、バッファ40Aに記憶されており読出要求元の画像処理モジュール38が読出可能な有効データの末尾が処理対象の画像データの末尾か否か判定する。読出要求元の画像処理モジュール38に対応する有効データがバッファ40Aに単位読出データ量以上記憶されているか、又は、バッファ40Aに記憶されている読出要求元の画像処理モジュール38に対応する有効データが単位読出データ量未満であるものの、当該有効データの末尾が処理対象の画像データの末尾であった場合には、ステップ180又はステップ182の判定が肯定されてステップ186へ移行する。   If the determination in step 180 is negative, the process proceeds to step 182 and whether or not the end of valid data stored in the buffer 40A and readable by the image processing module 38 of the read request source is the end of the image data to be processed. judge. Valid data corresponding to the image processing module 38 of the read request source is stored in the buffer 40A at a unit read data amount or more, or valid data corresponding to the image processing module 38 of the read request source stored in the buffer 40A is stored. If it is less than the unit read data amount but the end of the valid data is the end of the image data to be processed, the determination in step 180 or step 182 is affirmed and the routine proceeds to step 186.

ステップ186では、読出対象の有効データをバッファ40Aから単位読出データ量分だけ読み出し、読み出した有効データを読出用バッファ領域に書き込む。次のステップ188では、読出用バッファ領域の先頭アドレスを読出領域の先頭アドレスとして読出要求元の画像処理モジュール38へ通知すると共に、通知した先頭アドレスから画像データを順に読み出すよう要請する。これにより、読出要求元の画像処理モジュール38は、先頭アドレスが通知された読出領域(読出用バッファ領域(又は保管用単位バッファ領域:後述))からの画像データの読み出しを行う。なお、読出対象の有効データが処理対象の画像データの末尾に相当するデータであった場合には、画像データの読出要求に際し、読出対象の画像データのサイズと共に、処理対象の画像データの末尾であることも読出要求元の画像処理モジュール38に通知する。また、自モジュールがアプリケーション32によって生成されたバッファモジュール40である場合は、バッファ40Aとして用いているメモリ領域(保管用単位バッファ領域の集合体)は連続領域であるので、読出用バッファ領域への読出対象の画像データの書き込みを省略し、後段の画像処理モジュール38が保管用単位バッファ領域から直接画像データを読み出すようにしてもよい。   In step 186, the effective data to be read is read from the buffer 40A by the amount of unit read data, and the read effective data is written in the read buffer area. In the next step 188, the start address of the read buffer area is notified to the read request source image processing module 38 as the start address of the read area, and the image data is requested to be read sequentially from the notified start address. As a result, the image processing module 38 of the read request source reads the image data from the read area (read buffer area (or storage unit buffer area: described later)) to which the head address is notified. When the effective data to be read is data corresponding to the end of the image data to be processed, the size of the image data to be read is requested at the end of the image data to be processed when the image data is requested to be read. This is also notified to the image processing module 38 of the reading request source. When the own module is the buffer module 40 generated by the application 32, the memory area (collection of storage unit buffer areas) used as the buffer 40A is a continuous area. The writing of image data to be read may be omitted, and the subsequent image processing module 38 may read the image data directly from the storage unit buffer area.

例として図8(A)に示すように、有効データの先頭部分の画像データを記憶している保管用単位バッファ領域に記憶されている有効データのデータ量が単位読出データ量未満であり、読出対象の有効データが複数の保管用単位バッファ領域に跨っている場合には、今回の読出対象の有効データが実際のメモリ14上で連続する領域に記憶されているとは限らないが、上記のデータ読出処理では、図8(B),(C)に示すように、このような場合にも読出対象の画像データを読出用バッファ領域に一旦書き込んだ後に該読出用バッファ領域から画像データを読み出させるので、読出対象の画像データが複数の保管用単位バッファ領域に跨って記憶されているか否かに拘わらず、読出要求元の画像処理モジュール38への読出領域の通知は、上記のようにその先頭アドレスを通知するのみで済み、画像処理モジュール38とのインタフェースが簡単になる。   As an example, as shown in FIG. 8A, the amount of effective data stored in the storage unit buffer area storing the image data of the head portion of the effective data is less than the unit read data amount, and the read When the target valid data extends over a plurality of storage unit buffer areas, the valid data to be read this time is not necessarily stored in a continuous area on the actual memory 14, but In the data reading process, as shown in FIGS. 8B and 8C, even in such a case, the image data to be read is once written in the reading buffer area, and then the image data is read from the reading buffer area. Therefore, regardless of whether image data to be read is stored across a plurality of storage unit buffer areas, the read area notification to the image processing module 38 of the read request source is as described above. It is only necessary to notify the head address to the image processing module 38, and the interface with the image processing module 38 is simplified.

次のステップ190では、読出要求元の画像処理モジュール38による読出領域からの画像データの読み出しが完了したか否か判定し、判定が肯定される迄ステップ190を繰り返す。読出要求元の画像処理モジュール38から読出完了が通知されると、ステップ190の判定が肯定されてステップ194へ移行し、読出要求元の画像処理モジュール38に対応する有効データポインタのうち有効データの先頭位置を表すポインタを、該ポインタが指し示す有効データの先頭位置を単位読出データ量分だけ後へ移動させることで更新する(図8(C)も参照)。   In the next step 190, it is determined whether reading of image data from the reading area by the image processing module 38 that is the reading request source is completed, and step 190 is repeated until the determination is affirmed. When the reading completion is notified from the image processing module 38 of the read request source, the determination in step 190 is affirmed and the process proceeds to step 194, and the valid data pointer of the valid data pointer corresponding to the image processing module 38 of the read request source is displayed. The pointer representing the head position is updated by moving the head position of the valid data pointed to by the pointer backward by the unit read data amount (see also FIG. 8C).

ステップ196では、後段の個々の画像処理モジュール38に対応する有効データポインタを各々参照し、ステップ194のポインタ更新により、バッファ40Aを構成する保管用単位バッファ領域の中に、記憶している画像データの後段の各画像処理モジュール38による読み出しが全て完了した保管用単位バッファ領域、すなわち有効データを記憶していない保管用単位バッファ領域が出現したか否か判定する。判定が否定された場合はステップ208へ移行し、前述のステップ208,210を経てデータ読出処理を終了するが、判定が肯定された場合はステップ198へ移行し、有効データを記憶していない保管用単位バッファ領域をリソース管理部46Bによって解放させた後にステップ208へ移行し、ステップ208,210を経てデータ読出処理を終了する。   In step 196, the valid data pointers corresponding to the individual image processing modules 38 in the subsequent stage are referred to, and the image data stored in the storage unit buffer area constituting the buffer 40A is updated by the pointer update in step 194. It is determined whether or not a storage unit buffer area that has been completely read by each image processing module 38 in the subsequent stage, that is, a storage unit buffer area that does not store valid data, has appeared. If the determination is negative, the process proceeds to step 208, and the data reading process is terminated through the above-described steps 208 and 210. If the determination is affirmative, the process proceeds to step 198, and the valid data is not stored. After the unit buffer area is released by the resource management unit 46B, the process proceeds to step 208, and the data read process is terminated through steps 208 and 210.

一方、バッファ40Aに記憶されており読出要求元の画像処理モジュール38が読出可能な有効データのデータ量が単位読出データ量未満であり、かつ読出可能な有効データの末尾が処理対象の画像データの末尾でない場合(図3(B)の(4)で読出可能な有効データ無が検知された場合)には、ステップ180,182の判定が各々否定されてステップ200へ移行し、新たな画像データを要求するデータ要求をワークフロー管理部46Aへ出力する(図3(B)の(5)も参照)。この場合、ワークフロー管理部46Aにより、自モジュールの前段の画像処理モジュール38に処理要求が入力されることになる。またステップ202では、読出用の待ち行列から取り出した読出要求情報を元の待ち行列(の先頭又は末尾)に再度登録し、ステップ208,210を経てデータ読出処理を終了する。これにより、読出可能な有効データのデータ量が単位読出データ量以上になるか、読出可能な有効データの末尾が処理対象の画像データの末尾であることが検知される迄(ステップ180又はステップ182の判定が肯定される迄)の間、対応する読出要求情報は読出用の待ち行列に保存されると共に定期的に取り出されて要求された処理の実行が繰り返し試行されることになる。   On the other hand, the amount of valid data stored in the buffer 40A and readable by the image processing module 38 that is the read request source is less than the unit read data amount, and the end of the readable valid data is the image data to be processed. If it is not the end (when no valid data that can be read is detected in (4) of FIG. 3B), the determinations in steps 180 and 182 are respectively denied, and the process proceeds to step 200, where new image data is obtained. Is output to the workflow management unit 46A (see also (5) in FIG. 3B). In this case, the workflow management unit 46A inputs a processing request to the image processing module 38 in the previous stage of the own module. In step 202, the read request information taken out from the read queue is registered again in the original queue (at the head or tail), and the data read process is terminated through steps 208 and 210. Thus, until it is detected that the amount of valid data that can be read exceeds the unit read data amount or that the end of the valid data that can be read is the end of the image data to be processed (step 180 or step 182). The corresponding read request information is stored in the read queue and is periodically retrieved to repeatedly execute the requested process (until the determination is affirmed).

詳細は後述するが、ワークフロー管理部46Aはバッファモジュール40からデータ要求が入力されると、データ要求元のバッファモジュール40の前段の画像処理モジュール38に処理要求を入力する(図3(B)の(6)も参照)。この処理要求の入力をトリガとして前段の画像処理モジュール38の制御部38Bで行われる処理により、前段の画像処理モジュール38がバッファモジュール40へ画像データを書込可能な状態になると、前段の画像処理モジュール38から書込要求が入力されることで前述したデータ書込処理(図4)が行われ、前段の画像処理モジュール38からバッファモジュール40のバッファ40Aに画像データが書き込まれる(図3(B)の(7),(8)も参照)。これにより、後段の画像処理モジュール38によるバッファ40Aからの画像データの読出が行われることになる(図3(B)の(9)も参照)。   Although details will be described later, when a data request is input from the buffer module 40, the workflow management unit 46A inputs the processing request to the image processing module 38 in the preceding stage of the buffer module 40 that is the data request source (see FIG. 3B). (See also (6)). When the processing performed by the control unit 38B of the preceding image processing module 38 using the input of the processing request as a trigger causes the preceding image processing module 38 to be able to write image data into the buffer module 40, the preceding image processing is performed. When the writing request is input from the module 38, the above-described data writing process (FIG. 4) is performed, and image data is written from the preceding image processing module 38 to the buffer 40A of the buffer module 40 (FIG. 3B). (See also (7) and (8)). As a result, the image data is read from the buffer 40A by the image processing module 38 in the subsequent stage (see also (9) in FIG. 3B).

上述したデータ書込処理及びデータ読出処理では、一方が自モジュールのバッファ40Aにアクセスしている間、他方がバッファ40Aへのアクセスを停止する排他制御が行われる。これにより、コンピュータ10のCPU12が画像処理部50を構成する個々のモジュールに対応するプロセス又はスレッドを並列に実行しても、単一のバッファモジュール40に複数の要求が同時又は略同時に入力されることによる不都合の発生を回避できるので、コンピュータ10のCPU12が個々のモジュールに対応するプロセス又はスレッドを並列に実行することができる。もちろん、バッファモジュールを通常のプログラムまたはオブジェクトとして実現しても良い。   In the above-described data writing process and data reading process, exclusive control is performed so that while one is accessing the buffer 40A of its own module, the other stops accessing the buffer 40A. Thereby, even if the CPU 12 of the computer 10 executes processes or threads corresponding to the individual modules constituting the image processing unit 50 in parallel, a plurality of requests are input to the single buffer module 40 simultaneously or substantially simultaneously. Therefore, the CPU 12 of the computer 10 can execute processes or threads corresponding to individual modules in parallel. Of course, the buffer module may be realized as a normal program or object.

続いて、画像処理部50を構成する個々の画像処理モジュール38に対してワークフロー管理部46Aから処理要求が入力される毎に、個々の画像処理モジュール38の制御部38Bによって各々行われる画像処理モジュール制御処理(図9)を説明する。   Subsequently, each time a processing request is input from the workflow management unit 46A to the individual image processing modules 38 constituting the image processing unit 50, the image processing modules respectively performed by the control unit 38B of the individual image processing module 38. The control process (FIG. 9) will be described.

画像処理モジュール制御処理では、まずステップ220において、自モジュールの前段にモジュール(バッファモジュール40や画像データ供給部22、画像処理モジュール38等)が存在している場合に、当該前段のモジュールに対してデータ(画像データ又は解析等の画像処理の処理結果)を要求する。次のステップ222では前段のモジュールからデータが取得可能であるかを判定し、ステップ222の判定が否定された場合はステップ224で全体処理終了が通知されたか否かを判定する。ステップ224の判定が否定された場合はステップ222に戻り、前段のモジュールからデータを取得可能となる迄ステップ222,224を繰り返す。ステップ222の判定が肯定された場合には、ステップ226で前段のモジュールからデータを取得するデータ取得処理を行う。   In the image processing module control process, first, in step 220, when a module (the buffer module 40, the image data supply unit 22, the image processing module 38, etc.) exists in the previous stage of the own module, the module in the previous stage is processed. Data (image data or processing result of image processing such as analysis) is requested. In the next step 222, it is determined whether data can be acquired from the previous module. If the determination in step 222 is negative, it is determined in step 224 whether the end of the entire process has been notified. If the determination in step 224 is negative, the process returns to step 222, and steps 222 and 224 are repeated until data can be acquired from the preceding module. If the determination in step 222 is affirmed, in step 226, data acquisition processing for acquiring data from the previous module is performed.

ここで、自モジュールの前段のモジュールがバッファモジュール40である場合には、先のステップ220でデータを要求すると(読出要求)、読出可能な有効データがバッファモジュール40のバッファ40Aに単位読出データ量以上記憶されているか、読出可能な有効データの末尾が処理対象の画像データの末尾に一致している状態であれば直ちに、当該状態でなければ、当該バッファモジュール40の前段の画像処理モジュール38が当該バッファモジュール40のバッファ40Aに画像データを書き込んだことに伴って前記状態へ変化した後に、バッファモジュール40から読出領域の先頭アドレスが通知されて画像データの読出が要請される。これにより、ステップ222の判定が肯定されてステップ226へ移行し、前段のバッファモジュール40より先頭アドレスが通知された読出領域から単位読出データ量(又はそれ未満のデータ量)の画像データを読み出すデータ取得処理を行う(図3(A)の(3)も参照)。   Here, if the previous module of the own module is the buffer module 40, when data is requested in the previous step 220 (read request), the readable valid data is transferred to the buffer 40A of the buffer module 40 in the unit read data amount. As long as the end of the valid data that has been stored or readable matches the end of the image data to be processed, the image processing module 38 in the previous stage of the buffer module 40 immediately returns to the state of the image data to be processed. After the image data is written in the buffer 40A of the buffer module 40, the state is changed to the above state, and then the start address of the reading area is notified from the buffer module 40 and the reading of the image data is requested. As a result, the determination in step 222 is affirmed, and the process proceeds to step 226. Data for reading image data of a unit read data amount (or a data amount less than that) from the read area in which the head address is notified from the previous buffer module 40 An acquisition process is performed (see also (3) in FIG. 3A).

また、自モジュールの前段のモジュールが画像データ供給部22であれば、先のステップ220でデータ要求を出力すると画像データを取得可能な状態であることが前段の画像データ供給部22から直ちに通知されることで、ステップ222の判定が肯定されてステップ226へ移行し、前段の画像データ供給部22から単位読出データ量の画像データを取得する画像データ取得処理を行う。また、自モジュールの前段のモジュールが画像処理モジュール38であれば、先のステップ220でデータ要求(処理要求)を出力すると、前段の画像処理モジュール38が画像処理を実行可能な状態であれば書込要求が入力されることでデータ(画像処理結果)を取得可能な状態であることが通知されるので、ステップ222の判定が肯定されてステップ226へ移行し、前段の画像処理モジュール38によってデータを書き込ませる一時保管用のメモリ領域のアドレスを通知して書き込みを要請することで、前段の画像処理モジュール38から出力されるデータを一時保管用のメモリ領域に書き込ませるデータ取得処理を行う。   If the previous module of the own module is the image data supply unit 22, when the data request is output in the previous step 220, it is immediately notified from the previous image data supply unit 22 that the image data can be acquired. As a result, the determination at step 222 is affirmed and the routine proceeds to step 226, where image data acquisition processing for acquiring image data of a unit read data amount from the preceding image data supply unit 22 is performed. If the previous module of the own module is the image processing module 38, a data request (processing request) is output in the previous step 220. If the previous image processing module 38 is ready to perform image processing, the data request is written. Since it is notified that the data (image processing result) can be acquired by inputting the load request, the determination in step 222 is affirmed and the process proceeds to step 226. The data acquisition process for writing the data output from the image processing module 38 in the previous stage to the temporary storage memory area is performed by notifying the address of the temporary storage memory area where the data is written and requesting the writing.

次のステップ228では、自モジュールの前段に複数のモジュールが連結されているか否か判定する。判定が否定された場合には何ら処理を行うことなくステップ232へ移行するが、判定が肯定された場合はステップ230へ移行し、前段に連結されている全てのモジュールからデータを取得したか否か判定する。ステップ230の判定が否定された場合はステップ220に戻り、ステップ230の判定が肯定される迄ステップ220〜ステップ230を繰り返す。前段のモジュールから取得すべきデータが全て揃うと、ステップ228の判定が否定されるかステップ230の判定が肯定されてステップ232へ移行する。   In the next step 228, it is determined whether or not a plurality of modules are connected to the previous stage of the own module. If the determination is negative, the process proceeds to step 232 without performing any processing. If the determination is affirmative, the process proceeds to step 230, and whether or not data has been acquired from all modules connected in the previous stage. To determine. If the determination in step 230 is negative, the process returns to step 220, and steps 220 to 230 are repeated until the determination in step 230 is positive. When all the data to be acquired from the previous module is obtained, the determination in step 228 is denied or the determination in step 230 is affirmed, and the process proceeds to step 232.

次のステップ232では自モジュールの後段のモジュールに対してデータ出力用の領域を要求し、ステップ232でデータ出力領域が取得できる迄(データ出力領域の先頭アドレスが通知される迄)繰り返し判定を行う。なお、後段のモジュールがバッファモジュール40であれば、上記のデータ出力用領域の要求は当該バッファモジュール40に対して書込要求を出力することによって成される。データ出力領域(後段のモジュールがバッファモジュール40であれば当該バッファモジュール40から先頭アドレスが通知された書込領域)が取得できたら(図3(A)の(4)も参照)、次のステップ236において、先のデータ取得処理で取得したデータ、後段のモジュールから取得したデータ出力領域(の先頭アドレス)を画像処理エンジン38Aに入力し、入力したデータに対して所定の画像処理を行わせる(図3(A)の(5)も参照)と共に、処理後のデータをデータ出力領域に書き込ませる(図3(A)の(6)も参照)。画像処理エンジン38Aへの単位読出データ量のデータの入力が完了し、画像処理エンジン38Aから出力されたデータがデータ出力領域に全て書き込まれると、次のステップ238で出力が完了したことを後段のモジュールに通知する。   In the next step 232, an area for data output is requested to the module subsequent to the module, and the determination is repeated until the data output area can be acquired in step 232 (until the start address of the data output area is notified). . If the subsequent module is the buffer module 40, the request for the data output area is made by outputting a write request to the buffer module 40. Once the data output area (the write area in which the start address is notified from the buffer module 40 if the subsequent module is the buffer module 40) can be obtained (see also (4) in FIG. 3A), the next step In 236, the data acquired in the previous data acquisition process and the data output area (first address) acquired from the subsequent module are input to the image processing engine 38A, and predetermined image processing is performed on the input data ( At the same time, the processed data is written in the data output area (see also (6) of FIG. 3A). When the input of the unit read data amount to the image processing engine 38A is completed and all the data output from the image processing engine 38A is written in the data output area, the subsequent step 238 indicates that the output has been completed. Notify the module.

上記のステップ220〜ステップ238により画像処理モジュール38における単位処理データ量のデータに対する処理(単位処理)が完了するが、ワークフロー管理部46Aから画像処理モジュール38に入力される処理要求では、ワークフロー管理部46Aによって単位処理の実行回数が指定されることがある。このためステップ240では、単位処理の実行回数が、入力された処理要求によって指示された実行回数に達したか否か判定する。指示された単位処理の実行回数が1回の場合、この判定は無条件に肯定されるが、指示された単位処理の実行回数が2回以上の場合はステップ220に戻り、ステップ240の判定が肯定される迄ステップ220〜ステップ240を繰り返す。ステップ240の判定が肯定されるとステップ242へ移行し、ワークフロー管理部46Aへ処理完了通知を出力することで、入力された処理要求に対応する処理が完了したことをワークフロー管理部46Aへ通知し、画像処理モジュール制御処理を終了する。   The processing (unit processing) for the data of the unit processing data amount in the image processing module 38 is completed by the above steps 220 to 238. However, in the processing request input from the workflow management unit 46A to the image processing module 38, the workflow management unit The number of executions of unit processing may be specified by 46A. Therefore, in step 240, it is determined whether the number of executions of the unit process has reached the number of executions instructed by the input processing request. If the number of executions of the instructed unit process is 1, this determination is unconditionally affirmed. However, if the number of executions of the instructed unit process is 2 or more, the process returns to Step 220, and the determination in Step 240 is performed. Steps 220 to 240 are repeated until affirmative. If the determination in step 240 is affirmed, the process proceeds to step 242 to output a processing completion notification to the workflow management unit 46A, thereby notifying the workflow management unit 46A that the processing corresponding to the input processing request has been completed. Then, the image processing module control process ends.

また、ワークフロー管理部46Aから処理要求が入力される毎に上述した処理が繰り返されることで処理対象の画像データを末尾まで処理すると、前段のモジュールから処理対象の画像データの終了が通知されることで、ステップ224の判定が肯定されてステップ244へ移行し、処理対象の画像データ(なお、処理対象の画像データは1頁分の画像データであることが多いが、複数頁分の画像データであってもよい)に対する処理が終了したことを意味する全体処理終了通知をワークフロー管理部46A及び後段のモジュールへ各々出力する。また、次のステップ246では取得していた全てのリソースの解放を要求して自モジュールを消去する処理を行い、画像処理モジュール制御処理を終了する。   Further, when the processing image data is processed to the end by repeating the above-described processing every time a processing request is input from the workflow management unit 46A, the end of the processing target image data is notified from the preceding module. Thus, the determination in step 224 is affirmed, and the process proceeds to step 244. The image data to be processed (note that the image data to be processed is often image data for one page, but is image data for a plurality of pages. An overall process end notification that means that the process for (which may be present) has ended is output to the workflow management unit 46A and the subsequent module. In the next step 246, a process for requesting the release of all acquired resources and deleting the own module is performed, and the image processing module control process is terminated.

一方、ワークフロー管理部46Aは、アプリケーション32によって画像処理の実行が指示されると、図10(A)に示す並列制御処理1を行う。先にも述べたように、ワークフロー管理部46Aによる画像処理部50の個々の画像処理モジュール38への処理要求の入力では、単位処理の実行回数を指定可能とされているが、並列制御処理1のステップ500では、1回の処理要求で指定する単位処理の実行回数を個々の画像処理モジュール38毎に決定する。この処理要求1回当りの単位処理の実行回数は、例えば処理対象の画像データ全体を処理する間の個々の画像処理モジュール38への処理要求の入力回数が平均化されるように定めることができるが、他の基準に従って定めてもよい。そして次のステップ504において、画像処理部50のうち最後段の画像処理モジュール38に処理要求を入力し(図11の(1)も参照)、並列制御処理1を終了する。   On the other hand, when the application 32 is instructed to execute image processing by the application 32, the workflow management unit 46A performs the parallel control processing 1 shown in FIG. As described above, in the input of processing requests to the individual image processing modules 38 of the image processing unit 50 by the workflow management unit 46A, the number of executions of unit processing can be specified. In step 500, the number of executions of unit processing specified by one processing request is determined for each image processing module 38. The number of executions of unit processing per processing request can be determined so that, for example, the number of processing requests input to individual image processing modules 38 during the processing of the entire image data to be processed is averaged. However, it may be determined according to other criteria. In the next step 504, a processing request is input to the last image processing module 38 in the image processing unit 50 (see also (1) in FIG. 11), and the parallel control processing 1 is terminated.

ここで、図10に示す画像処理部50において、ワークフロー管理部46Aから最後段の画像処理モジュール384に処理要求が入力されると、画像処理モジュール384の制御部38Bは前段のバッファモジュール403に読出要求を入力する(図11の(2)参照)。このとき、バッファモジュール403のバッファ40Aには画像処理モジュール384が読出可能な有効データ(画像データ)が記憶されていないので、バッファモジュール403のバッファ制御部40Bはワークフロー管理部46Aにデータ要求を入力する(図11の(3)参照)。 Here, in the image processing unit 50 shown in FIG. 10, when the process from the workflow management unit 46A to the image processing module 38 4 of the last stage request is input, the control unit 38B of the image processing module 38 4 preceding buffer module 40 A read request is input to 3 (see (2) in FIG. 11). At this time, since the image processing module 38 4 readable valid data in the buffer 40A of the buffer module 40 3 (image data) is not stored, the buffer controller 40B of the buffer module 40 3 data in the workflow management unit 46A A request is input (see (3) in FIG. 11).

ワークフロー管理部46Aは、バッファモジュール40からデータ要求が入力される毎に、図10(B)に示す並列制御処理2を行う。この並列制御処理2では、ステップ510において、データ要求入力元のバッファモジュール40(ここではバッファモジュール403)の前段の画像処理モジュール38(ここでは画像処理モジュール383)を認識し、認識した前段の画像処理モジュール38に処理要求を入力(図11の(4)参照)して処理を終了する。 The workflow management unit 46A performs the parallel control process 2 shown in FIG. 10B every time a data request is input from the buffer module 40. In the parallel control processing 2, in step 510, the image processing module 38 preceding the data request input source of the buffer module 40 (wherein the buffer module 40 3) (in this case the image processing module 38 3) recognizes, recognized front The processing request is input to the image processing module 38 (see (4) in FIG. 11), and the processing ends.

画像処理モジュール383の制御部38Bは、処理要求が入力されると前段のバッファモジュール402に読出要求を入力し(図11の(5)参照)、バッファモジュール402のバッファ40Aにも読出可能な画像データが記憶されていないので、バッファモジュール402のバッファ制御部40Bはワークフロー管理部46Aにデータ要求を入力する(図11の(6)参照)。ワークフロー管理部46Aは、バッファモジュール402からデータ要求が入力された場合も、前述の並列制御処理2を再度行うことで、その前段の画像処理モジュール382に処理要求を入力し(図11の(7)参照)、画像処理モジュール383の制御部38Bは前段のバッファモジュール401に読出要求を入力する(図11の(8)参照)。また、バッファモジュール401のバッファ40Aにも読出可能な画像データが記憶されていないので、バッファモジュール401のバッファ制御部40Bもワークフロー管理部46Aにデータ要求を入力し(図11の(9)参照)。ワークフロー管理部46Aは、バッファモジュール401からデータ要求が入力された場合も、前述の並列制御処理2を再度行うことで、その前段の画像処理モジュール381に処理要求を入力する(図11の(10)参照)。 Control unit 38B of the image processing module 38 3, the processing request is input to the input read request preceding the buffer module 40 2 (see (5) in FIG. 11), read in the buffer 40A of the buffer module 40 2 since possible image data is not stored, the buffer controller 40B of the buffer module 40 2 inputs the data request to the workflow management unit 46A (see (6) in FIG. 11). Workflow management unit 46A, even if the data request is input from the buffer module 40 2, by performing the parallel control processing 2 described above again, enter the processing request to the image processing module 38 2 of the preceding stage (Figure 11 (7)), the control unit 38B of the image processing module 38 3 inputs the read request to the buffer module 40 1 of the front reference ((8 in FIG. 11)). Further, since the readable image data to the buffer 40A of the buffer module 40 1 is not stored, the buffer controller 40B of the buffer module 40 1 also inputs the data request to the workflow management unit 46A (in FIG. 11 (9) reference). Even when a data request is input from the buffer module 40 1 , the workflow management unit 46A performs the above-described parallel control processing 2 again to input a processing request to the preceding image processing module 38 1 (FIG. 11). (See (10)).

ここで、画像処理モジュール381の前段のモジュールは画像データ供給部22であるので、画像処理モジュール381の制御部38Bは、画像データ供給部22にデータ要求を入力することで画像データ供給部22から単位読出データ量の画像データを取得し(図11の(11)参照)、取得した画像データに対して画像処理エンジン38Aが画像処理を行うことで得られた画像データを、後段のバッファモジュール401のバッファ40Aに書き込む(図11の(12)参照)。 Here, since the previous module of the image processing module 38 1 is the image data supply unit 22, the control unit 38 B of the image processing module 38 1 inputs a data request to the image data supply unit 22, and thereby the image data supply unit 22. The image data of the unit read data amount is acquired from the image data 22 (see (11) in FIG. 11), and the image data obtained by the image processing engine 38A performing image processing on the acquired image data is stored in the subsequent buffer. write module 40 first buffer 40A (see (12) in FIG. 11).

また、バッファモジュール401のバッファ制御部40Bは、後段の画像処理モジュール382が読出可能な単位読出データ量以上の有効データが書き込まれると画像処理モジュール382に対して読出を要請し、これに伴い画像処理モジュール382の制御部38Bは、バッファモジュール401のバッファ40Aから単位読出データ量の画像データを読み出し(図11の(13)参照)、取得した画像データに対して画像処理エンジン38Aが画像処理を行うことで得られた画像データを、後段のバッファモジュール402のバッファ40Aに書き込む(図11の(14)参照)。バッファモジュール402のバッファ制御部40Bは、後段の画像処理モジュール383が読出可能な単位読出データ量以上の有効データが書き込まれると画像処理モジュール383へ読出を要請し、画像処理モジュール383の制御部38Bは、バッファモジュール402のバッファ40Aから単位読出データ量の画像データを読み出し(図11の(15)参照)、取得した画像データに対して画像処理エンジン38Aが画像処理を行うことで得られた画像データを、後段のバッファモジュール403のバッファ40Aに書き込む(図11の(16)参照)。 Further, the buffer control unit 40B of the buffer module 40 1 requests the image processing module 38 2 to read when valid data exceeding the unit read data amount that can be read by the subsequent image processing module 38 2 is written. the image processing module 38 and second control unit 38B with the reads image data of the unit read data amount from the buffer module 40 1 of buffer 40A (see (13) in FIG. 11), the image processing engine on the acquired image data 38A is an image data obtained by performing image processing, written in the following buffer module 40 second buffer 40A (see (14) in FIG. 11). The buffer control unit 40B of the buffer module 40 2 requests the image processing module 38 3 to read when valid data exceeding the unit read data amount that can be read by the subsequent image processing module 38 3 is written, and the image processing module 38 3. the control unit 38B of the (see (15) in FIG. 11) reads the image data of the unit read data amount from the buffer module 40 2 of the buffer 40A, the image processing engine 38A on the acquired image data to perform image processing the image data obtained by, written to the subsequent buffer module 40 third buffer 40A (see (16) in FIG. 11).

更に、バッファモジュール403のバッファ制御部40Bは、後段の画像処理モジュール384が読出可能な単位読出データ量以上の有効データが書き込まれると画像処理モジュール384に対して読出を要請し、これに伴い画像処理モジュール384の制御部38Bは、バッファモジュール403のバッファ40Aから単位読出データ量の画像データを読み出し(図11の(17)参照)、取得した画像データに対して画像処理エンジン38Aが画像処理を行うことで得られた画像データを、後段のモジュールである画像出力部24へ出力する(図11の(18)参照)。 Furthermore, the buffer controller 40B of the buffer module 40 3 may request a read to the image processing module 38 4 When the subsequent image processing module 38 4 readable unit read data amount or more valid data is written, which control unit 38B of the image processing module 38 4 with the reads the image data of the unit read data amount from the buffer module 40 third buffer 40A (see (17) in FIG. 11), the image processing engine on the acquired image data The image data obtained by the image processing performed by 38A is output to the image output unit 24, which is a subsequent module (see (18) in FIG. 11).

また、個々の画像処理モジュール38の制御部38Bは、後段のバッファモジュール40のバッファ40Aへの画像データの書き込みを完了すると、ワークフロー管理部46Aへ処理完了通知を入力する。ワークフロー管理部46Aは、画像処理モジュール38から処理完了通知が入力される毎に、図10(C)に示す並列制御処理3を行う。この並列制御処理3では、ステップ520で処理完了通知元の画像処理モジュール38に処理要求を再度入力して処理を終了する。   In addition, when the control unit 38B of each image processing module 38 completes the writing of the image data to the buffer 40A of the subsequent buffer module 40, the control unit 38B inputs a processing completion notification to the workflow management unit 46A. The workflow management unit 46A performs the parallel control process 3 shown in FIG. 10C every time a processing completion notification is input from the image processing module 38. In this parallel control processing 3, in step 520, the processing request is input again to the image processing module 38 that is the processing completion notification source, and the processing ends.

このように、ワークフロー管理部46Aによる並列制御処理では、任意の画像処理モジュール38から処理完了が通知される毎に、処理完了通知元の画像処理モジュール38へ処理要求を再度入力することで、処理対象の画像データが前段側のモジュールから後段側のモジュールへ画像1面分よりも小さいサイズ(ブロック)を単位として順に引き渡されると共に、個々の画像処理モジュール38が互いに並列に画像処理を行う並列処理方式によって処理対象の画像データに対する画像処理が行われる。また、画像データ供給部22から供給される画像データが処理対象の画像データの末尾に達すると、個々の画像処理モジュール38からワークフロー管理部46Aへの全体処理終了通知の入力が、前段側の画像処理モジュール38から順次行われる。   In this way, in the parallel control processing by the workflow management unit 46A, every time processing completion is notified from any image processing module 38, the processing request is input again to the image processing module 38 that is the processing completion notification source, thereby Parallel processing in which target image data is sequentially transferred from a module on the front side to a module on the back side in units of a size (block) smaller than one image, and individual image processing modules 38 perform image processing in parallel with each other. Image processing is performed on the image data to be processed according to the method. When the image data supplied from the image data supply unit 22 reaches the end of the image data to be processed, the input of the overall processing end notification from the individual image processing module 38 to the workflow management unit 46A is sent to the preceding image. The processing modules 38 are sequentially performed.

ワークフロー管理部46Aは、画像処理モジュール38から全体処理終了通知が入力される毎に、図10(D)に示す並列制御処理4を行う。この並列制御処理4では、ステップ540において、全体処理終了通知入力元の画像処理モジュール38が最後段の画像処理モジュール38か否か判定する。判定が否定された場合は何ら処理を行うことなく処理を終了するが、処理対象の画像データに対して必要な画像処理が行われた画像データが画像出力部24へ全て出力されることで、最後段の画像処理モジュール38から全体処理終了通知が入力された場合には、ステップ540の判定が肯定されてステップ542へ移行し、アプリケーション32に対して画像処理の完了を通知し、並列制御処理4を終了する。そして、画像処理の完了が通知されたアプリケーション32は、ユーザに対して画像処理の完了を通知する。   The workflow management unit 46A performs the parallel control process 4 shown in FIG. 10D every time an overall process end notification is input from the image processing module 38. In this parallel control process 4, in step 540, it is determined whether the image processing module 38 that is the input source of the overall process end notification is the last-stage image processing module 38. If the determination is negative, the process ends without performing any process, but all the image data that has undergone the necessary image processing on the image data to be processed is output to the image output unit 24. When an overall process end notification is input from the last-stage image processing module 38, the determination in step 540 is affirmed and the process proceeds to step 542 to notify the application 32 of the completion of the image processing and perform parallel control processing. 4 is finished. The application 32 notified of the completion of the image processing notifies the user of the completion of the image processing.

上記のように画像処理部50が画像処理を行っている間、画像処理部50を構成する個々のバッファモジュール40(に対応するスレッド)は、先にも説明したように、バッファ40Aとして用いるメモリ領域の取得(割当要求)及び解放をリソース管理部46Bに対して繰り返す。ここで、メモリ14が比較的小容量で、バッファ40Aとして使用可能なメモリ領域の容量が限られている場合、処理管理部46に保持される割当可能メモリ容量として比較的小さい値が設定され、個々のバッファモジュール40の割当要求サイズも比較的小さい値(=割当可能メモリ容量)に設定されるので、個々のバッファモジュール40は、比較的小さい容量を単位として、バッファ40Aとして用いるメモリ領域の割当を要求する。従ってこの場合、リソース管理部46Bに対して個々のバッファモジュール40から高い頻度でメモリ領域の割当が要求されることで、オーバヘッドが増大して処理効率は低下するものの、個々のバッファモジュール40がバッファ40Aとして確保・保持しているメモリ領域の平均容量が小さくなることで、メモリ14の使用量が低減し、メモリ14を有効に利用することができる。   While the image processing unit 50 is performing image processing as described above, each buffer module 40 (corresponding to the thread) constituting the image processing unit 50 is a memory used as the buffer 40A as described above. The acquisition (allocation request) and release of the area are repeated for the resource management unit 46B. Here, when the memory 14 has a relatively small capacity and the capacity of the memory area usable as the buffer 40A is limited, a relatively small value is set as the allocatable memory capacity held in the process management unit 46, Since the allocation request size of each buffer module 40 is also set to a relatively small value (= allocable memory capacity), each buffer module 40 allocates a memory area to be used as the buffer 40A in units of a relatively small capacity. Request. Therefore, in this case, the allocation of memory areas is frequently requested from the individual buffer modules 40 to the resource management unit 46B, which increases the overhead and decreases the processing efficiency. Since the average capacity of the memory area secured and held as 40A is reduced, the usage amount of the memory 14 is reduced and the memory 14 can be used effectively.

一方、メモリ14が比較的大容量で、バッファ40Aとして使用可能なメモリ領域も潤沢に設けられている場合、処理管理部46に保持される割当可能メモリ容量として比較的大きい値が設定され、個々のバッファモジュール40の割当要求サイズも比較的大きい値(=画像1面分の画像データに相当するメモリ容量)に設定されるので、個々のバッファモジュール40は、比較的大きい容量を単位として、バッファ40Aとして用いるメモリ領域の割当を要求する。従ってこの場合、個々のバッファモジュール40がバッファ40Aとして確保・保持しているメモリ領域の平均容量が大きくなることで、メモリ14の使用量は増大するものの、リソース管理部46Bに対して個々のバッファモジュール40からメモリ領域の割当が要求される頻度が低下することで、オーバヘッドが削減され処理効率を向上させることができる。従って、メモリ14の使用量低減を優先するか画像処理の処理効率向上を優先するかを動作環境(メモリ14の容量等)に応じて切り替えることができる。   On the other hand, when the memory 14 has a relatively large capacity and a sufficient amount of memory area can be used as the buffer 40A, a relatively large value is set as the allocatable memory capacity held in the process management unit 46. The allocation request size of the buffer module 40 is also set to a relatively large value (= memory capacity corresponding to image data for one image), so that each buffer module 40 has a buffer with a relatively large capacity as a unit. Requests allocation of a memory area used as 40A. Therefore, in this case, although the amount of use of the memory 14 increases because the average capacity of the memory area secured and held by the individual buffer module 40 as the buffer 40A increases, the individual buffer module 40B uses the individual buffer. By reducing the frequency at which the memory area is requested from the module 40, the overhead can be reduced and the processing efficiency can be improved. Accordingly, it is possible to switch whether priority is given to reducing the usage amount of the memory 14 or improvement of the processing efficiency of image processing according to the operating environment (capacity of the memory 14 or the like).

なお、第1実施形態では、バッファ40Aとして用いるメモリ領域の確保(割当要求)を割当要求サイズを単位として行い、バッファ40Aとして用いるメモリ領域の解放は単位バッファ領域を単位として行う態様を説明したが、メモリ領域の解放も割当要求サイズを単位として行うようにしてもよい。この場合、個々のバッファモジュール40がバッファ40Aとして確保・保持しているメモリ領域の平均容量が増大する可能性はあるものの、オーバーヘッドを更に削減することができる。   In the first embodiment, it has been described that the memory area used as the buffer 40A is secured (allocation request) in units of allocation request size, and the memory area used as the buffer 40A is released in units of unit buffer areas. The memory area may also be released in units of allocation request size. In this case, although there is a possibility that the average capacity of the memory area secured and held by each buffer module 40 as the buffer 40A may increase, the overhead can be further reduced.

〔第2実施形態〕
次に本発明の第2実施形態について説明する。なお、本第2実施形態は第1実施形態と同一の構成であるので、各部分に同一の符号を付して構成の説明を省略し、本第2実施形態の作用について、第1実施形態と異なる部分についてのみ説明する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. Since the second embodiment has the same configuration as that of the first embodiment, the same reference numerals are given to the respective parts and description of the configuration is omitted, and the operation of the second embodiment will be described. Only different parts will be described.

本第2実施形態に係る画像処理モジュール38の制御部38Bは、モジュール生成部44によって起動されると、図12に示す画像処理モジュール初期化処理を行う。この画像処理モジュール初期化処理では、第1実施形態と同様に、まず自モジュールの前段及び後段のモジュールの情報を記憶し(ステップ600)、自モジュールの前段及び後段のモジュールを判定し、単位読出データ量及び単位書込データ量を認識する(ステップ602)。   When activated by the module generation unit 44, the control unit 38B of the image processing module 38 according to the second embodiment performs an image processing module initialization process illustrated in FIG. In this image processing module initialization process, as in the first embodiment, first, information on the modules before and after the own module is stored (step 600), the modules before and after the own module are determined, and unit reading is performed. The data amount and the unit write data amount are recognized (step 602).

ステップ604では、処理管理部46(のワークフロー管理部46A)によって所定の領域に保持されている割当可能メモリ容量を参照・認識し、次のステップ606では、認識した割当可能メモリ容量をステップ602で認識した単位書込データ量で除算することで繰り返し回数Nを求める。なお、上記の除算で剰余(端数)が生じた場合には、四捨五入、切り捨て及び切り上げの何れかの端数処理を行うことで、繰り返し回数Nの整数化を行う。また、上記の除算において、単位書込データ量に代えて単位読出データ量を用いてもよいし、単位書込データ量と単位読出データ量の平均値を用いてもよい。ステップ608では、書込データ量として、ステップ602で認識した単位書込データ量にステップ606で求めた繰り返し回数Nを乗じた値を設定する。そしてステップ610では、後段に存在しているバッファモジュール40に対し、ステップ608で求めた書込データ量(単位書込データ量のN倍のデータ量)を単位書込データ量として設定する。   In step 604, the process management unit 46 (the workflow management unit 46A) refers to and recognizes the allocatable memory capacity held in a predetermined area. In the next step 606, the recognized allocatable memory capacity is determined in step 602. The number of repetitions N is obtained by dividing by the recognized unit write data amount. When a remainder (fraction) is generated by the above division, rounding, rounding down, or rounding up is performed to make the number of repetitions N an integer. In the above division, the unit read data amount may be used instead of the unit write data amount, or an average value of the unit write data amount and the unit read data amount may be used. In step 608, a value obtained by multiplying the unit write data amount recognized in step 602 by the number of repetitions N obtained in step 606 is set as the write data amount. In step 610, the write data amount (data amount N times the unit write data amount) obtained in step 608 is set as the unit write data amount for the buffer module 40 existing in the subsequent stage.

また、ステップ612では、ステップ602で認識した単位読出データ量にステップ606で求めた繰り返し回数Nを乗じた値が、画像1面分の画像データに相当するメモリ容量よりも小さいか否か判定する。判定が肯定された場合はステップ614へ移行し、読出データ量として、単位読出データ量に繰り返し回数Nを乗じた値を設定する。また、ステップ612の判定が否定された場合はステップ616へ移行し、読出データ量として、画像1面分の画像データに相当するメモリ容量を設定する。そしてステップ618では、前段に存在しているバッファモジュール40に対し、ステップ614又はステップ616で求めた読出データ量を単位読出データ量として設定し、画像処理モジュール初期化処理の完了をモジュール生成部44に通知して処理を終了する。   In step 612, it is determined whether or not the value obtained by multiplying the unit read data amount recognized in step 602 by the number of repetitions N obtained in step 606 is smaller than the memory capacity corresponding to the image data for one image. . If the determination is affirmative, the routine proceeds to step 614, where a value obtained by multiplying the unit read data amount by the number of repetitions N is set as the read data amount. If the determination in step 612 is negative, the process proceeds to step 616, and a memory capacity corresponding to image data for one image is set as the read data amount. In step 618, the read data amount obtained in step 614 or 616 is set as the unit read data amount for the buffer module 40 existing in the preceding stage, and the completion of the image processing module initialization processing is set as the module generation unit 44. To terminate the process.

先に説明した第1実施形態では、バッファモジュール40が、割当可能メモリ容量と画像1面分の画像データに相当するメモリ容量のうち小さい方の値を割当要求サイズとしていたが、本第2実施形態に係るバッファモジュール40は、単位書込データ量及び単位読出データ量に基づいて決定した単位バッファ領域のサイズを、割当要求サイズとしてそのまま設定している。但し、本第2実施形態でバッファモジュール40に通知される単位書込データ量は、実際には上述のように、本来の単位書込データ量(画像処理エンジン38Aから1回に出力される画像データ量)に繰り返し回数Nを乗じた値であり、バッファモジュール40に通知される単位読出データ量についても、実際には、本来の単位読出データ量(画像処理エンジン38Aによって1回に処理される画像データ量)に繰り返し回数Nを乗じた値であるので、本来の単位書込データ量及び単位読出データ量に対しておよそN倍の容量が割当要求サイズとして設定される。そして繰り返し回数Nは、割当可能メモリ容量を単位書込データ量等で除算することで求められている。   In the first embodiment described above, the buffer module 40 uses the smaller value of the allocatable memory capacity and the memory capacity corresponding to the image data for one image as the allocation request size. The buffer module 40 according to the embodiment sets the size of the unit buffer area determined based on the unit write data amount and the unit read data amount as the allocation request size. However, the unit write data amount notified to the buffer module 40 in the second embodiment is actually the original unit write data amount (the image output from the image processing engine 38A at a time as described above). The unit read data amount notified to the buffer module 40 is actually processed at a time by the original unit read data amount (by the image processing engine 38A). Since the image data amount is multiplied by the number of repetitions N, a capacity approximately N times the original unit write data amount and unit read data amount is set as the allocation request size. The number of repetitions N is obtained by dividing the allocatable memory capacity by the unit write data amount or the like.

これにより、本第2実施形態においても、メモリ14が比較的小容量で、バッファ40Aとして使用可能なメモリ領域の容量が限られていることで、処理管理部46に保持される割当可能メモリ容量として比較的小さい値が設定された場合、繰り返し回数Nが1又は1に近い小さな値となることで、個々のバッファモジュール40の割当要求サイズも比較的小さい値に設定され、個々のバッファモジュール40は、比較的小さい容量を単位として、バッファ40Aとして用いるメモリ領域の割当を要求する。従ってこの場合、リソース管理部46Bに対して個々のバッファモジュール40から高い頻度でメモリ領域の割当が要求されることで、オーバヘッドが増大して処理効率は低下するものの、個々のバッファモジュール40がバッファ40Aとして確保・保持しているメモリ領域の平均容量が小さくなることで、メモリ14の使用量が低減し、メモリ14を有効に利用することができる。   Thereby, also in the second embodiment, the memory 14 has a relatively small capacity and the capacity of the memory area that can be used as the buffer 40A is limited. When the relatively small value is set, the number N of repetitions becomes 1 or a small value close to 1, so that the allocation request size of each buffer module 40 is also set to a relatively small value. Requests allocation of a memory area to be used as the buffer 40A with a relatively small capacity as a unit. Therefore, in this case, the allocation of memory areas is frequently requested from the individual buffer modules 40 to the resource management unit 46B, which increases the overhead and decreases the processing efficiency. Since the average capacity of the memory area secured and held as 40A is reduced, the usage amount of the memory 14 is reduced and the memory 14 can be used effectively.

一方、メモリ14が比較的大容量で、バッファ40Aとして使用可能なメモリ領域も潤沢に設けられていることで、処理管理部46に保持される割当可能メモリ容量として比較的大きい値が設定された場合、繰り返し回数Nが比較的大きな値となることで、個々のバッファモジュール40の割当要求サイズも比較的大きい値に設定され、個々のバッファモジュール40は、比較的大きい容量を単位として、バッファ40Aとして用いるメモリ領域の割当を要求する。従ってこの場合、個々のバッファモジュール40がバッファ40Aとして確保・保持しているメモリ領域の平均容量が大きくなることで、メモリ14の使用量は増大するものの、リソース管理部46Bに対して個々のバッファモジュール40からメモリ領域の割当が要求される頻度が低下することで、オーバヘッドが削減され処理効率を向上させることができる。従って、本第2実施形態においてもメモリ14の使用量低減を優先するか画像処理の処理効率向上を優先するかを動作環境(メモリ14の容量等)に応じて切り替えることができる。   On the other hand, since the memory 14 has a relatively large capacity and plenty of memory areas that can be used as the buffer 40A, a relatively large value is set as the allocatable memory capacity held in the process management unit 46. In this case, since the number of repetitions N is a relatively large value, the allocation request size of each buffer module 40 is also set to a relatively large value, and each buffer module 40 uses the buffer 40A as a unit with a relatively large capacity. Requests the allocation of the memory area used as Therefore, in this case, although the amount of use of the memory 14 increases because the average capacity of the memory area secured and held by the individual buffer module 40 as the buffer 40A increases, the individual buffer module 40B uses the individual buffer. By reducing the frequency at which the memory area is requested from the module 40, the overhead can be reduced and the processing efficiency can be improved. Therefore, also in the second embodiment, it is possible to switch between giving priority to reducing the usage amount of the memory 14 and giving priority to improving the processing efficiency of image processing according to the operating environment (capacity of the memory 14 and the like).

次に本第2実施形態に係る画像処理モジュール制御処理について、図13を参照し、第1実施形態で説明した画像処理モジュール制御処理(図9)と異なる部分を説明する。本第2実施形態に係る画像処理モジュール制御処理では、ステップ226で第1実施形態と同様に前段のモジュールからデータを取得するが、前段のモジュールがバッファモジュール40である場合、当該バッファモジュール40へ事前に通知した単位読出データ量が、本来の単位読出データ量のN倍の値であるので、ステップ226においても、本来の単位読出データ量のN倍のデータ量の画像データが取得される。また、ステップ232では第1実施形態と同様に後段のモジュールに対してデータ出力領域を要求するが、後段のモジュールがバッファモジュール40である場合、当該バッファモジュール40へ事前に通知した単位書込データ量が、本来の単位書込データ量のN倍の値であるので、前記要求に基づき、本来の単位書込データ量のN倍のデータ量の画像データを書込可能な容量のデータ出力領域が確保される。   Next, the image processing module control processing according to the second embodiment will be described with reference to FIG. 13, and the difference from the image processing module control processing (FIG. 9) described in the first embodiment. In the image processing module control process according to the second embodiment, data is acquired from the previous module in step 226 as in the first embodiment. If the previous module is the buffer module 40, the process proceeds to the buffer module 40. Since the unit read data amount notified in advance is a value N times the original unit read data amount, image data having a data amount N times the original unit read data amount is also acquired in step 226. In step 232, as in the first embodiment, a data output area is requested to the succeeding module. If the succeeding module is the buffer module 40, the unit write data notified to the buffer module 40 in advance. Since the amount is N times the original unit write data amount, a data output area having a capacity capable of writing image data having a data amount N times the original unit write data amount based on the request. Is secured.

そして本第2実施形態に係る画像処理モジュール制御処理では、ステップ236で第1実施形態と同様に画像処理エンジン38Aによって画像処理を行わせ、画像処理エンジン38Aはステップ226で取得された画像データのうちの単位読出データ量分の画像データに対して所定の画像処理を行い、当該画像処理によって得られた単位書込データ量分の画像データをステップ232,234の処理によって確保されたデータ出力領域に書き込むが、次のステップ237では、画像処理エンジン38Aによる画像処理(ステップ236)が繰り返し回数Nだけ繰り返されたか否か判定する。そして、判定が否定された場合はステップ236へ戻り、ステップ237の判定が肯定される迄ステップ236,237を繰り返す。そして、ステップ237の判定が肯定されるとステップ238へ移行し、画像データの出力が完了したことを後段のモジュールに通知する。   In the image processing module control process according to the second embodiment, the image processing engine 38A causes the image processing engine 38A to perform image processing in the same manner as in the first embodiment in step 236, and the image processing engine 38A performs the processing of the image data acquired in step 226. A predetermined image processing is performed on the image data corresponding to the unit read data amount, and the image data corresponding to the unit write data amount obtained by the image processing is stored in the data output area secured by the processing in steps 232 and 234. In the next step 237, it is determined whether or not the image processing (step 236) by the image processing engine 38A has been repeated N times. If the determination is negative, the process returns to step 236, and steps 236 and 237 are repeated until the determination in step 237 is affirmed. If the determination in step 237 is affirmed, the process proceeds to step 238 to notify the subsequent module that the output of the image data has been completed.

これにより、画像処理モジュール38とその前段及び後段のバッファモジュール40との間では、画像処理モジュール38から通知された単位読出データ量又は単位書込データ量(本来の単位読出データ量又は単位書込データ量のN倍のデータ量)の画像データを単位として画像データが引き渡される一方、画像処理モジュール38の内部では、本来の単位読出データ量・単位書込データ量を単位として、画像処理エンジン38Aによる画像処理が順次行われることになる。   As a result, the unit read data amount or unit write data amount (original unit read data amount or unit write) notified from the image processing module 38 is transferred between the image processing module 38 and the preceding and subsequent buffer modules 40. On the other hand, the image data is delivered in units of image data having a data amount N times the data amount). On the other hand, in the image processing module 38, the image processing engine 38A is used in units of the original unit read data amount and unit write data amount. The image processing by is sequentially performed.

なお、第2実施形態では、画像処理モジュール38の制御手段としての機能が単一の制御部38Bによって実現される態様を説明したが、本発明はこれに限定されるものではなく、例として図14に示すように、制御部38Bを第1制御部38Bと第2制御部38Bに分離し、第1制御部38Bにおいて、第1実施形態で説明した制御部38Bと同様に、前段のモジュールから単位読出データ量ずつ画像データを読み出すと共に、画像データを単位書込データ量ずつ後段のモジュールへ出力するように構成する一方、第2制御部38Bを、繰り返し回数Nを演算し、第1制御部38Bから受け取った単位読出データ量のN倍の読出データ量を前段のバッファモジュール40へ設定し、前段のバッファモジュール40から画像データを読出データ量ずつ読み出し、読み出した画像データを仮想バッファ経由で単位読出データ量ずつ第1制御部38Bへ引き渡すと共に、第1制御部38Bから仮想バッファ経由で受け取った単位書込データ量のN倍の書込データ量を後段のバッファモジュール40へ設定し、第1制御部38Bから単位書込データ量ずつ出力される画像データをN回分蓄積した後に後段のバッファモジュール40へ出力するように構成してもよい。この態様では、第1制御部38Bと第2制御部38Bが協働することで画像処理モジュール38の制御手段としての機能が実現されることになるが、制御手段を第1制御部38Bと第2制御部38Bとに分離することで、第1制御部38Bに相当するプログラムについては、例えば単位読出データ量及び単位書込データ量が同一の画像処理モジュール38を単位として共通化する一方で、第2制御部38Bに相当するプログラムについては全ての画像処理モジュール38について共通化することができ、プログラムの開発負荷をより低減することができる。なお、上記態様は請求項4記載の発明に対応している。 In the second embodiment, the mode in which the function as the control unit of the image processing module 38 is realized by the single control unit 38B has been described. However, the present invention is not limited to this and is illustrated as an example. as shown in 14, the control unit 38B separates the first control unit 38B 1 to the second controller 38B 2, the first control unit 38B 1, similarly to the control unit 38B described in the first embodiment, front While the image data is read from the module in units of the unit read data amount and the image data is output to the subsequent module in units of the unit write data amount, the second control unit 38B 2 calculates the number of repetitions N, the read data of N times the unit read data amount received from the first control unit 38B 1 set to the front stage of the buffer module 40, image de from the preceding buffer module 40 Reads the data by reading the data volume, the read image data with passes to the first control unit 38B 1 by the unit read data amount via the virtual buffer, the unit write data amount received via virtual buffer from the first control unit 38B 1 the write data amount of N times set to the subsequent buffer module 40, and outputs the image data outputted from the first control unit 38B 1 by the unit write data amount to the subsequent buffer module 40 after N times accumulation You may comprise as follows. In this embodiment, although will be first a control unit 38B 1 functions as the control means of the image processing module 38 by the second controller 38B 2 cooperate is achieved, the control means first controller 38B 1 and by separating the second controller 38B 2, the programs corresponding to the first control unit 38B 1, for example, the common unit read data amount and the unit write data amount the same image processing module 38 as a unit while reduction may be about the program corresponding to the second control unit 38B 2 can be common for all of the image processing module 38, to further reduce the development load program. The above aspect corresponds to the invention described in claim 4.

また、上記では処理管理部46のワークフロー管理部46Aに保持される割当可能メモリ容量がメモリ14の総容量に応じて設定される態様を説明したが、これに限定されるものではなく、例えばメモリ14の総容量に加えてプログラムを実行するCPU12の処理能力(クロック周波数等)、或いは他のパラメータも考慮して割当可能メモリ容量が設定されるようにしてもよい。   In the above description, the mode in which the allocatable memory capacity held in the workflow management unit 46A of the process management unit 46 is set according to the total capacity of the memory 14 has been described. However, the present invention is not limited to this. The allocatable memory capacity may be set in consideration of the processing capacity (clock frequency, etc.) of the CPU 12 executing the program in addition to the total capacity of 14, or other parameters.

また、ワークフロー管理部46Aに保持される情報についても、上記の割当可能メモリ容量に限られるものではなく、利用者によって操作部18等を介して入力された個々のバッファモジュール40へのメモリ割当規則を表す情報(例えば個々のバッファモジュール40に割当てるメモリ領域の容量を、1ライン分/nライン分/画像1面分、等の選択肢の中から選択する情報)であってもよい。この場合、実際の割当可能メモリ容量はメモリ14の総容量等に応じて変化する可能性があり、保持されているメモリ割当規則を参照した際に、実際の割当可能メモリ容量が不定であればメモリ14の総容量等に基づいて割当可能メモリ容量を算出するようにすればよい。上記態様は請求項5記載の発明に対応している。   Also, the information held in the workflow management unit 46A is not limited to the above-mentioned allocatable memory capacity, and the rules for allocating memory to individual buffer modules 40 input by the user via the operation unit 18 or the like. (For example, information for selecting the capacity of the memory area allocated to each buffer module 40 from options such as one line / n lines / one image). In this case, the actual allocatable memory capacity may change according to the total capacity of the memory 14 and the like, and when the actual allocatable memory capacity is indeterminate when referring to the held memory allocation rule, The allocatable memory capacity may be calculated based on the total capacity of the memory 14 or the like. The above aspect corresponds to the invention described in claim 5.

また、上記では本発明に係る画像処理プログラムに相当する画像処理プログラム群34がコンピュータ10に予め記憶(インストール)されている態様を説明したが、本発明に係る画像処理プログラムは、CD−ROMやDVD−ROM等の記録媒体に記録されている形態で提供することも可能である。   Further, in the above description, the image processing program group 34 corresponding to the image processing program according to the present invention has been stored (installed) in the computer 10 in advance. However, the image processing program according to the present invention may be a CD-ROM, It is also possible to provide in a form recorded on a recording medium such as a DVD-ROM.

本実施形態に係るコンピュータ(画像処理装置)の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the computer (image processing apparatus) which concerns on this embodiment. 画像処理部の構成例を示すブロック図である。It is a block diagram which shows the structural example of an image process part. (A)は画像処理モジュール、(B)はバッファモジュールの概略構成及び実行される処理を各々示すブロック図である。(A) is an image processing module, and (B) is a block diagram showing a schematic configuration of a buffer module and processing to be executed. バッファモジュールのバッファ制御部によって実行されるバッファモジュール初期化処理の内容を示すフローチャートである。It is a flowchart which shows the content of the buffer module initialization process performed by the buffer control part of a buffer module. バッファモジュールのバッファ制御部によって実行されるデータ書込処理の内容を示すフローチャートである。It is a flowchart which shows the content of the data writing process performed by the buffer control part of a buffer module. 書込対象の画像データが複数の保管用単位バッファ領域に跨る場合の処理を説明する概略図である。It is the schematic explaining the process in case the image data of writing object straddles several storage unit buffer area | regions. バッファモジュールのバッファ制御部によって実行されるデータ読出処理の内容を示すフローチャートである。It is a flowchart which shows the content of the data reading process performed by the buffer control part of a buffer module. 読出対象の画像データが複数の保管用単位バッファ領域に跨っていた場合の処理を説明する概略図である。It is the schematic explaining the process in case the image data of read object straddles several storage unit buffer area | regions. 画像処理モジュールの制御部によって実行される画像処理モジュール制御処理の内容を示すフローチャートである。It is a flowchart which shows the content of the image processing module control process performed by the control part of an image processing module. 処理管理部によって実行される並列制御処理1〜4の内容を示すフローチャートである。It is a flowchart which shows the content of the parallel control processes 1-4 performed by a process management part. 画像処理部における画像処理の流れを説明する概略図である。It is the schematic explaining the flow of the image processing in an image process part. 第2実施形態に係る画像処理モジュールの制御部によって実行される画像処理モジュール初期化処理の内容を示すフローチャートである。It is a flowchart which shows the content of the image processing module initialization process performed by the control part of the image processing module which concerns on 2nd Embodiment. 第2実施形態に係る画像処理モジュールの制御部によって実行される画像処理モジュール制御処理の内容を示すフローチャートである。It is a flowchart which shows the content of the image processing module control process performed by the control part of the image processing module which concerns on 2nd Embodiment. 画像処理モジュールの他の構成を示すブロック図である。It is a block diagram which shows the other structure of an image processing module.

符号の説明Explanation of symbols

10 コンピュータ
14 メモリ
18 操作部
38 画像処理モジュール
38A 画像処理エンジン
38B 制御部
40 バッファモジュール
40A バッファ
40B バッファ制御部
46 処理管理部
46A ワークフロー管理部
50 画像処理部
DESCRIPTION OF SYMBOLS 10 Computer 14 Memory 18 Operation part 38 Image processing module 38A Image processing engine 38B Control part 40 Buffer module 40A Buffer 40B Buffer control part 46 Process management part 46A Workflow management part 50 Image processing part

Claims (7)

自モジュールの前段から画像データを取得し、取得した画像データに所定の画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する機能を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、バッファとして用いる記憶リソースが不足する毎に記憶リソースの割当を要求し、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させる処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部と、
前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段と、
個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段と、
を含み、
個々の前記バッファモジュールが、前記保持手段に記憶されている情報に基づいて、前記記憶リソース管理手段への記憶リソースの割当要求において前記記憶リソース管理手段に要求する記憶リソースの容量を切り替える制御手段を備えていることを特徴とする画像処理装置。
A plurality of functions having the function of acquiring image data from the previous stage of the own module, performing predetermined image processing on the acquired image data, and outputting the image data that has undergone the image processing or the processing result of the image processing to the subsequent stage of the own module Requests at least one of the preceding and following stages of the image processing module to allocate storage resources each time the storage resources used as a buffer are insufficient, and outputs the output from the module before the own module using the allocated storage resources as a buffer. Each module is connected to the pipeline so that the image data stored in the buffer is written into the buffer, and the buffer modules that perform the process of reading the image data stored in the buffer by the module subsequent to the module are connected. Images connected in a form or directed acyclic graph form And the processing section,
Storage resource management means for allocating a storage resource of the requested capacity to the requesting buffer module each time storage resource allocation is requested from the buffer module;
Information indicating the capacity of storage resources that can be allocated to individual buffer modules, or the rules for allocating storage resources to individual buffer modules that are set according to the capacity of storage resources that can be allocated to individual buffer modules Holding means for holding information;
Including
Control means for switching the capacity of the storage resource requested by the storage resource management means in response to the storage resource allocation request to the storage resource management means based on the information stored in the storage means by each of the buffer modules An image processing apparatus comprising:
個々の前記バッファモジュールの制御手段は、前記保持手段に記憶されている情報に基づき、個々のバッファモジュールに割当可能な記憶リソースの容量を認識し、認識した容量及び予め定められた上限容量のうちの小さい方を、前記記憶リソース管理手段への記憶リソースの割当要求において前記記憶リソース管理手段に要求する記憶リソースの容量として設定することを特徴とする請求項1記載の画像処理装置。   The control means of each of the buffer modules recognizes the capacity of the storage resource that can be allocated to each buffer module based on the information stored in the holding means, and among the recognized capacity and a predetermined upper limit capacity 2. The image processing apparatus according to claim 1, wherein the smaller one is set as a storage resource capacity requested to the storage resource management unit in a storage resource allocation request to the storage resource management unit. 画像データに対する画像処理を予め設定された単位処理データ量ずつ行う画像処理エンジン、及び、前記画像処理エンジンが画像処理を行う画像データを自モジュールの前段から取得すると共に、前記画像処理エンジンによる画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する制御手段を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させると共に、バッファとして用いる記憶リソースが不足する毎に、自モジュールの前段のモジュールによる1回の書き込みによって前記バッファに書き込まれる画像データ量、及び、自モジュールの後段のモジュールによる1回の読み出しによって前記バッファから読み出される画像データ量に応じた容量の記憶モジュールの割当を要求する処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部と、
前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段と、
個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段と、
を含み、
個々の前記画像処理モジュールの制御手段が、前記保持手段に記憶されている情報に基づいて画像処理の繰り返し回数Nを設定し、単位処理データ量にNを乗じた画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力を行うと共に、画像処理エンジンによる単位処理データ量ずつの画像処理をN回繰り返させることで、自モジュールの前段からの画像データに対する画像処理を行わせることを特徴とする画像処理装置。
An image processing engine that performs image processing on image data for each unit processing data amount that is set in advance, and image data that the image processing engine performs image processing from the previous stage of the own module, and image processing by the image processing engine The allocated storage resource is used as a buffer in at least one of the preceding stage and the succeeding stage of the plurality of image processing modules provided with control means for outputting the processed image data or the processing result of the image processing to the succeeding stage of the own module. Each time image data output from the module preceding the module is written to the buffer, the image data stored in the buffer is read by the module subsequent to the module, and the storage resource used as the buffer is insufficient Depends on the module before the module Processing for requesting allocation of a storage module having a capacity corresponding to the amount of image data written to the buffer by one writing and the amount of image data read from the buffer by one reading by a module subsequent to the own module An image processing unit configured by connecting individual modules in a pipeline form or a directed acyclic graph form so that the buffer modules are connected to each other;
Storage resource management means for allocating a storage resource of the requested capacity to the requesting buffer module each time storage resource allocation is requested from the buffer module;
Information indicating the capacity of storage resources that can be allocated to individual buffer modules, or the rules for allocating storage resources to individual buffer modules that are set according to the capacity of storage resources that can be allocated to individual buffer modules Holding means for holding information;
Including
The control means of each of the image processing modules sets the number N of image processing repetitions based on the information stored in the holding means, and automatically sets the unit image data amount by multiplying N by the unit data amount. Acquire image data from the previous stage of the module and output the image data to the subsequent stage of the module, and repeat the image processing for each unit processing data amount by the image processing engine N times, so that An image processing apparatus that performs image processing on image data.
個々の前記画像処理モジュールの制御手段は、前記画像処理エンジン、及び、前記画像処理エンジンが画像処理を行う画像データを単位処理データ量ずつ取得すると共に、前記画像処理エンジンによる画像処理を経た画像データ又は前記画像処理の処理結果を出力する第1制御手段を備えた画像処理モジュールに、前記保持手段に記憶されている情報に基づいて、画像処理の繰り返し回数Nを設定すると共に、前記単位処理データ量にNを乗じた画像データ量を単位として自モジュールの前段からの画像データを取得し、取得した画像データを前記単位処理データ量ずつ前記第1制御手段へ引き渡し、かつ、前記画像処理エンジンで画像処理が行われることで前記第1制御手段から出力される画像データ又は画像処理の処理結果をN回分蓄積した後に自モジュールの後段へ出力する第2制御部が追加され、前記第1制御部と前記第2制御部が協働することで実現されることを特徴とする請求項3記載の画像処理装置。   The control means of each of the image processing modules acquires the image processing engine and image data that the image processing engine performs image processing for each unit processing data amount, and image data that has undergone image processing by the image processing engine Alternatively, in the image processing module having the first control means for outputting the processing result of the image processing, the number N of image processing repetitions is set based on the information stored in the holding means, and the unit processing data The image data amount obtained by multiplying the amount by N as a unit is acquired as the unit, and the acquired image data is transferred to the first control means in increments of the unit processing data amount, and the image processing engine Image data output from the first control means or image processing results are stored N times by performing image processing. 4. The image processing apparatus according to claim 3, wherein a second control unit that outputs to a subsequent stage of the module after the second control unit is added and the first control unit and the second control unit cooperate with each other. . 前記個々のバッファモジュールへの記憶リソースの割当規則は利用者によって入力手段を介して入力され、前記保持手段は、前記入力手段を介して利用者によって入力された前記割当規則を表す情報を保持することを特徴とする請求項1又は請求項3記載の画像処理装置。   The allocation rule of the storage resource to the individual buffer module is input by the user through the input unit, and the holding unit holds information representing the allocation rule input by the user through the input unit. The image processing apparatus according to claim 1 or claim 3, wherein コンピュータを、
自モジュールの前段から画像データを取得し、取得した画像データに所定の画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する機能を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、バッファとして用いる記憶リソースが不足する毎に記憶リソースの割当を要求し、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させる処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部、
前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段、
及び、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段
として機能させ、
個々の前記バッファモジュールが、前記保持手段に記憶されている情報に基づいて、前記記憶リソース管理手段への記憶リソースの割当要求において前記記憶リソース管理手段に要求する記憶リソースの容量を切り替える制御手段を備えていることを特徴とする画像処理プログラム。
Computer
A plurality of functions having the function of acquiring image data from the previous stage of the own module, performing predetermined image processing on the acquired image data, and outputting the image data that has undergone the image processing or the processing result of the image processing to the subsequent stage of the own module Requests at least one of the preceding and following stages of the image processing module to allocate storage resources each time the storage resources used as a buffer are insufficient, and outputs the output from the module before the own module using the allocated storage resources as a buffer. Each module is connected to the pipeline so that the image data stored in the buffer is written into the buffer, and the buffer modules that perform the process of reading the image data stored in the buffer by the module subsequent to the module are connected. Images connected in a form or directed acyclic graph form Processing section,
A storage resource management means for allocating a storage resource having a requested capacity to a requesting buffer module each time storage resource allocation is requested from the buffer module;
Information indicating the capacity of storage resources that can be allocated to individual buffer modules, or rules for allocating storage resources to individual buffer modules that are set according to the capacity of storage resources that can be allocated to individual buffer modules Function as a holding means to hold information representing
Control means for switching the capacity of the storage resource requested by the storage resource management means in response to the storage resource allocation request to the storage resource management means based on the information stored in the storage means by each of the buffer modules An image processing program comprising:
コンピュータを、
画像データに対する画像処理を予め設定された単位処理データ量ずつ行う画像処理エンジン、及び、前記画像処理エンジンが画像処理を行う画像データを自モジュールの前段から取得すると共に、前記画像処理エンジンによる画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する制御手段を備えた複数の画像処理モジュールの前段及び後段の少なくとも一方に、割当された記憶リソースをバッファとして用いて、自モジュールの前段のモジュールから出力される画像データを前記バッファに書き込ませ、前記バッファに記憶されている画像データを自モジュールの後段のモジュールによって読み出させると共に、バッファとして用いる記憶リソースが不足する毎に、自モジュールの前段のモジュールによる1回の書き込みによって前記バッファに書き込まれる画像データ量、及び、自モジュールの後段のモジュールによる1回の読み出しによって前記バッファから読み出される画像データ量に応じた容量の記憶モジュールの割当を要求する処理を行うバッファモジュールが各々連結されるように、個々のモジュールがパイプライン形態又は有向非循環グラフ形態で連結されて構成された画像処理部、
前記バッファモジュールから記憶リソースの割当が要求される毎に、要求された容量の記憶リソースを要求元のバッファモジュールに割り当てる記憶リソース管理手段、
及び、個々のバッファモジュールに割当可能な記憶リソースの容量を表す情報、又は、個々のバッファモジュールに割当可能な記憶リソースの容量に応じて設定される、個々のバッファモジュールへの記憶リソースの割当規則を表す情報を保持する保持手段
として機能させ、
個々の前記画像処理モジュールの制御手段が、前記保持手段に記憶されている情報に基づいて画像処理の繰り返し回数Nを設定し、単位処理データ量にNを乗じた画像データ量を単位として、自モジュールの前段からの画像データの取得及び自モジュールの後段への画像データの出力を行うと共に、画像処理エンジンによる単位処理データ量ずつの画像処理をN回繰り返させることで、自モジュールの前段からの画像データに対する画像処理を行わせることを特徴とする画像処理プログラム。
Computer
An image processing engine that performs image processing on image data for each unit processing data amount that is set in advance, and image data that the image processing engine performs image processing from the previous stage of the own module, and image processing by the image processing engine The allocated storage resource is used as a buffer in at least one of the preceding stage and the succeeding stage of the plurality of image processing modules provided with control means for outputting the processed image data or the processing result of the image processing to the succeeding stage of the own module. Each time image data output from the module preceding the module is written to the buffer, the image data stored in the buffer is read by the module subsequent to the module, and the storage resource used as the buffer is insufficient Depends on the module before the module Processing for requesting allocation of a storage module having a capacity corresponding to the amount of image data written to the buffer by one writing and the amount of image data read from the buffer by one reading by a module subsequent to the own module An image processing unit configured such that individual modules are connected in a pipeline form or a directed acyclic graph form so that the buffer modules are connected to each other,
A storage resource management means for allocating a storage resource having a requested capacity to a requesting buffer module each time storage resource allocation is requested from the buffer module;
Information indicating the capacity of storage resources that can be allocated to individual buffer modules, or rules for allocating storage resources to individual buffer modules that are set according to the capacity of storage resources that can be allocated to individual buffer modules Function as a holding means to hold information representing
The control means of each of the image processing modules sets the number N of image processing repetitions based on the information stored in the holding means, and automatically sets the unit image data amount by multiplying N by the unit data amount. Acquire image data from the previous stage of the module and output the image data to the subsequent stage of the module, and repeat the image processing for each unit processing data amount by the image processing engine N times, so that An image processing program for performing image processing on image data.
JP2006323640A 2006-11-30 2006-11-30 Image processor and program Pending JP2008139968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006323640A JP2008139968A (en) 2006-11-30 2006-11-30 Image processor and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006323640A JP2008139968A (en) 2006-11-30 2006-11-30 Image processor and program

Publications (1)

Publication Number Publication Date
JP2008139968A true JP2008139968A (en) 2008-06-19

Family

ID=39601389

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006323640A Pending JP2008139968A (en) 2006-11-30 2006-11-30 Image processor and program

Country Status (1)

Country Link
JP (1) JP2008139968A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9064324B2 (en) 2012-03-30 2015-06-23 Fujifilm Corporation Image processing device, image processing method, and recording medium on which an image processing program is recorded

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9064324B2 (en) 2012-03-30 2015-06-23 Fujifilm Corporation Image processing device, image processing method, and recording medium on which an image processing program is recorded

Similar Documents

Publication Publication Date Title
JP4694266B2 (en) Image processing apparatus, method, and program
JP4694270B2 (en) Image processing apparatus, method, and program
JP4694267B2 (en) Image processing apparatus, method, and program
JP4694268B2 (en) Image processing apparatus, method, and program
JP4795138B2 (en) Image processing apparatus and program
JP4979287B2 (en) Image processing apparatus and program
JP4694264B2 (en) Image processing apparatus, method, and program
JP4694265B2 (en) Image processing apparatus, method, and program
JP5046801B2 (en) Image processing apparatus and program
JP2007287085A (en) Program and device for processing images
JP2008140046A (en) Image processor, image processing program
JP2008009696A (en) Image processor and program
JP4694269B2 (en) Image processing apparatus, method, and program
JP4619868B2 (en) Image processing apparatus, method, and program
US20070247466A1 (en) Image processing apparatus and program
JP2007323393A (en) Image processor and program
JP4762865B2 (en) Image processing apparatus and image processing program
JP2008139968A (en) Image processor and program
JP5440129B2 (en) Image processing apparatus, image forming apparatus, and image processing program
JP2009053829A (en) Information processor and information processing program
JP2008140170A (en) Image processor and program
JP5047139B2 (en) Image processing apparatus and program
JP2008140006A (en) Image processing apparatus, and program
JP4920725B2 (en) Image processing apparatus and program
JP2008140042A (en) Image processor and program