JP2009054001A - Image processor and program - Google Patents

Image processor and program Download PDF

Info

Publication number
JP2009054001A
JP2009054001A JP2007221117A JP2007221117A JP2009054001A JP 2009054001 A JP2009054001 A JP 2009054001A JP 2007221117 A JP2007221117 A JP 2007221117A JP 2007221117 A JP2007221117 A JP 2007221117A JP 2009054001 A JP2009054001 A JP 2009054001A
Authority
JP
Japan
Prior art keywords
image processing
module
image
unit
processing
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
JP2007221117A
Other languages
Japanese (ja)
Inventor
Kazuyuki Itagaki
和幸 板垣
Takashi Igarashi
貴 五十嵐
Takashi Nagao
隆 長尾
Yoichi Isaka
洋一 井坂
Yukio Kumazawa
幸夫 熊澤
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 JP2007221117A priority Critical patent/JP2009054001A/en
Publication of JP2009054001A publication Critical patent/JP2009054001A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To equalize processing loads of image processing even when the processing loads of an image processing part are concentrated on a certain image processing module. <P>SOLUTION: A processing construction part connects a buffer module at least before or after each of one or more image processing modules, constructs an image processing part (refer to (A)) wherein respective modules are connected in a form of a pipeline or a directed acyclic graph, and then divides the image processing part into a plurality of groups so that the processing loads of respective groups are equalized as much as possible (refer to (B)). The processing construction part determines whether a group having the maximum processing load can be further divided or not, and when the group can be divided, divides the group having the maximum processing load into a plurality of partial image processing parts each of which includes an image segmentation module 39 for segmenting data of areas different from each other from the image data and an image processing module, forms an image composition module 41 after of the partial image processing parts (refer to (C)), and threads for each program of partial image processing parts are generated. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

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

入力された画像データに対して画像処理を行う画像処理装置や、画像を取扱可能なDTP(デスクトップ・パブリッシング)システム、入力された画像データが表す画像を記録材料に記録するプリントシステム等では、入力された画像データに対して拡大・縮小、回転、アフィン変換、色変換、フィルタ処理、画像合成等の各種の画像処理が行われる。これらの装置やシステムにおいて、例えば色空間や1画素当たりのビット数が異なる様々な画像データが入力されたり、画像処理の内容や手順・パラメータ等が様々に変更される場合には、実行する画像処理を柔軟に変更可能な構成が必要となる。このような要求を満たすために、特許文献1には、画像処理モジュールの前段及び後段の少なくとも一方にバッファモジュールが連結されるように、個々のモジュールをパイプライン形態又はDAG(Directed Acyclic Graph:有向非循環グラフ)形態で連結して成る画像処理部を構築して画像処理を行う技術が提案されている。   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 apparatuses and systems, for example, when various image data having different color spaces and the number of bits per pixel are input, or when image processing contents, procedures, parameters, and the like are variously changed, an image to be executed A configuration that can change processing flexibly is required. In order to satisfy such a requirement, Patent Document 1 discloses that each module is connected in a pipeline form or a DAG (Directed Acyclic Graph: Existence) so that a buffer module is connected to at least one of the front and rear stages of the image processing module. There has been proposed a technique for constructing an image processing unit connected in the form of a non-circular graph) and performing image processing.

また、上記に関連して特許文献2には、直前に実行された処理集合に含まれる各単位処理(例えば各色毎のハーフトーン処理等)の実行結果に基づいて、次の処理集合の単位処理の見積り負荷を見積り、見積り負荷に基づいて、所定の種類の単位処理を、第1の処理グループと、第1の処理グループよりも見積り負荷が小さい第2の処理グループに分類し、第1の処理グループに含まれる単位処理を処理部に割り当て、第1の処理グループに含まれる単位処理の割り当てを完了した後、第2の処理グループに含まれる単位処理を処理部に割り当てると共に、第2の処理グループの単位処理を割り当てる際に、既に割り当てられた単位処理の見積り負荷の合計が最も少ない最小負荷処理部に、まだ処理部に割り当てられていない単位処理のうちの一つを割り当てることで、画像処理を並列処理で実行する際の各処理部間の負荷のばらつきを少なくする技術が提案されている。
特開2006−338498号公報 特開2005−250565号公報
Further, in relation to the above, Patent Document 2 discloses that the unit processing of the next processing set is based on the execution result of each unit processing (for example, halftone processing for each color) included in the processing set executed immediately before. The estimated load is estimated, and based on the estimated load, a predetermined type of unit process is classified into a first process group and a second process group having a smaller estimated load than the first process group. After allocating the unit processes included in the processing group to the processing unit and completing the allocation of the unit processes included in the first processing group, the unit processing included in the second processing group is allocated to the processing unit. When allocating a unit process of a process group, the minimum load processing part with the smallest total estimated load of unit processes already assigned to the unit process that has not yet been assigned to the processing part By assigning one technique for reducing the variation of load among the processing units when executing image processing by parallel processing it has been proposed.
JP 2006-338498 A JP 2005-250565 A

特許文献1に記載の技術により画像処理部を構築して画像処理を行う場合、実現すべき画像処理の内容や入力される画像データのサイズ等によっては、画像処理部を構成する個々の画像処理モジュール毎の処理負荷(処理コストともいう)が大きくばらつくことがある。この画像処理モジュール毎の処理負荷のばらつきは、特に、個々の画像処理モジュールにおける画像処理を並列に行わせる並列処理方式で画像処理部を動作させる場合に、処理効率の大幅な低下、ひいては処理時間の増大を招くという問題がある。   When image processing is performed by constructing an image processing unit using the technique described in Patent Document 1, depending on the content of image processing to be realized, the size of input image data, and the like, individual image processing constituting the image processing unit The processing load (also referred to as processing cost) for each module may vary greatly. This variation in the processing load for each image processing module is particularly significant when the image processing unit is operated in a parallel processing system in which image processing in individual image processing modules is performed in parallel. There is a problem of inviting an increase in

上記の問題に対し、各処理部間の負荷のばらつきを少なくすることを目的として特許文献2に記載の技術を適用することが考えられるが、この技術は、或る色についての画像処理の実行結果から別の色についての同一の画像処理における処理負荷を見積るために、画像データに対する画像処理の実行タイミングを各色単位でずらす(各色毎の画像処理を逐次実行する)必要があり、全ての色についての処理結果が揃うまでに時間が掛るという問題がある。特許文献1に記載の技術のように各モジュールをパイプライン形態や有向非循環グラフ形態で連結して画像処理を行う場合、画像の一部分であってもよいが全色分の画像データが前段側から出力されないと後段側で画像処理を行うことができないことも多く(例えば後段側で色変換を行う等の場合)、画像処理部における個々の画像処理モジュールの処理負荷が偏っている場合に特許文献2に記載の技術を適用したとしても、処理効率の向上・処理時間の短縮が望めない状況は頻繁に生じ得る。   For the above problem, it is conceivable to apply the technique described in Patent Document 2 for the purpose of reducing the variation in the load between the processing units. This technique, however, executes image processing for a certain color. In order to estimate the processing load in the same image processing for different colors from the results, it is necessary to shift the execution timing of the image processing for the image data by each color unit (sequentially execute the image processing for each color). There is a problem that it takes time to complete the processing results for. When image processing is performed by connecting modules in a pipeline form or a directed acyclic graph form as in the technique described in Patent Document 1, the image data for all colors may be a part of the image, but the previous stage In many cases, image processing cannot be performed on the subsequent stage unless it is output from the side (for example, when color conversion is performed on the subsequent stage), and the processing load of individual image processing modules in the image processing unit is biased Even when the technique described in Patent Document 2 is applied, a situation in which improvement in processing efficiency and reduction in processing time cannot be expected can frequently occur.

なお、画像処理部における処理負荷の偏りが処理効率や処理時間に悪影響を及ぼすことは、個々の画像処理モジュールにおける画像処理を並列に行わせる並列処理方式で画像処理部を動作させる場合に限られるものではなく、常に単一の画像処理モジュールで画像処理を行わせると共に、画像処理を行わせる画像処理モジュールを逐次切り替える逐次処理方式で画像処理部を動作させる場合にも、処理負荷が大きい画像処理モジュールにおける画像処理時間が長時間化することで、同様に、処理負荷の偏りが処理時間に悪影響を及ぼすことになる。   Note that the bias in processing load in the image processing unit adversely affects processing efficiency and processing time is limited to the case where the image processing unit is operated in a parallel processing system in which image processing in individual image processing modules is performed in parallel. Image processing with a large processing load even when the image processing unit is operated by a sequential processing method in which image processing is always performed by a single image processing module and the image processing module for performing image processing is sequentially switched. By increasing the image processing time in the module, similarly, uneven processing load adversely affects the processing time.

本発明は上記事実を考慮して成されたもので、画像処理部における処理負荷が一部の画像処理モジュールに偏っている場合にも、処理負荷の平準化が可能な画像処理装置及び画像処理プログラムを得ることが目的である。   The present invention has been made in consideration of the above facts, and an image processing apparatus and an image processing capable of leveling the processing load even when the processing load in the image processing unit is biased to some image processing modules. The purpose is to get a program.

上記目的を達成するために請求項1記載の発明に係る画像処理装置は、自モジュールの前段から取得した画像データに対して互いに異なる画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する複数種の画像処理モジュール、前段のモジュールから出力される画像データをバッファに書き込ませると共に前記バッファに記憶されている画像データを後段のモジュールによって読み出させるバッファモジュール、前段のモジュールから出力される画像データを当該画像データが表す画像上の互いに異なる領域に対応する複数個のデータに分割し分割した個々のデータを後段の複数のモジュールのうちの互いに異なるモジュールへ供給する分配供給部、及び、前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成する画像合成部のプログラムを各々記憶する記憶手段と、前記記憶手段に記憶されているプログラムにより、前記複数種の画像処理モジュールの中から選択した1つ以上の画像処理モジュールの各々の前段及び後段の少なくとも一方に前記バッファモジュールを連結し、各モジュールをパイプライン形態又は有向非循環グラフ形態で連結すると共に、そのうちの少なくとも一部分を多重に設け、多重に設けた個々の処理部を、前記分配供給部を介して多重化部分の前段と各々連結しかつ前記画像合成部を介して前記多重化部分の後段と各々連結した画像処理部を構築する構築手段と、前記構築手段によって構築された画像処理部によって画像処理を行わせる制御手段と、を含んで構成されている。   In order to achieve the above object, an image processing apparatus according to the first aspect of the present invention performs image processing different from each other on image data acquired from a previous stage of its own module, and the image data that has undergone the image processing or the image processing The image processing module outputs the results of the above to the subsequent stage of the own module, the image data output from the previous module is written to the buffer, and the image data stored in the buffer is read by the subsequent module The image data output from the buffer module and the previous module is divided into a plurality of data corresponding to different areas on the image represented by the image data, and the divided individual data are different from each other in the subsequent modules. Each of the distribution supply unit supplying the module and the plurality of modules in the previous stage A storage unit that stores each program of an image composition unit that combines the acquired data as image data of a single image, and a program stored in the storage unit, selected from the plurality of types of image processing modules The buffer module is connected to at least one of the preceding stage and the subsequent stage of each of the one or more image processing modules, and the modules are connected in a pipeline form or a directed acyclic graph form, and at least a part of them is provided in multiple. An image processing unit is constructed in which individual processing units provided in multiplex are connected to the preceding stage of the multiplexed part via the distribution supply unit and connected to the subsequent stage of the multiplexed part via the image composition unit, respectively. And a control unit that causes the image processing unit constructed by the construction unit to perform image processing. To have.

請求項1記載の発明では、自モジュールの前段から取得した画像データに対して互いに異なる画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する複数種の画像処理モジュール、前段のモジュールから出力される画像データをバッファに書き込ませると共に前記バッファに記憶されている画像データを後段のモジュールによって読み出させるバッファモジュール、前段のモジュールから出力される画像データを当該画像データが表す画像上の互いに異なる領域に対応する複数個のデータに分割し分割した個々のデータを後段の複数のモジュールのうちの互いに異なるモジュールへ供給する分配供給部、及び、前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成する画像合成部のプログラムが記憶手段に各々記憶されている。   In the first aspect of the present invention, a plurality of image processings are performed on the image data acquired from the previous stage of the own module, and the image data subjected to the image processing or the processing result of the image processing is output to the subsequent stage of the own module. Various image processing modules, a buffer module that causes image data output from the preceding module to be written to the buffer and that causes the image data stored in the buffer to be read by the subsequent module, and image data that is output from the preceding module Is divided into a plurality of data corresponding to different regions on the image represented by the image data, and the divided supply unit supplies each divided data to different modules among the plurality of modules in the subsequent stage, and Image data of a single image obtained from each of multiple modules Image synthesizing unit programs are respectively stored in the storage means for then synthesized.

また、請求項1記載の発明に係る構築手段は、記憶手段に記憶されているプログラムにより、複数種の画像処理モジュールの中から選択した1つ以上の画像処理モジュールの各々の前段及び後段の少なくとも一方にバッファモジュールを連結し、各モジュールをパイプライン形態又は有向非循環グラフ形態で連結すると共に、そのうちの少なくとも一部分を多重に設け、多重に設けた個々の処理部を、分配供給部を介して多重化部分の前段と各々連結しかつ画像合成部を介して前記多重化部分の後段と各々連結した画像処理部を構築する。そして、請求項1記載の発明に係る制御手段は、構築手段によって構築された画像処理部によって画像処理を行わせる。   The construction means according to the first aspect of the invention provides at least a front stage and a rear stage of each of one or more image processing modules selected from a plurality of types of image processing modules by a program stored in the storage means. A buffer module is connected to one side, and each module is connected in a pipeline form or a directed acyclic graph form, and at least a part of them is provided in multiple, and each of the multiple processing units provided via a distribution supply unit Thus, an image processing unit connected to the preceding stage of the multiplexed portion and connected to the subsequent stage of the multiplexed portion via the image synthesis unit is constructed. The control unit according to the first aspect of the invention causes the image processing unit constructed by the construction unit to perform image processing.

上記のように、請求項1記載の発明では、構築手段によって構築される画像処理部が、画像処理部の少なくとも一部分が多重に設けられ、多重に設けられた個々の処理部が、分配供給部を介して多重化部分の前段と各々連結され、かつ画像合成部を介して多重化部分の後段と各々連結された構成とされているので、多重化部分に対応する個々の処理部には、各々の前段に設けられた分配供給部により、画像データを分割することで得られる、画像上の互いに異なる領域に対応する複数個のデータのうちの互いに異なるデータが供給され、供給されたデータに対して個々の処理部で同一の画像処理が行われた後に、個々の処理部における画像処理を経て個々の処理部から出力されたデータが、画像合成部によって単一の画像の画像データとして合成される。   As described above, according to the first aspect of the present invention, the image processing unit constructed by the construction unit includes at least a part of the image processing unit in a multiplex, and the individual processing units provided in the multiplex include the distribution supply unit. Are connected to the preceding stage of the multiplexed part through the image synthesizing unit and are connected to the subsequent stage of the multiplexed part via the image composition unit. Different distribution data of a plurality of data corresponding to different areas on the image obtained by dividing the image data by the distribution supply unit provided in each preceding stage is supplied to the supplied data. On the other hand, after the same image processing is performed in each processing unit, data output from each processing unit through image processing in each processing unit is converted into image data of a single image by the image composition unit. It is made.

このように、請求項1記載の発明では、多重化部分に対応する個々の処理部の処理負荷が、多重化部分に対応する処理部の数をNとすると、多重化を行わない場合(処理部を多重に設けない、すなわちN=1の場合)の1/Nになる。また、特許文献2に記載の技術では画像処理を各色毎に分けて行うので、上記のNに相当する値が一定で変更不可であるが、請求項1記載の発明では画像上の互いに異なる領域に対応するデータへ画像データを分割するので、処理部の数Nを任意に設定可能である。従って、請求項1記載の発明によれば、画像処理部における処理負荷が一部の画像処理モジュールに偏っている場合にも、例えば画像処理部のうち、処理負荷が他の画像処理モジュールよりも大きい特定の画像処理モジュールを含む部分を多重化対象とする等により、処理負荷を平準化することが可能となる。   Thus, according to the first aspect of the present invention, when the processing load of each processing unit corresponding to the multiplexed portion is N, the number of the processing units corresponding to the multiplexed portion is N (processing is not performed). 1 / N of the case where multiple parts are not provided, that is, N = 1. In the technique described in Patent Document 2, since image processing is performed for each color, the value corresponding to the above N is constant and cannot be changed. However, in the invention described in Claim 1, different areas on the image are used. Since the image data is divided into data corresponding to, the number N of processing units can be arbitrarily set. Therefore, according to the first aspect of the present invention, even when the processing load in the image processing unit is biased toward some image processing modules, for example, among the image processing units, the processing load is higher than that of other image processing modules. For example, the processing load can be leveled by setting a portion including a large specific image processing module as a multiplexing target.

また請求項1記載の発明は、画像データを画像上の互いに異なる領域に対応する複数個のデータに分割し、分割した複数個のデータを互いに異なる処理部へ供給するものであり、特許文献2に記載の技術のように、分割した個々のデータに対する画像処理の実行タイミングをずらす必要がないので、例えば請求項6に記載したように、構築手段によって構築された画像処理部のうち、少なくとも多重化部分に対応する個々の処理部のプログラムをコンピュータによって各々並列に実行させるように制御手段を構成することで、多重化部分に対応する個々の処理部で並列に画像処理を行わせることも可能であり、個々の処理部における画像処理を並列に実行することで、処理効率の向上・処理時間の短縮を実現することができる。   The invention described in claim 1 divides image data into a plurality of data corresponding to different regions on the image, and supplies the divided plurality of data to different processing units. Since it is not necessary to shift the execution timing of the image processing for each divided piece of data as in the technique described in (5), for example, as described in (6), at least multiple of the image processing units constructed by the construction unit By configuring the control means so that the programs of the individual processing units corresponding to the multiplex portion are executed in parallel by the computer, it is also possible to cause the individual processing units corresponding to the multiplexed portion to perform image processing in parallel Thus, it is possible to improve processing efficiency and shorten processing time by executing image processing in individual processing units in parallel.

なお、請求項1記載の発明において、画像処理モジュールにおける画像処理の内容によっては多重化が困難な場合がある(例えばアフィン変換や画像の回転等の幾何変換処理は、画像合成部における合成処理が非常に複雑となるため多重化に適していない)ことを考慮すると、構築手段は、例えば請求項2に記載したように、画像処理部を構成する画像処理モジュールのうち、多重化対象であることを表す情報が付加されているか、又は、所定のテーブルに多重化対象として登録されている画像処理モジュールを含む部分を、多重化対象の部分として選択するように構成することが好ましい。これにより、記憶手段にプログラムが記憶されている複数種の画像処理モジュールのうち、多重化に適した画像処理モジュール(例えば処理負荷が比較的大きくかつ多重化に適した画像処理を行う画像処理モジュール)が多重化対象となるように、上記情報の付加や所定のテーブルへの登録を行っておくことで、画像処理部のうち多重化対象の部分を構築手段が選択することを、上記情報の付加の有無や所定のテーブルへの登録の有無に基づいて、高精度かつ簡易な処理によって実現することができる。   According to the first aspect of the invention, multiplexing may be difficult depending on the contents of the image processing in the image processing module (for example, geometric transformation processing such as affine transformation and image rotation is performed by synthesis processing in the image synthesis unit. Considering that it is very complicated and is not suitable for multiplexing), the construction means should be a multiplexing target among the image processing modules constituting the image processing unit as described in claim 2, for example. It is preferable that a part including an image processing module registered as a multiplexing target in a predetermined table is selected as a part to be multiplexed. As a result, among a plurality of types of image processing modules whose programs are stored in the storage means, an image processing module suitable for multiplexing (for example, an image processing module having a relatively large processing load and performing image processing suitable for multiplexing) ) Is added to the information and registered in a predetermined table so that the construction means selects the part to be multiplexed from the image processing unit. Based on the presence / absence of addition and the presence / absence of registration in a predetermined table, it can be realized by highly accurate and simple processing.

また、画像処理モジュールにおける処理負荷は、画像処理を行う画像のサイズ(画像データのデータ量)によって大きく左右されることを考慮すると、請求項1又は請求項2記載の発明において、構築手段は、例えば請求項3に記載したように、画像処理部によって画像処理が行われる画像のサイズが閾値以上の場合にのみ、画像処理部のうちの少なくとも一部分の多重化を行うように構成してもよい。画像処理を行う画像のサイズが閾値未満の場合、画像処理部の処理負荷が比較的小さいので、分配供給部や画像合成部を設ける分だけ処理効率が低下することになるが、請求項3記載の発明では、上記のような場合に多重化を行わないので、多重化を行うか否かが画像処理部の処理負荷に応じて切り替わることになり、画像処理部の処理負荷が比較的小さい場合に処理効率が低下することを防止することができる。   Further, in consideration of the fact that the processing load in the image processing module greatly depends on the size of the image to be subjected to image processing (data amount of image data), in the invention according to claim 1 or 2, For example, as described in claim 3, at least a part of the image processing unit may be multiplexed only when the size of the image to be processed by the image processing unit is equal to or larger than a threshold value. . When the size of the image to be subjected to image processing is less than the threshold, the processing load of the image processing unit is relatively small, so that the processing efficiency is reduced by providing the distribution supply unit and the image composition unit. In the present invention, since multiplexing is not performed in the above case, whether to perform multiplexing is switched according to the processing load of the image processing unit, and the processing load of the image processing unit is relatively small It is possible to prevent the processing efficiency from being lowered.

なお、請求項3記載の発明において、画像処理が行われる画像処理のサイズの変化に対し、多重化部分に対応する処理部の数(多重化の数)を段階的に変化させる処理も併せて行うようにしてもよい。この場合、多重化部分に対応する処理部の数(多重化の数)を画像処理部の処理負荷に応じて最適化することが可能となる。   In the invention according to claim 3, the process of changing the number of processing units corresponding to the multiplexed portion (the number of multiplexing) stepwise with respect to the change in the size of the image processing in which the image processing is performed. You may make it perform. In this case, the number of processing units corresponding to the multiplexed portion (the number of multiplexing) can be optimized according to the processing load of the image processing unit.

また、請求項1記載の発明において、構築手段は、例えば請求項4に記載したように、各モジュールをパイプライン形態又は有向非循環グラフ形態で連結した仮の画像処理部を複数の部分に分けたときの個々の部分毎に処理負荷を演算し、演算した個々の部分毎の処理負荷に基づいて複数の部分の中から多重化対象の部分を選択するように構成してもよい。上記のように、個々の部分毎に処理負荷を演算して多重化対象の部分を選択することで、多重化対象の部分を高精度に選択することができる。   Further, in the invention described in claim 1, the construction means, as described in claim 4, for example, includes a provisional image processing unit in which each module is connected in a pipeline form or a directed acyclic graph form in a plurality of parts. A processing load may be calculated for each individual part when divided, and a part to be multiplexed may be selected from a plurality of parts based on the calculated processing load for each part. As described above, by calculating the processing load for each part and selecting the part to be multiplexed, the part to be multiplexed can be selected with high accuracy.

また、請求項4記載の発明において、構築手段は、例えば請求項5に記載したように、仮の画像処理部の個々の部分毎に演算した処理負荷に基づき、複数の部分のうちの多重化部分に対応する個々の処理部及び前記複数の部分のうちの個々の非多重化部分の各々の処理負荷が均一の状態に近づくように、個々の部分毎に多重化の有無及び多重化の数を設定し、複数の部分のうち多重化有りに設定した部分に、設定した多重化の数と同数の処理部を設けるように構成することが好ましい。これにより、多重化部分に対応する個々の処理部及び個々の非多重化部分の各々の処理負荷を精度良く均一の状態に近づけることができる。   In the invention according to claim 4, the construction means, as described in claim 5, for example, multiplexes a plurality of parts based on the processing load calculated for each part of the provisional image processing part. The presence / absence of multiplexing and the number of multiplexing for each part so that the processing load of each individual processing unit corresponding to each part and each non-multiplexed part of the plurality of parts approaches a uniform state It is preferable to provide a configuration in which the same number of processing units as the set number of multiplexing units are provided in the part of the plurality of parts set to have multiplexing. Thereby, each processing load corresponding to the multiplexed portion and each processing load of each non-multiplexed portion can be brought close to a uniform state with high accuracy.

また、請求項1〜請求項5の何れかに記載の発明において、制御手段は、例えば請求項6に記載したように、構築手段によって構築された画像処理部のうち、少なくとも多重化部分に対応する個々の処理部のプログラムをコンピュータによって各々並列に実行させるように構成してもよい。また、請求項5又は請求項6記載の発明において、制御手段は、例えば請求項7に記載したように、複数の部分のうちの多重化部分に対応する個々の処理部のプログラム及び複数の部分のうちの個々の非多重化部分のプログラムをコンピュータによって各々並列に実行させるように構成してもよい。   Further, in the invention according to any one of claims 1 to 5, the control means corresponds to at least a multiplexed part among the image processing parts constructed by the construction means as described in claim 6, for example. The programs of the individual processing units may be configured to be executed in parallel by a computer. Further, in the invention according to claim 5 or claim 6, the control means, as described in claim 7, for example, the program of each processing unit corresponding to the multiplexed part of the plurality of parts and the plurality of parts The programs of the individual non-multiplexed portions may be configured to be executed in parallel by a computer.

ところで、分配供給部は、画像データを複数個のデータに分割し、分割した個々のデータを後段の複数のモジュールのうちの互いに異なるモジュールへ供給するので、例えば供給対象の画像データをバッファに記憶しておき、後段のモジュールによってバッファからデータを読み出させることで後段のモジュールへデータを供給するように分配供給部を構成した場合、後段の複数のモジュールによるバッファへのアクセスが競合する可能性がある。また、画像合成部についても、前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成するので、前段のモジュールによってバッファにデータを書き込ませることでデータを取得するように画像合成部を構成した場合、前段の複数のモジュールによるバッファへのアクセスが競合する可能性がある。   By the way, the distribution supply unit divides the image data into a plurality of data, and supplies the divided individual data to different modules among the plurality of modules at the subsequent stage. For example, the image data to be supplied is stored in a buffer. If the distribution supply unit is configured to supply data to the subsequent module by reading the data from the buffer by the subsequent module, there is a possibility that access to the buffer by multiple modules in the subsequent stage may compete. There is. The image composition unit also composes data acquired from a plurality of modules in the previous stage as image data of a single image, so that the image is obtained by writing data to the buffer by the module in the previous stage. When the combining unit is configured, there is a possibility that access to the buffer by a plurality of modules in the previous stage conflicts.

上記を考慮すると、請求項6又は請求項7記載の発明において、例えば請求項8に記載したように、バッファモジュールのプログラムとして、バッファへのアクセスに対する排他制御を行う第1のバッファモジュール及びバッファへのアクセスに対する排他制御を行わない第2のバッファモジュールのプログラムを記憶手段に各々記憶し、構築手段を、画像処理部の構築にあたり、少なくとも分配供給部の一部として機能するバッファモジュール及び画像合成部の一部として機能するバッファモジュールとして第1のバッファモジュールを各々選択し、それ以外のバッファモジュールとして第2のバッファモジュールを選択するように構成してもよい。これにより、上述したバッファへのアクセスの競合によって処理がロックする等の不都合が生ずることを防止することができる。   In consideration of the above, in the invention according to claim 6 or claim 7, as described in claim 8, for example, as a buffer module program, to the first buffer module and the buffer that perform exclusive control for access to the buffer A buffer module and an image composition unit that function as at least a part of a distribution supply unit in constructing the image processing unit, respectively, in the storage unit. The first buffer module may be selected as the buffer module that functions as a part of the first buffer module, and the second buffer module may be selected as the other buffer module. As a result, it is possible to prevent inconveniences such as the processing being locked due to the above-described contention of access to the buffer.

また、第1のバッファモジュールにおける排他制御は、バッファモジュールのプログラムを実行するコンピュータにオーバヘッド(余分な処理負荷)として加わるが、請求項8記載の発明では、第1のバッファモジュールを選択したバッファモジュール以外のバッファモジュールとしては、バッファへのアクセスに対する排他制御を行わない第2のバッファモジュールを選択するので、画像処理部を構成するバッファモジュールのうち第1のバッファモジュールが選択されるバッファモジュールの数が抑制され、第1のバッファモジュールにおける排他制御によるオーバヘッドが累積し多大な処理負荷としてコンピュータに加わることを防止することができる。なお、前述した請求項7のように、多重化部分に対応する個々の処理部のプログラム及び個々の非多重化部分のプログラムをコンピュータによって各々並列に実行させる場合には、複数の部分の各々の境界に相当する位置に位置しているバッファモジュールについても、バッファへのアクセスの競合が発生する可能性があるので、第1のバッファモジュールを用いることが望ましい。   The exclusive control in the first buffer module is added as an overhead (excess processing load) to the computer executing the program of the buffer module. In the invention according to claim 8, the buffer module in which the first buffer module is selected. Since the second buffer module that does not perform exclusive control on access to the buffer is selected as the buffer module other than the number of the buffer modules, the number of buffer modules from which the first buffer module is selected among the buffer modules constituting the image processing unit And the overhead due to the exclusive control in the first buffer module is accumulated and can be prevented from being added to the computer as a large processing load. In addition, as in the above-described claim 7, in the case where the programs of the individual processing units corresponding to the multiplexed parts and the programs of the individual non-multiplexed parts are each executed in parallel by the computer, Also for the buffer module located at the position corresponding to the boundary, there is a possibility that contention for access to the buffer may occur, so it is desirable to use the first buffer module.

請求項9記載の発明に係る画像処理プログラムは、自モジュールの前段から取得した画像データに対して互いに異なる画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する複数種の画像処理モジュール、前段のモジュールから出力される画像データをバッファに書き込ませると共に前記バッファに記憶されている画像データを後段のモジュールによって読み出させるバッファモジュール、前段のモジュールから出力される画像データを当該画像データが表す画像上の互いに異なる領域に対応する複数個のデータに分割し分割した個々のデータを後段の複数のモジュールのうちの互いに異なるモジュールへ供給する分配供給部、及び、前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成する画像合成部のプログラムを各々記憶する記憶手段と接続されたコンピュータを、前記記憶手段に記憶されている各種モジュールのプログラムに基づき、前記複数種の画像処理モジュールの中から選択した1つ以上の画像処理モジュールの各々の前段及び後段の少なくとも一方に前記バッファモジュールが連結され、各モジュールがパイプライン形態又は有向非循環グラフ形態で連結されると共に、そのうちの少なくとも一部分のモジュールが多重化され、当該多重化部分の前段に前記分配モジュール、後段に前記合成モジュールが各々挿入された画像処理部を構築する構築手段、及び、前記構築手段によって構築された画像処理部によって画像処理を行わせる制御手段として機能させる。   The image processing program according to the invention described in claim 9 performs different image processing on the image data acquired from the previous stage of the own module, and the image data subjected to the image processing or the processing result of the image processing is stored in the own module. From a plurality of types of image processing modules to be output to the subsequent stage, a buffer module for causing the image data output from the previous stage module to be written to the buffer and reading out the image data stored in the buffer by the subsequent stage module, from the previous stage module A distribution supply unit that divides the output image data into a plurality of data corresponding to different regions on the image represented by the image data, and supplies the divided data to different modules among the plurality of modules at the subsequent stage , And the data obtained from each module in the previous stage A computer connected to storage means for storing each program of an image composition unit for compositing as image data of one image, based on the programs of the various modules stored in the storage means, The buffer module is connected to at least one of a front stage and a rear stage of each of one or more image processing modules selected from among the modules, and each module is connected in a pipeline form or a directed acyclic graph form, and at least Construction means for constructing an image processing section in which a part of the modules are multiplexed and the distribution module is inserted in the preceding stage of the multiplexed part, and the synthesis module is inserted in the subsequent stage, and the image processing section constructed by the construction means To function as control means for performing image processing.

請求項9記載の発明に係る画像処理プログラムは、上記の記憶手段と接続されたコンピュータを、上記の構築手段及び制御手段として機能させるためのプログラムであるので、コンピュータが請求項9記載の発明に係る画像処理プログラムを実行することで、コンピュータが請求項1に記載の画像処理装置として機能することになり、請求項1記載の発明と同様に、画像処理部における処理負荷が一部の画像処理モジュールに偏っている場合にも、処理負荷の平準化が可能となる。   The image processing program according to the ninth aspect of the invention is a program for causing a computer connected to the storage means to function as the construction means and the control means. By executing the image processing program, the computer functions as the image processing apparatus according to claim 1, and the processing load in the image processing unit is a part of the image processing as in the invention according to claim 1. Even when the modules are biased, the processing load can be leveled.

以上説明したように本発明は、複数種の画像処理モジュールの中から選択した1つ以上の画像処理モジュールの各々の前段及び後段の少なくとも一方にバッファモジュールを連結し、各モジュールをパイプライン形態又は有向非循環グラフ形態で連結すると共に、そのうちの少なくとも一部分を多重に設け、多重に設けた個々の処理部を、前段のモジュールからの画像データを画像上の互いに異なる領域に対応する複数個のデータに分割し分割した個々のデータを後段の互いに異なるモジュールへ供給する分配供給部を介して多重化部分の前段と各々連結し、かつ前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成する画像合成部を介して多重化部分の後段と各々連結した画像処理部を構築するようにしたので、画像処理部における処理負荷が一部の画像処理モジュールに偏っている場合にも、処理負荷の平準化が可能となる、という優れた効果を有する。   As described above, in the present invention, a buffer module is connected to at least one of the preceding stage and the succeeding stage of each of one or more image processing modules selected from a plurality of types of image processing modules, and each module is configured in a pipeline form or Connected in the form of a directed acyclic graph, and at least a part of them are provided in multiple, and each of the multiple processing units is connected to a plurality of image data from the previous module corresponding to different regions on the image. Each of the divided data is connected to the preceding stage of the multiplexed portion via a distribution supply unit that supplies the divided individual data to different modules in the subsequent stage, and the data acquired from the plurality of modules in the previous stage are each converted into a single image An image processing unit that is connected to the subsequent stage of the multiplexed part via the image composition unit that composes as image data In the case where the processing load in the image processing section is biased in a part of the image processing modules, it is possible to level the processing load, has an excellent effect that.

以下、図面を参照して本発明の実施形態の一例を詳細に説明する。図1には、本発明に係る画像処理装置として機能することが可能なコンピュータ10が示されている。なお、このコンピュータ10は、複写機、プリンタ、ファクシミリ装置、これらの機能を兼ね備えた複合機、スキャナ、写真プリンタ等のように内部で画像処理を行う必要のある任意の画像取扱機器に組み込まれていてもよいし、パーソナル・コンピュータ(PC)等の独立したコンピュータであってもよく、更にPDA(Personal Digital Assistant)や携帯電話機等の携帯機器に組み込まれたコンピュータであってもよい。   Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings. 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 an 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 only needs to output 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. Various programs of applications 32 (indicated as application program group 32 in FIG. 1) to be processed 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 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 each image processing module constituting the image processing unit 50 is 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 performs input / output of image data with the module and controls 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 set to 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, type, and the like of the image processing modules 38 registered in the module library 36 in the image processing program group 34. 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のプログラムを「バッファモジュール」と表記して示している)。   Further, as shown in FIG. 3B as an example, the individual buffer modules 40 constituting the image processing unit 50 are configured to input / output image data between the buffer 40A and modules before and after 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")

また本実施形態では、バッファモジュール40のバッファ40Aに対して複数の画像処理モジュール38が同時にアクセスする可能性があることを考慮し、バッファ40Aへのアクセスに対して排他制御を行う、排他制御機能付きのバッファモジュール40(請求項8に記載の第1のバッファモジュールに相当)と、排他制御機能無しのバッファモジュール40(請求項8に記載の第2のバッファモジュールに相当)が各々用意され、モジュールライブラリ36にはそれぞれのバッファモジュール40のプログラムが各々登録されている。   In the present embodiment, in consideration of the possibility that a plurality of image processing modules 38 may access the buffer 40A of the buffer module 40 at the same time, an exclusive control function that performs exclusive control on access to the buffer 40A. Provided buffer module 40 (corresponding to the first buffer module according to claim 8) and buffer module 40 without exclusive control function (corresponding to the second buffer module according to claim 8), respectively, are prepared, In the module library 36, the programs of the respective buffer modules 40 are registered.

更に、本実施形態では画像処理部50のうち処理負荷が最大のグループ(ホットスポット)を更に分割(多重化)する場合(詳細は後述)に備えて、前段のモジュールに保持されている画像データから予め設定された画像領域のデータを切り出して出力する画像切出モジュールと、前段の複数のモジュールから各々データを取得し、取得したデータを単一の画像の画像データとして合成する画像合成モジュールのプログラムも各々記憶されている。   Further, in the present embodiment, the image data stored in the module in the previous stage is prepared for the case of further dividing (multiplexing) a group (hot spot) having the maximum processing load in the image processing unit 50 (details will be described later). An image cutout module that cuts out and outputs data of a preset image area from the image, and an image composition module that obtains data from a plurality of modules in the previous stage and combines the obtained data as image data of a single image Each program is also stored.

また、アプリケーション32からの指示に従って画像処理部50を構築する処理構築部42は、図1に示すように複数種のモジュール生成部44から構成されている。複数種のモジュール生成部44は互いに異なる画像処理に対応しており、アプリケーション32によって起動されることで、対応する画像処理を実現するための画像処理モジュール38及びバッファモジュール40から成るモジュール群を生成する処理を行う。なお、図1ではモジュール生成部44の一例として、モジュールライブラリ36に登録されている個々の画像処理モジュール38が実行する画像処理の種類に対応するモジュール生成部44を示しているが、個々のモジュール生成部44に対応する画像処理は、複数種の画像処理モジュール38によって実現される画像処理(例えばスキュー角検知処理と画像回転処理から成るスキュー補正処理)であってもよい。必要とされる画像処理が複数種の画像処理を組み合わせた処理である場合、アプリケーション32は複数種の画像処理の何れかに対応するモジュール生成部44を順次起動する。これにより、アプリケーション32によって順次起動されたモジュール生成部44により、必要とされる画像処理を行う画像処理部50が構築されることになる。   In addition, 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, 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 as an example of the module generation unit 44. 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.

次に本実施形態の作用を説明する。画像処理プログラム群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 to 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 on the display unit 16 as a list, For example, the execution target process may be selected by the user.

上記のように、何らかの画像処理を行う必要のある状況になったことを検知すると、アプリケーション32は、まず画像処理対象の画像データを供給する画像データ供給部22の種別を認識し、認識した種別がバッファ領域(メモリ14の一部領域)であった場合には、画像データ供給部22として指定されたバッファ領域を既に確保されたバッファ40Aとしてバッファ制御部40Bに認識させるパラメータを設定し、バッファ制御部40Bのプログラムを実行するスレッド(プロセス又はオブジェクトでもよい:以下同様)を生成する(バッファ制御部40Bを生成する)ことで、指定されたバッファ領域を含むバッファモジュール40(画像データ供給部22として機能するバッファモジュール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 (partial area of the memory 14), a parameter for causing the buffer control unit 40B to recognize the buffer area designated as the image data supply unit 22 as an already secured buffer 40A is set, and the buffer A buffer module 40 (image data supply unit 22) including a designated buffer area is generated by generating a thread (which may be a process or an object; the same shall apply hereinafter) that executes a program of the control unit 40B (generates the buffer control unit 40B). As a buffer module 40).

続いてアプリケーション32は、上記と同様に、画像処理を行った画像データの出力先としての画像出力部24の種別を認識し、認識した種別がバッファ領域(メモリ14の一部領域)であった場合は、画像出力部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 the output destination of the image data subjected to image processing, and the recognized type is the buffer area (partial area of the memory 14). In this case, 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 as information in association with the type of job that can be instructed by the user. Can be realized by reading out 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 (generates a thread for executing the program of the module generation unit 44) based on the type and execution order of the image processing determined above. Input module identification information for identifying an input module for inputting image data to the module group as information necessary for generating the module group by the module generation unit 44 for the activated module generation unit 44, and the module group Output module identification information for identifying an output module that outputs image data, input image attribute information that represents an attribute of input image data input to the module group, and a corresponding module that notifies parameters of image processing to be executed Instruct the generation of a 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. As 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 the module generation unit 44 generates and sets it 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 can be instructed by the user, and information corresponding to the type of job instructed to be executed is read out. As a result, the application 32 may recognize it, or the user may specify it.

一方、モジュール生成部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 the input image data is found to be 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を生成する。   If it is determined that the generation target image processing module 38 needs to be generated, it is determined whether the buffer module 40 is required 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 case other than the above, 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.

続いて、前段のモジュール(例えばバッファモジュール40)の情報、後段のバッファモジュール40の情報(後段にバッファモジュール40を生成した画像処理モジュール38のみ)、画像処理モジュール38に入力される入力画像データの属性、処理パラメータを与えて、モジュールライブラリ36に登録されており、画像処理モジュール38として利用可能な複数の候補モジュールの中から、先に取得した入力画像データの属性、及び、画像処理モジュール38で実行すべき処理パラメータに合致する画像処理モジュール38を選択・生成(画像処理エンジン38A及び制御部38Bのプログラムを実行するスレッドを生成)する。   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).

例えばモジュール生成部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 specified as the color space of the output image data by the processing parameter, 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 of reducing 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が構築される。なお、上記処理によって構築された画像処理部50は請求項4,5に記載の「仮の画像処理部」に対応している。   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. The image processing unit 50 constructed by the above processing corresponds to the “temporary image processing unit” described in claims 4 and 5.

処理構築部42は本発明に係る構築手段(より詳しくは請求項2〜請求項4に記載の構築手段)に対応しており、上記のようにして画像処理部50を構築すると、構築した画像処理部50に対して図4に示す画像処理部分割処理を行う。この画像処理部分割処理では、まずステップ100において、画像処理部50を何個のグループに分割するかを表すグループ数Nを決定する。グループ数Nとしては、例えばコンピュータ10に設けられている演算リソース(例えばCPUコアやDSP(Digital Signal Processor)等のように演算を並列に実行可能なリソース)の数を適用することができる。演算リソースの数はOSが提供する関数等を用いて取得することができる。また、グループ数Nとして、コンピュータ10に設けられている演算リソースの数を単に用いることに代えて、演算リソースの数を取得した後に、個々の演算リソースにおける使用率を更に取得し、使用率が閾値以下の演算リソースの数をグループ数Nとして用いるようにしてもよい。また、グループ数N=1であった場合には、次のステップ102以降の処理をスキップし画像処理部分割処理を終了することが望ましい。   The processing construction unit 42 corresponds to the construction unit according to the present invention (more specifically, the construction unit described in claims 2 to 4). When the image processing unit 50 is constructed as described above, the constructed image is obtained. The image processing unit division processing shown in FIG. 4 is performed on the processing unit 50. In this image processing section dividing process, first, in step 100, the number N of groups representing how many groups the image processing section 50 is divided into is determined. As the number of groups N, for example, the number of computation resources provided in the computer 10 (for example, resources that can execute computations in parallel, such as a CPU core or a DSP (Digital Signal Processor)) can be applied. The number of computing resources can be obtained using a function provided by the OS. Further, instead of simply using the number of computing resources provided in the computer 10 as the number of groups N, after obtaining the number of computing resources, the usage rate in each computing resource is further obtained. You may make it use the number of the calculation resources below a threshold value as the number N of groups. If the number of groups is N = 1, it is desirable to skip the processing after the next step 102 and end the image processing section division processing.

次のステップ102では、ステップ100で決定したグループ数Nに基づき、先に構築した画像処理部50をN個のグループへ分割する。画像処理部50の分割には幾つかの方法がある。第1の分割方法は、画像処理部50における画像処理モジュールの数Mとして画像処理部50における画像処理モジュール38の総数を用い、上記の画像処理モジュールの数Mをグループ数Nで除算し、剰余が生ずる場合は商に対して切り捨て等の端数処理を行うことで、1グループ当りの画像処理モジュール38の数Lを求め、画像処理部50を先頭から順にスキャンし、画像処理モジュール38がL個出現する毎にL個目の画像処理モジュール38までを1個のグループとしてグループ化すると共に、画像処理モジュール38の数の計数値を0に戻すことで、画像処理部50をN個のグループに分割する方法である。なお、画像処理部50を構成する画像処理モジュール38のうち、1面分の画像データが揃わないと画像処理を開始できない画像処理モジュール38(画像の回転等の画像処理を行う画像処理モジュール38)の数を認識し、画像処理モジュールの数Mとして、画像処理部50における画像処理モジュール38の総数から上記で認識した画像処理モジュール38の数を減算した値を用いてもよい。第1の分割方法は処理が簡単になるという利点を有する。   In the next step 102, based on the number N of groups determined in step 100, the previously constructed image processing unit 50 is divided into N groups. There are several methods for dividing the image processing unit 50. The first division method uses the total number of image processing modules 38 in the image processing unit 50 as the number M of image processing modules in the image processing unit 50, divides the number M of the above image processing modules by the number N of groups, and generates a remainder. Is generated, the fraction processing such as truncation is performed on the quotient to obtain the number L of image processing modules 38 per group, the image processing unit 50 is scanned in order from the top, and L image processing modules 38 are obtained. Each time it appears, up to the L-th image processing module 38 is grouped as one group, and the count value of the number of image processing modules 38 is reset to 0, so that the image processing unit 50 is divided into N groups. It is a method of dividing. Of the image processing modules 38 constituting the image processing unit 50, the image processing module 38 (image processing module 38 that performs image processing such as image rotation) cannot start image processing unless image data for one surface is prepared. As the number M of image processing modules, a value obtained by subtracting the number of recognized image processing modules 38 from the total number of image processing modules 38 in the image processing unit 50 may be used. The first division method has an advantage that the processing becomes simple.

また、第2の分割方法は、各グループの処理負荷(ここでは処理負荷の一例としてCPU処理時間を用いる)が均等となるように分割する方法である。すなわち、まず画像処理部50を構成する個々の画像処理モジュール38の処理負荷(CPU処理時間)を各々予測する。ここで、各種の画像処理モジュール38のうち、画像サイズや処理パラメータの変化に拘わらずCPU処理時間が大きく変化しない画像処理を行う画像処理モジュール38については、予め固定的に設定したCPU処理時間を取得することで、CPU処理時間を予測することができる。また、画像サイズや処理パラメータの変化に対してCPU処理時間が大きく変化する画像処理を行う画像処理モジュール38については、画像サイズや処理パラメータの変化とCPU処理時間との関係を予測式等の形態で予め設定しておき、当該予測式を取得し画像サイズや処理パラメータに応じたCPU処理時間を演算することで、CPU処理時間の予測を行うことができる。   Further, the second division method is a method of dividing so that the processing load of each group (here, CPU processing time is used as an example of the processing load) is equal. That is, first, the processing load (CPU processing time) of each image processing module 38 constituting the image processing unit 50 is predicted. Here, among the various image processing modules 38, for the image processing module 38 that performs image processing in which the CPU processing time does not change greatly regardless of changes in the image size and processing parameters, the CPU processing time set in advance is fixed. By acquiring, the CPU processing time can be predicted. In addition, for the image processing module 38 that performs image processing in which the CPU processing time changes greatly with respect to changes in the image size and processing parameters, the relationship between the change in the image size and processing parameters and the CPU processing time is in a form such as a prediction formula The CPU processing time can be predicted by obtaining the prediction formula in advance and calculating the CPU processing time according to the image size and processing parameters.

次に、画像処理部50を構成する個々の画像処理モジュール38のCPU処理時間の総和を演算し、演算したCPU処理時間の総和をグループ数Nで除算し、演算結果(1グループ当りのCPU処理時間の平均値)を閾値Thに設定する。そして、画像処理モジュール38のCPU処理時間を画像処理部50の先頭から順に積算しながらCPU処理時間の積算値を閾値Thと比較し、CPU処理時間の積算値が閾値Th以上となる毎に、積算値が閾値Th以上となった画像処理モジュール38までを1個のグループとしてグループ化すると共に、CPU処理時間の積算値を0に戻すことで、画像処理部50をN個のグループに分割する。第2の分割方法は、第1の分割方法と比較して処理は若干複雑になるものの、各グループの処理負荷をなるべく均等にすることができるので、より好ましい。   Next, the sum of the CPU processing times of the individual image processing modules 38 constituting the image processing unit 50 is calculated, the calculated sum of the CPU processing times is divided by the number of groups N, and the calculation result (CPU processing per group) The average value of time) is set to the threshold Th. Then, while integrating the CPU processing time of the image processing module 38 in order from the top of the image processing unit 50, the integrated value of the CPU processing time is compared with the threshold value Th, and each time the integrated value of the CPU processing time becomes equal to or greater than the threshold value Th, The image processing module 38 whose integrated value is equal to or greater than the threshold Th is grouped as one group, and the integrated value of the CPU processing time is returned to 0, thereby dividing the image processing unit 50 into N groups. . The second division method is more preferable because the processing load of each group can be made as uniform as possible, although the processing is slightly more complicated than the first division method.

なお、画像処理部50をN個のグループに分割する際の分割方法は上記方法に限られるものではなく、他の分割方法(例えば第2の分割方法において、j個目の画像処理モジュールのCPU処理時間を積算値に加算した段階で積算値が閾値Th以上となった場合に、当該積算値と閾値Thの偏差Aを、j個目の画像処理モジュールのCPU処理時間を加算する前の積算値と閾値Thの偏差Bと比較し、偏差Aが小さければj個目の画像処理モジュールの後段をグループの境界とし、偏差Bが小さければj個目の画像処理モジュールの前段をグループの境界とする等の分割方法)を用いてもよい。   Note that the division method when dividing the image processing unit 50 into N groups is not limited to the above method, and other division methods (for example, the CPU of the j-th image processing module in the second division method). If the integrated value becomes equal to or greater than the threshold Th at the stage where the processing time is added to the integrated value, the difference A between the integrated value and the threshold Th is integrated before adding the CPU processing time of the jth image processing module. When the deviation A is small, the subsequent stage of the j-th image processing module is used as the group boundary. When the deviation B is small, the previous stage of the j-th image processing module is used as the group boundary. A dividing method) may be used.

以上のようにして画像処理部50をN個のグループに分割すると、次のステップ104では、各グループの境界に位置しているバッファモジュール40を排他制御機能付きのバッファモジュール40に置き換える。これにより、当初構築された画像処理部50が、例として図5(A)に示すように画像処理モジュールM1〜M4及びバッファモジュールB1〜B3が交互に連結された構成であり、当該構成の画像処理部50が、上述した画像処理部50の分割により、画像処理モジュールM1〜M3から成るグループAと、画像処理モジュールM4から成るグループBに分割された場合には、図5(B)に示すように、グループAとグループBの境界に位置しているバッファモジュールB3が排他制御機能付きのバッファモジュールに置き換わることになる。   When the image processing unit 50 is divided into N groups as described above, in the next step 104, the buffer module 40 located at the boundary of each group is replaced with the buffer module 40 with the exclusive control function. As a result, the image processing unit 50 originally constructed has a configuration in which the image processing modules M1 to M4 and the buffer modules B1 to B3 are alternately connected as shown in FIG. 5A as an example. When the processing unit 50 is divided into the group A composed of the image processing modules M1 to M3 and the group B composed of the image processing module M4 by the division of the image processing unit 50 described above, it is shown in FIG. Thus, the buffer module B3 located at the boundary between the group A and the group B is replaced with a buffer module with an exclusive control function.

次のステップ106では、画像処理部50の各グループの処理負荷として、画像処理モジュール38のCPU処理時間を各グループ毎に積算した値を取得する。またステップ108では、ステップ106で取得した各グループの処理負荷に基づいて、処理負荷が最大のグループ(本実施形態ではこれを「ホットスポット」という)を判定する。そしてステップ110では、ステップ108で判定したホットスポットを複数の部分画像処理部に分割(多重化)することが適当か否か判定する。   In the next step 106, a value obtained by integrating the CPU processing time of the image processing module 38 for each group is acquired as the processing load of each group of the image processing unit 50. Further, in step 108, based on the processing load of each group acquired in step 106, a group having the maximum processing load (in the present embodiment, this is referred to as “hot spot”) is determined. In step 110, it is determined whether it is appropriate to divide (multiplex) the hot spot determined in step 108 into a plurality of partial image processing units.

図5(B)には、画像処理部50の個々の画像処理モジュール38におけるCPU処理時間の一例を示す。この例ではCPU処理時間が画像処理モジュールM4に大きく偏っている(画像処理モジュールM4のCPU処理時間が他の画像処理モジュールM1〜M3のCPU処理時間の積算値よりも大幅に大きい)ため、画像処理部50を画像処理モジュールM1〜M3から成るグループAと画像処理モジュールM4から成るグループBに分割しても、グループ毎の処理負荷(CPU処理時間)は大きく相違している。このような場合、本実施形態では処理負荷が大きいグループ(ホットスポット)に対し、画像中の互いに異なる領域のデータを画像データから切り出し、切り出したデータに対して同一の画像処理を行う複数の部分画像処理部に分割(多重化)する処理を行う。   FIG. 5B shows an example of the CPU processing time in each image processing module 38 of the image processing unit 50. In this example, the CPU processing time is largely biased toward the image processing module M4 (the CPU processing time of the image processing module M4 is significantly larger than the integrated value of the CPU processing times of the other image processing modules M1 to M3). Even if the processing unit 50 is divided into the group A composed of the image processing modules M1 to M3 and the group B composed of the image processing module M4, the processing load (CPU processing time) for each group is greatly different. In such a case, in this embodiment, for a group (hot spot) with a large processing load, data of different regions in the image are cut out from the image data, and a plurality of portions that perform the same image processing on the cut out data A process of dividing (multiplexing) into the image processing unit is performed.

但し、複数の部分画像処理部へのホットスポットの分割(多重化)を行った場合、個々の部分画像処理部での処理を経たデータは画像合成モジュールによって単一の画像として合成されることになるが、ホットスポットで行われる画像処理の内容によっては画像合成モジュールにおける画像合成処理が非常に複雑となるため、複数の部分画像処理部へ分割(多重化)することが望ましくない場合がある(例えばホットスポットの画像処理モジュール38でアフィン変換や画像の回転等の幾何変換処理が行われる等の場合)。また、画像サイズが比較的小さい場合には、グループ毎の処理負荷に偏りがあったとしてもホットスポットの処理負荷自体が小さく(CPU処理時間がさほど長くはなく)、複数の部分画像処理部への分割(多重化)を行うことで、却って処理効率が低下する可能性もある。このため本実施形態では、ステップ110の判定(ホットスポットを複数の部分画像処理部に分割(多重化)することが適当か否かの判定)を、以下の判定を順に行うことで実現している。   However, when hot spots are divided (multiplexed) into a plurality of partial image processing units, the data processed by the individual partial image processing units is synthesized as a single image by the image synthesis module. However, depending on the content of the image processing performed at the hot spot, the image composition processing in the image composition module becomes very complicated, and therefore it may not be desirable to divide (multiplex) the image into a plurality of partial image processing units ( For example, when the hot spot image processing module 38 performs geometric transformation processing such as affine transformation or image rotation). When the image size is relatively small, even if there is a bias in the processing load for each group, the processing load of the hot spot itself is small (the CPU processing time is not so long), and a plurality of partial image processing units are transferred. By dividing (multiplexing), there is a possibility that the processing efficiency is lowered. Therefore, in the present embodiment, the determination in step 110 (determination as to whether or not it is appropriate to divide (multiplex) the hot spot into a plurality of partial image processing units) is realized by sequentially performing the following determinations. Yes.

すなわち、本実施形態では、画像処理プログラム群34のモジュールライブラリ36に登録されている個々の画像処理モジュール38のプログラムに、分割(多重化)の可否を表す分割可否フラグが各々付加されている。この分割可否フラグは、複数の部分画像処理部への分割に適していない画像処理モジュール38には0が、その他の画像処理モジュール38には1が設定されている。ステップ110では、まずホットスポットの画像処理モジュール38に付加されている分割可否フラグが1か否か判定する(第1の判定)。第1の判定が否定された場合はホットスポットを分割することは適当でないと判断できるので、ステップ110の判定が否定される。これにより、分割に適していない画像処理を行う画像処理モジュール38が複数の部分画像処理部へ分割されることを防止できる。   In other words, in the present embodiment, a division availability flag indicating whether division (multiplexing) is possible is added to the program of each image processing module 38 registered in the module library 36 of the image processing program group 34. This division possibility flag is set to 0 for the image processing module 38 that is not suitable for division into a plurality of partial image processing units, and set to 1 for the other image processing modules 38. In step 110, first, it is determined whether or not the division possibility flag added to the hot spot image processing module 38 is 1 (first determination). If the first determination is negative, it can be determined that it is not appropriate to divide the hot spot, so the determination in step 110 is negative. Accordingly, it is possible to prevent the image processing module 38 that performs image processing that is not suitable for division from being divided into a plurality of partial image processing units.

なお、上記の分割可否フラグを付加しておくことに代えて、複数の部分画像処理部への分割に適していない画像処理モジュール38の情報を所定のテーブルに登録しておき、上記の第1の判定を、ホットスポットの画像処理モジュール38の情報が所定のテーブルに未登録か否かを判定することで行うようにしてもよい。また、分割可否フラグと所定のテーブルを併用し、分割可否フラグは固定的に設定しておく一方で所定のテーブルはユーザが更新可能としておき、ホットスポットの画像処理モジュール38に付加されている分割可否フラグが1か否か判定し、この判定が肯定された場合は、ホットスポットの画像処理モジュール38の情報が所定のテーブルに未登録か否かを判定するようにしてもよい。この態様では、複数の部分画像処理部への分割が禁止される画像処理モジュール38をユーザが任意に設定することが可能となる。上述した第1の判定は請求項2記載の発明に対応している。   Instead of adding the above-described division possibility flag, information on the image processing module 38 that is not suitable for division into a plurality of partial image processing units is registered in a predetermined table, and the first This determination may be performed by determining whether the information of the image processing module 38 of the hot spot is not registered in a predetermined table. Further, the division availability flag and a predetermined table are used in combination, and the division availability flag is fixedly set, while the predetermined table is made updatable by the user, and the division added to the image processing module 38 of the hot spot. It is determined whether the availability flag is 1, and if this determination is affirmative, it may be determined whether the information of the image processing module 38 of the hot spot is not registered in a predetermined table. In this aspect, the user can arbitrarily set the image processing module 38 that is prohibited from being divided into a plurality of partial image processing units. The first determination described above corresponds to the invention described in claim 2.

また、前述の第1の判定が肯定された場合、ホットスポットに入力される画像(データ)のサイズが閾値以上か否か判定する(第2の判定)。第2の判定が否定された場合もホットスポットを分割することは適当でないと判断できるので、ステップ110の判定が否定される。これにより、ホットスポットの画像処理モジュール38を複数の部分画像処理部へ分割することで、却って処理効率が低下してしまうことを防止できる。この第2の判定は請求項3記載の発明に対応している。   If the first determination described above is affirmed, it is determined whether or not the size of the image (data) input to the hot spot is equal to or larger than a threshold (second determination). Even if the second determination is negative, it can be determined that it is not appropriate to divide the hot spot, so the determination in step 110 is negative. Thus, by dividing the hot spot image processing module 38 into a plurality of partial image processing units, it is possible to prevent the processing efficiency from being lowered. This second determination corresponds to the invention described in claim 3.

また、第2の判定も肯定された場合は、ホットスポットの処理負荷(CPU処理時間)が閾値以上か否か判定する(第3の判定)。第3の判定が否定された場合も、ホットスポットの画像処理モジュール38を複数の部分画像処理部へ分割することで却って処理効率が低下してしまう可能性が高く、ホットスポットを分割することは適当でないと判断できるので、ステップ110の判定が否定される。この第3の判定は請求項4記載の発明と関連している。   If the second determination is also affirmed, it is determined whether or not the hot spot processing load (CPU processing time) is equal to or greater than a threshold value (third determination). Even when the third determination is negative, there is a high possibility that the processing efficiency is lowered by dividing the hot spot image processing module 38 into a plurality of partial image processing units. Since it can be determined that it is not appropriate, the determination in step 110 is denied. This third determination is related to the invention of claim 4.

上述した第1の判定〜第3の判定の何れかが否定されることでステップ110の判定が否定された場合は、ホットスポットの分割(多重化)を行うことなくステップ116へ移行し、各グループをスレッドとして各々割り付け(各グループのプログラムを実行するスレッドを各々生成し)、画像処理部分割処理を終了する。   If any of the first to third determinations described above is denied and the determination of step 110 is denied, the process proceeds to step 116 without performing hot spot division (multiplexing). Each group is assigned as a thread (a thread for executing a program of each group is generated), and the image processing unit dividing process is terminated.

一方、上述した第1の判定〜第3の判定が各々肯定された場合は、ホットスポットは複数の部分画像処理部に分割(多重化)することが適当と判断できるので、ステップ112へ移行してホットスポットの分割数nを決定する。この分割数nは、分割後の個々の部分画像処理部の処理負荷(CPU処理時間)が、ホットスポット以外のグループの処理負荷(CPU処理時間)となるべく等しくなるように決定することができ、具体的には、例えばホットスポットのCPU処理時間を、ホットスポット以外のグループのCPU処理時間(該当するグループが複数存在している場合はその平均値)で除算し、剰余が生ずる場合は商に対して四捨五入等の端数処理を行った結果を分割数nとして用いることができる。次のステップ114では、分割数nが1よりも大きいか否か判定する。この判定が否定された場合(分割数n=1の場合)はホットスポットの分割は不要であるので、前述のステップ116へ移行する。   On the other hand, if the above-described first determination to third determination are affirmed, it can be determined that it is appropriate to divide (multiplex) the hot spot into a plurality of partial image processing units. Thus, the hot spot division number n is determined. The division number n can be determined so that the processing load (CPU processing time) of each of the partial image processing units after the division is as equal as possible to the processing load (CPU processing time) of a group other than the hot spot. Specifically, for example, the CPU processing time of a hot spot is divided by the CPU processing time of a group other than the hot spot (the average value when there are a plurality of corresponding groups), and if a remainder occurs, the quotient is calculated. On the other hand, the result of rounding such as rounding off can be used as the division number n. In the next step 114, it is determined whether or not the division number n is larger than one. If this determination is negative (when the number of divisions n = 1), hot spot division is not necessary, and the process proceeds to step 116 described above.

また、ステップ114の判定が肯定された場合は、次のステップ118以降でホットスポットを分割数nと同数の部分画像処理部に分割する。すなわち、ステップ118では、ホットスポットに入力される画像データが表す画像の幅(x方向(ホットスポットへの画像データの入力順(ラスタ順)に沿った方向)の画素数)を分割数nで除算し、剰余が生ずる場合は商に対して四捨五入等の端数処理を行った結果をx方向切り出し量dxとして設定する。また、x方向切り出し開始位置xsとして0を、x方向切り出し終了位置xeとしてx方向切り出し量dxを、y方向切り出し開始位置ysとして0を、y方向切り出し終了位置yeとして、ホットスポットに入力される画像データが表す画像の高さ(y方向(x方向に直交する方向)の画素数)を、変数iとして分割数nを各々設定する。   If the determination in step 114 is affirmative, the hot spot is divided into the same number of partial image processing units as the division number n in the next step 118 and thereafter. That is, in step 118, the width of the image represented by the image data input to the hot spot (the number of pixels in the x direction (the number of pixels along the input order (raster order) of the image data to the hot spot)) is the division number n. When division occurs and a remainder is generated, the result of rounding the quotient, such as rounding off, is set as the x-direction cutout amount dx. Also, 0 is input to the hot spot as the x-direction extraction start position xs, the x-direction extraction end position xe as the x-direction extraction amount dx, the y-direction extraction start position ys as 0, and the y-direction extraction end position ye. The division number n is set with the height (number of pixels in the y direction (direction orthogonal to the x direction)) of the image represented by the image data as a variable i.

次のステップ120では変数iが0よりも大きいか否か判定する。判定が肯定された場合はステップ122へ移行して画像切出モジュール39を生成し、生成した画像切出モジュール39を、ホットスポットの直前に存在しているバッファモジュール40(排他制御機能付きのバッファモジュール40)と連結し、更に、生成した画像切出モジュール39に対し、前段のバッファモジュール40より取得した画像データから、座標(xs,ys)及び座標(xe,ye)を対向する2頂点とする矩形領域(図6も参照)のデータが切り出されるように処理パラメータを設定する。また、ステップ124では排他制御機能無しのバッファモジュール40を生成し、生成したバッファモジュール40をステップ122で生成した画像切出モジュール39の後段に連結する。次のステップ126では、ホットスポットの画像処理モジュール38を生成し、生成した画像処理モジュール38をステップ124で生成したバッファモジュール40の後段に連結する。また、ステップ128では排他制御機能付きのバッファモジュール40を生成し、生成したバッファモジュール40をステップ126で生成した画像処理モジュールの後段に連結する。   In the next step 120, it is determined whether or not the variable i is larger than zero. If the determination is affirmative, the process proceeds to step 122 to generate the image cutting module 39, and the generated image cutting module 39 is replaced with the buffer module 40 (buffer with exclusive control function) existing immediately before the hot spot. The module 40) is connected to the generated image cutout module 39. From the image data acquired from the previous buffer module 40, the coordinates (xs, ys) and the coordinates (xe, ye) are opposite to each other. The processing parameters are set so that the data of the rectangular area (see also FIG. 6) to be cut out. In step 124, the buffer module 40 without the exclusive control function is generated, and the generated buffer module 40 is connected to the subsequent stage of the image cutting module 39 generated in step 122. In the next step 126, the hot spot image processing module 38 is generated, and the generated image processing module 38 is connected to the subsequent stage of the buffer module 40 generated in step 124. In step 128, the buffer module 40 with the exclusive control function is generated, and the generated buffer module 40 is connected to the subsequent stage of the image processing module generated in step 126.

そしてステップ130では、ステップ122〜ステップ128で生成したモジュール群(画像切出モジュール39、排他制御機能無しのバッファモジュール40、画像処理モジュール38及び排他制御機能付きのバッファモジュール40)から成る単一の部分画像処理部を、単一のスレッドとして割り付ける(各モジュールのプログラムを実行する単一のスレッドを生成する)。次のステップ132では、新たなx方向切り出し開始位置xsとして現在のx方向切り出し終了位置xeを、新たなx方向切り出し終了位置xeとして、現在のx方向切り出し終了位置xeにx方向切り出し量dxを加算した値を各々設定すると共に、変数iを1だけデクリメントしてステップ120へ戻る。   In step 130, the module group generated in steps 122 to 128 (image cutting module 39, buffer module 40 without exclusive control function, image processing module 38, and buffer module 40 with exclusive control function) is a single unit. The partial image processing unit is allocated as a single thread (a single thread for executing the program of each module is generated). In the next step 132, the current x-direction cutout end position xe is set as the new x-direction cutout start position xs, and the x-direction cutout amount dx is set as the new x-direction cutout end position xe. Each of the added values is set, and the variable i is decremented by 1, and the process returns to step 120.

これにより、ステップ120の判定が肯定される迄、ステップ122〜ステップ132がn回繰り返されることで、例として図5(C)にも示すように、各々画像切出モジュール39、排他制御機能無しのバッファモジュール40、画像処理モジュール38及び排他制御機能付きのバッファモジュール40が直列に連結されて成るn個の部分画像処理部が、互いに別々のスレッドとして各々生成される。また、個々の部分画像処理部の画像切出モジュール39に設定されているx方向切り出し開始位置xs及びx方向切り出し終了位置xeはx方向切り出し量dxずつずれているので、画像処理の実行時には、個々の部分画像処理部の画像切出モジュール39により、前段の排他制御機能付きのバッファモジュール40に保持されている画像データから、例として図6にも示すようにx方向切り出し量dxずつx方向にずれた画像領域のデータが切り出され、個々の部分画像処理部の画像処理モジュール38では、同一の部分画像処理部の画像切出モジュール39によって切り出された画像領域のデータに対してのみ画像処理が行われることになる。   As a result, step 122 to step 132 are repeated n times until the determination in step 120 is affirmed. As shown in FIG. 5C as an example, each of the image cut-out modules 39 and the exclusive control function is not provided. N partial image processing units formed by serially connecting the buffer module 40, the image processing module 38, and the buffer module 40 with the exclusive control function are generated as separate threads. Further, the x-direction cutout start position xs and the x-direction cutout end position xe set in the image cutout module 39 of each partial image processing unit are shifted by the x-direction cutout amount dx. From the image data held in the buffer module 40 with the exclusive control function in the previous stage by the image cutout module 39 of each partial image processing unit, as shown in FIG. The data of the image area shifted in the range is cut out, and the image processing module 38 of each partial image processing unit performs image processing only on the data of the image area cut out by the image cutting module 39 of the same partial image processing unit. Will be done.

また、n個の部分画像処理部が生成されると、ステップ120の判定が否定されてステップ134へ移行する。ステップ134では画像合成モジュール41を生成し、生成した画像合成モジュール41をn個の部分画像処理部の最後段に各々位置している排他制御機能付きのバッファモジュール40の後段に各々連結する。そしてステップ136では、ホットスポット以外の各グループをスレッドとして各々割り付け(ホットスポット以外の各グループのプログラムを実行するスレッドを各々生成し)、画像処理部分割処理を終了する。   When n partial image processing units are generated, the determination in step 120 is negative and the process proceeds to step 134. In step 134, the image composition module 41 is generated, and the generated image composition module 41 is connected to the subsequent stage of the buffer module 40 with the exclusive control function, which is located at the last stage of the n partial image processing units. In step 136, each group other than the hot spot is assigned as a thread (a thread for executing a program of each group other than the hot spot is generated), and the image processing section dividing process is terminated.

なお、個々の部分画像処理部の画像切出モジュール39は、ホットスポットの前段に位置している排他制御機能付きのバッファモジュール40(図5(C)の例では「B3」と表記したバッファモジュール40)と共に本発明に係る分配供給部を構成しており、上記の排他制御機能付きのバッファモジュール40は請求項8に記載の「分配供給部の一部として機能するバッファモジュール」に対応している。また、個々の部分画像処理部の排他制御機能付きのバッファモジュール40(図5(C)の例では「B5」と表記したバッファモジュール40)は、ホットスポットの後段に位置している画像合成モジュール41と共に本発明に係る画像合成部を構成しており、個々の部分画像処理部の排他制御機能付きのバッファモジュール40は請求項8に記載の「画像合成部の一部として機能するバッファモジュール」に対応している。   It should be noted that the image cutout module 39 of each partial image processing unit is a buffer module 40 with an exclusive control function located in the preceding stage of the hot spot (a buffer module denoted as “B3” in the example of FIG. 5C). 40), and the buffer module 40 with the exclusive control function corresponds to the “buffer module functioning as a part of the distribution supply unit” according to claim 8. Yes. In addition, the buffer module 40 with the exclusive control function of each partial image processing unit (the buffer module 40 represented as “B5” in the example of FIG. 5C) is an image synthesis module located at the subsequent stage of the hot spot. The buffer module 40 with the exclusive control function of each partial image processing unit is configured as “a buffer module that functions as a part of the image combining unit” according to claim 8. It corresponds to.

以上の処理によって画像処理部50の構築が完了すると、処理管理部46のワークフロー管理部46Aは、処理構築部42によって生成された、画像処理部50のプログラムを実行する複数のスレッドをCPU12(やその他の演算リソース)によって並列に実行させると共に、画像処理部50の最後段に位置している画像処理モジュール38に処理要求を入力する。また、任意のバッファモジュール40からデータ要求が入力される毎に、要求元のバッファモジュール40の前段の画像処理モジュール38に処理要求を入力し、任意の画像処理モジュールから処理完了通知が入力される毎に、通知元の画像処理モジュールに処理要求を入力することを、最後段の画像処理モジュールから全体処理の終了(1面分の画像データに対する画像処理の終了)が通知される迄繰り返す。これにより、個々の画像処理モジュール38における画像処理を並列に行わせる並列処理方式で画像処理部50が動作することになる。なお、処理管理部46のワークフロー管理部46Aは、本発明に係る制御手段(より詳しくは請求項6,7に記載の制御手段)に対応している。   When the construction of the image processing unit 50 is completed by the above processing, the workflow management unit 46A of the processing management unit 46 assigns a plurality of threads generated by the processing construction unit 42 to execute the program of the image processing unit 50 to the CPU 12 (a The processing request is input to the image processing module 38 located at the last stage of the image processing unit 50. Each time a data request is input from an arbitrary buffer module 40, a processing request is input to the image processing module 38 in the preceding stage of the requesting buffer module 40, and a processing completion notification is input from the arbitrary image processing module. Each time, a processing request is input to the image processing module as a notification source until the end of the entire processing (end of image processing for image data for one surface) is notified from the last image processing module. As a result, the image processing unit 50 operates in a parallel processing system in which image processing in the individual image processing modules 38 is performed in parallel. The workflow management unit 46A of the process management unit 46 corresponds to the control means according to the present invention (more specifically, the control means described in claims 6 and 7).

処理構築部42によって当初構築された画像処理部50のモジュール単位の処理負荷(CPU処理時間)が、特定の画像処理モジュール38に大きく偏っていた場合、モジュールを単位として複数のグループへの分割を行ったとしても、例えば図5(B)に示すように、個々のグループの処理負荷を平準化することは困難であり、各グループのプログラムを並列に実行した際の処理効率は大幅に低下する。これに対し、本実施形態では、先に説明した画像処理部分割処理において、画像処理部50の各グループのうち処理負荷が最大のグループ(ホットスポット)を複数の部分画像処理部に分割(多重化)することが適当か否か判定し、複数の部分画像処理部への分割(多重化)が適当と判断した場合には、ホットスポット以外のグループの処理負荷(CPU処理時間)となるべく等しくなるようにホットスポットの分割数nを決定してn個の部分画像処理部へ分割し、n個の部分画像処理部のプログラムを互いに別のスレッドとして並列に実行するので、画像処理部50のモジュール単位の処理負荷が特定の画像処理モジュール38に大きく偏っている場合にも、画像処理部50のプログラムの実行単位(スレッド)毎の処理負荷を均一又は均一に近づけることができ、各スレッドを並列に実行した際の処理効率の向上、ひいては処理時間の短縮を実現することができる。   When the processing load (CPU processing time) of the module unit of the image processing unit 50 originally constructed by the processing construction unit 42 is greatly biased to a specific image processing module 38, the module is divided into a plurality of groups as a unit. Even if it is performed, for example, as shown in FIG. 5B, it is difficult to equalize the processing load of each group, and the processing efficiency when the programs of each group are executed in parallel is greatly reduced. . On the other hand, in the present embodiment, in the image processing unit division processing described above, among the groups of the image processing unit 50, a group (hot spot) having the largest processing load is divided (multiplexed) into a plurality of partial image processing units. If the division (multiplexing) into a plurality of partial image processing units is appropriate, the processing load (CPU processing time) of the group other than the hot spot is as equal as possible. Thus, the number n of hot spot divisions is determined and divided into n partial image processing units, and the programs of the n partial image processing units are executed in parallel as separate threads. Even when the processing load of each module is greatly biased to a specific image processing module 38, the processing load for each execution unit (thread) of the program of the image processing unit 50 is uniform or uniform. Can be brought close to, enhancing performance when executing each thread in parallel, it is possible to realize the shortening of the turn processing time.

また、複数の部分画像処理部を互いに別のスレッドとして並列に実行することで、ホットスポットの前段に位置しているバッファモジュール40に対しては、個々の部分画像処理部の画像切出モジュール39によってバッファ40Aが互いに非同期でアクセスされることになるが、本実施形態では上記のバッファモジュール40として排他制御機能付きのバッファモジュールを用いているので、個々の画像切出モジュール39によるバッファ40Aへのアクセスが競合することで処理がロックする等の不都合が生ずることを防止することができる。また、個々の部分画像処理部と画像合成モジュール41も並列に動作するので、個々の部分画像処理部の最後段に設けられたバッファモジュール40に対しては、前段の画像処理モジュール38によるバッファ40Aのアクセスと、後段の画像合成モジュール41によるバッファ40Aのアクセスが競合する可能性があるが、本実施形態ではこのバッファモジュール40としても排他制御機能付きのバッファモジュールを用いているので、前段の画像処理モジュール38及び後段の画像合成モジュール41によるバッファ40Aへのアクセスが競合することで処理がロックする等の不都合が生ずることも防止することができる。   In addition, by executing a plurality of partial image processing units in parallel as separate threads, the buffer module 40 located in the preceding stage of the hot spot can be subjected to the image cutting module 39 of each partial image processing unit. As a result, the buffer 40A is accessed asynchronously with each other. However, in the present embodiment, the buffer module with the exclusive control function is used as the buffer module 40 described above. It is possible to prevent inconveniences such as processing locking due to access conflict. In addition, since the individual partial image processing units and the image synthesis module 41 also operate in parallel, the buffer module 40 provided by the image processing module 38 in the preceding stage is not used for the buffer module 40 provided in the last stage of each partial image processing unit. And the access to the buffer 40A by the subsequent image composition module 41 may conflict with each other. In this embodiment, since the buffer module with the exclusive control function is also used as the buffer module 40, the previous image It is also possible to prevent inconveniences such as processing being locked due to contention between accesses to the buffer 40A by the processing module 38 and the subsequent image composition module 41.

また、排他制御機能付きのバッファモジュールは、排他制御を行う分だけCPU12等の演算リソースのオーバヘッドが増大することになるが、本実施形態では、排他制御機能付きのバッファモジュールを必要箇所(ホットスポットの前段を含む各グループの境界及び個々の部分画像処理部の最後段)にのみ設け、その他の箇所に設けられるバッファモジュールとしては排他制御機能無しのバッファモジュールを用いているので、バッファモジュールで排他制御を行うことに伴うCPU12等の演算リソースのオーバヘッドの増大を必要最小限に抑制することができる。   In addition, the buffer module with the exclusive control function increases the overhead of computation resources such as the CPU 12 by the amount of exclusive control. In the present embodiment, the buffer module with the exclusive control function is replaced with a necessary part (hot spot). Since the buffer modules without exclusive control function are used as buffer modules provided only at the boundary of each group including the previous stage and the last stage of each partial image processing unit), the buffer module is exclusive. It is possible to suppress an increase in overhead of computation resources such as the CPU 12 accompanying the control to the minimum necessary.

なお、上記では単一の画像処理モジュール38から成るグループ(ホットスポット)を複数の部分画像処理部へ分割(多重化)する態様を説明したが、これに限定されるものではなく、複数の部分画像処理部への分割(多重化)を行うグループは、複数の画像処理モジュール38から成るグループであってもよい。   In the above description, a mode in which a group (hot spot) composed of a single image processing module 38 is divided (multiplexed) into a plurality of partial image processing units has been described. However, the present invention is not limited to this. The group to be divided (multiplexed) into the image processing unit may be a group including a plurality of image processing modules 38.

また、上記では画像処理部50の複数のグループのうち、処理負荷が最大の単一のグループ(ホットスポット)についてのみ複数の部分画像処理部への分割(多重化)を行う態様を説明したが、これに限定されるものではなく、処理負荷の降順に所定数(複数)のグループを選択し、選択したのグループを各々ホットスポットとして複数の部分画像処理部への分割(多重化)を行うようにしてもよいし、分割(多重化)を行うグループの数を固定せずに不定数のグループを対象として複数の部分画像処理部への分割(多重化)を行うようにしてもよい。具体的には、例えば画像処理部50のプログラムの実行と並行して、他のアプリケーション・プログラムもコンピュータ10で実行されており、かつ他のアプリケーション・プログラムに対応する個々のスレッドのCPU処理時間が、画像処理部50に対応する個々のスレッドのCPU処理時間と大きく相違している場合に、画像処理部50に対応する個々のスレッドのCPU処理時間を他のアプリケーション・プログラムに対応する個々のスレッドのCPU処理時間に近づける等の目的で、画像処理部50の全てのグループについて、分割(多重化)の有無及び分割数n(多重化の数)を各々設定し、全グループのうち多重化有りに設定したグループを、当該グループに設定した分割数nと同数の部分画像処理部に分割するようにしてもよい。この態様は請求項5記載の発明に対応している。   In the above description, a mode has been described in which division (multiplexing) into a plurality of partial image processing units is performed only for a single group (hot spot) having the maximum processing load among a plurality of groups of the image processing unit 50. However, the present invention is not limited to this, and a predetermined number (a plurality of) groups are selected in descending order of processing load, and division (multiplexing) into a plurality of partial image processing units is performed using each of the selected groups as a hot spot. Alternatively, division (multiplexing) into a plurality of partial image processing units may be performed for an infinite number of groups without fixing the number of groups to be divided (multiplexed). Specifically, for example, in parallel with the execution of the program of the image processing unit 50, other application programs are also executed by the computer 10, and the CPU processing time of individual threads corresponding to the other application programs is When the CPU processing time of each thread corresponding to the image processing unit 50 is greatly different from the CPU processing time of each thread corresponding to the image processing unit 50, the individual thread corresponding to another application program For the purpose of approaching the CPU processing time, the presence / absence of division (multiplexing) and the number of divisions n (number of multiplexing) are set for all groups of the image processing unit 50, and multiplexing is performed among all groups. May be divided into the same number of partial image processing units as the division number n set for the group. . This aspect corresponds to the invention described in claim 5.

また、上記では分割(多重化)対象の特定のグループを複数の部分画像処理部に分割(多重化)した後に、個々の部分画像処理部において、入力画像データが表す画像のうち互いに異なる画像領域のデータに対して画像処理を行わせる態様を説明したが、本発明はこれに限定されるものではなく、例えば分割数nがより多数である等の場合に、画像データに対し複数の画像領域への分割に加えて色毎の分割も行い、分割後のデータを個々の部分画像処理部に入力して画像処理を行わせるようにしてもよい。具体的には、例えば分割数nが9で、入力画像データがR,G,B3色のデータから構成されている場合、入力画像データが表す画像を3個の画像領域に分割すると共に、分割した個々の画像領域のデータを更にR,G,B各色毎に各々分割することで、入力画像データを9個のデータに分割し、各データを互いに異なる部分画像処理部に入力して画像処理を行わせるようにしてもよい。本発明は上記態様も権利範囲に含むものである。   Also, in the above, after a specific group to be divided (multiplexed) is divided (multiplexed) into a plurality of partial image processing units, different image regions of the image represented by the input image data in each partial image processing unit However, the present invention is not limited to this. For example, when the number of divisions n is larger, a plurality of image regions are processed for the image data. In addition to the division, the division for each color is also performed, and the divided data may be input to individual partial image processing units to perform image processing. Specifically, for example, when the division number n is 9 and the input image data is composed of R, G, B color data, the image represented by the input image data is divided into three image areas and divided. By further dividing the data of the individual image areas for each color of R, G and B, the input image data is divided into nine data, and each data is input to different partial image processing units for image processing. May be performed. The present invention includes the above-described embodiments within the scope of rights.

更に、上記では画像処理部50のホットスポットを複数の部分画像処理部に分割した後に、画像処理部50のプログラムを実行する複数のスレッドをCPU12(やその他の演算リソース)によって並列に実行させることで、画像処理部50を並列処理方式で動作させる態様を説明したが、本発明は、常に単一の画像処理モジュール38で画像処理を行わせると共に、画像処理を行わせる画像処理モジュール38を逐次切り替える逐次処理方式で画像処理部50を動作させる場合にも適用可能である。すなわち、画像処理部50を逐次処理方式で動作させる場合であっても、画像処理部50の処理負荷が特定の画像処理モジュールに偏っていると、当該特定の画像処理モジュールのみが画像処理を行っている期間の長さがネックとなって処理時間が増大する。ここで、演算リソースが複数存在している場合には、特定の画像処理モジュールを複数の部分画像処理部に分割し、複数の演算リソースによって複数の部分画像処理部を並列に動作させれば、処理時間を大幅に短縮することが可能となる。   Furthermore, in the above, after dividing the hot spot of the image processing unit 50 into a plurality of partial image processing units, a plurality of threads for executing the program of the image processing unit 50 are executed in parallel by the CPU 12 (and other computing resources). In the above, the mode in which the image processing unit 50 is operated in the parallel processing method has been described. However, in the present invention, image processing is always performed by the single image processing module 38 and the image processing module 38 that performs image processing is sequentially performed. The present invention can also be applied to the case where the image processing unit 50 is operated by the sequential processing method for switching. That is, even when the image processing unit 50 is operated by the sequential processing method, if the processing load of the image processing unit 50 is biased toward a specific image processing module, only the specific image processing module performs image processing. The length of the current period becomes a bottleneck and the processing time increases. Here, when there are a plurality of calculation resources, if a specific image processing module is divided into a plurality of partial image processing units and a plurality of partial image processing units are operated in parallel by the plurality of calculation resources, Processing time can be greatly reduced.

また、上記では本発明に係る画像処理プログラムに対応する画像処理プログラム群34が記憶部20に予め記憶(インストール)されている態様を説明したが、本発明に係る画像処理プログラムは、CD−ROMやDVD−ROM等の記録媒体に記録されている形態で提供することも可能である。   In the above description, the image processing program group 34 corresponding to the image processing program according to the present invention is stored (installed) in the storage unit 20 in advance. However, the image processing program according to the present invention is a CD-ROM. It is also possible to provide it 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 image process part division | segmentation process performed by the process construction part. 画像処理部分割処理による画像処理部の分割を説明するための画像処理部の一例を示すブロック図である。It is a block diagram which shows an example of the image process part for demonstrating the division | segmentation of the image process part by an image process part division | segmentation process. ホットスポットを複数の部分画像処理部へ分割したときの、個々の部分画像処理部が処理対象とする画像領域を説明するためのイメージ図である。It is an image figure for demonstrating the image area | region which each partial image process part makes a process target when a hot spot is divided | segmented into the some partial image process part.

符号の説明Explanation of symbols

10 コンピュータ
12 CPU
20 記憶部
38 画像処理モジュール
39 画像切出モジュール
40 バッファモジュール
41 画像合成モジュール
42 処理構築部
46 処理管理部
50 画像処理部
10 Computer 12 CPU
20 Storage Unit 38 Image Processing Module 39 Image Extraction Module 40 Buffer Module 41 Image Composition Module 42 Processing Construction Unit 46 Processing Management Unit 50 Image Processing Unit

Claims (9)

自モジュールの前段から取得した画像データに対して互いに異なる画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する複数種の画像処理モジュール、前段のモジュールから出力される画像データをバッファに書き込ませると共に前記バッファに記憶されている画像データを後段のモジュールによって読み出させるバッファモジュール、前段のモジュールから出力される画像データを当該画像データが表す画像上の互いに異なる領域に対応する複数個のデータに分割し分割した個々のデータを後段の複数のモジュールのうちの互いに異なるモジュールへ供給する分配供給部、及び、前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成する画像合成部のプログラムを各々記憶する記憶手段と、
前記記憶手段に記憶されているプログラムにより、前記複数種の画像処理モジュールの中から選択した1つ以上の画像処理モジュールの各々の前段及び後段の少なくとも一方に前記バッファモジュールを連結し、各モジュールをパイプライン形態又は有向非循環グラフ形態で連結すると共に、そのうちの少なくとも一部分を多重に設け、多重に設けた個々の処理部を、前記分配供給部を介して多重化部分の前段と各々連結しかつ前記画像合成部を介して前記多重化部分の後段と各々連結した画像処理部を構築する構築手段と、
前記構築手段によって構築された画像処理部によって画像処理を行わせる制御手段と、
を含む画像処理装置。
A plurality of types of image processing modules that perform different image processing on the image data acquired from the previous stage of the own module, and output 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, A buffer module that causes image data output from the module to be written to the buffer and that the image data stored in the buffer is read out by a subsequent module, and an image data that represents the image data output from the previous module. The distribution supply unit that divides and divides the divided data into a plurality of data corresponding to different areas of the plurality of modules, and supplies data to different modules among the plurality of modules in the subsequent stage, and data acquired from the modules in the previous stage, respectively Image composition unit that composes image data as single image data Storage means for each storing a program,
The buffer module is connected to at least one of the preceding stage and the succeeding stage of each of the one or more image processing modules selected from the plurality of types of image processing modules by a program stored in the storage means, They are connected in a pipeline form or a directed acyclic graph form, and at least a part of them is provided in multiples, and the individual processing units provided in multiples are respectively connected to the preceding stage of the multiplexed part via the distribution supply unit. And a constructing means for constructing an image processing unit connected to the subsequent stage of the multiplexed part via the image synthesizing unit,
Control means for performing image processing by the image processing section constructed by the construction means;
An image processing apparatus.
前記構築手段は、前記画像処理部を構成する画像処理モジュールのうち、多重化対象であることを表す情報が付加されているか、又は、所定のテーブルに多重化対象として登録されている画像処理モジュールを含む部分を、多重化対象の部分として選択することを特徴とする請求項1記載の画像処理装置。   The construction means is an image processing module to which information indicating that it is a multiplexing target is added from among the image processing modules constituting the image processing unit, or is registered as a multiplexing target in a predetermined table The image processing apparatus according to claim 1, wherein a part including the image is selected as a part to be multiplexed. 前記構築手段は、前記画像処理部によって画像処理が行われる画像のサイズが閾値以上の場合にのみ、前記画像処理部のうちの少なくとも一部分の多重化を行うことを特徴とする請求項1又は請求項2記載の画像処理装置。   The construction means performs multiplexing of at least a part of the image processing unit only when the size of the image on which the image processing is performed by the image processing unit is equal to or larger than a threshold value. Item 3. The image processing apparatus according to Item 2. 前記構築手段は、前記各モジュールをパイプライン形態又は有向非循環グラフ形態で連結した仮の画像処理部を複数の部分に分けたときの個々の部分毎に処理負荷を演算し、演算した前記個々の部分毎の処理負荷に基づいて前記複数の部分の中から多重化対象の部分を選択することを特徴とする請求項1記載の画像処理装置。   The construction means calculates the processing load for each part when the provisional image processing unit in which each module is connected in a pipeline form or a directed acyclic graph form is divided into a plurality of parts, The image processing apparatus according to claim 1, wherein a part to be multiplexed is selected from the plurality of parts based on a processing load for each part. 前記構築手段は、前記仮の画像処理部の個々の部分毎に演算した処理負荷に基づき、前記複数の部分のうちの前記多重化部分に対応する個々の処理部及び前記複数の部分のうちの個々の非多重化部分の各々の処理負荷が均一の状態に近づくように、前記個々の部分毎に多重化の有無及び多重化の数を設定し、前記複数の部分のうち多重化有りに設定した部分に、設定した多重化の数と同数の処理部を設けることを特徴とする請求項4記載の画像処理装置。   The constructing unit is configured based on a processing load calculated for each part of the temporary image processing unit, and each of the plurality of parts corresponding to the multiplexed part and the part of the plurality of parts. Set the presence / absence of multiplexing and the number of multiplexing for each individual part so that the processing load of each individual non-multiplexed part approaches a uniform state, and set the presence of multiplexing among the plurality of parts 5. The image processing apparatus according to claim 4, wherein the same number of processing units as the set number of multiplexing units are provided in the set part. 前記制御手段は、前記構築手段によって構築された画像処理部のうち、少なくとも前記多重化部分に対応する個々の処理部のプログラムをコンピュータによって各々並列に実行させることを特徴とする請求項1〜請求項5の何れか1項記載の画像処理装置。   The control unit causes a computer to execute in parallel each of the programs of at least the individual processing units corresponding to the multiplexed portion among the image processing units constructed by the construction unit. Item 6. The image processing device according to any one of Items 5 to 6. 前記制御手段は、前記複数の部分のうちの前記多重化部分に対応する個々の処理部のプログラム及び前記複数の部分のうちの個々の非多重化部分のプログラムをコンピュータによって各々並列に実行させることを特徴とする請求項5又は請求項6記載の画像処理装置。   The control means causes a computer to execute a program of an individual processing unit corresponding to the multiplexed part of the plurality of parts and a program of an individual non-multiplexed part of the plurality of parts by a computer in parallel. The image processing apparatus according to claim 5, wherein: 前記記憶手段には、前記バッファモジュールのプログラムとして、前記バッファへのアクセスに対する排他制御を行う第1のバッファモジュール及び前記バッファへのアクセスに対する排他制御を行わない第2のバッファモジュールのプログラムが各々記憶されており、
前記構築手段は、前記画像処理部の構築にあたり、少なくとも前記分配供給部の一部として機能するバッファモジュール及び前記画像合成部の一部として機能するバッファモジュールとして前記第1のバッファモジュールを各々選択し、それ以外のバッファモジュールとして前記第2のバッファモジュールを選択することを特徴とする請求項6又は請求項7記載の画像処理装置。
The storage means stores, as the buffer module program, a first buffer module that performs exclusive control for access to the buffer and a second buffer module program that does not perform exclusive control for access to the buffer. Has been
In constructing the image processing unit, the constructing unit selects the first buffer module as a buffer module that functions as at least a part of the distribution supply unit and a buffer module that functions as a part of the image composition unit, respectively. 8. The image processing apparatus according to claim 6, wherein the second buffer module is selected as another buffer module.
自モジュールの前段から取得した画像データに対して互いに異なる画像処理を行い、当該画像処理を経た画像データ又は前記画像処理の処理結果を自モジュールの後段へ出力する複数種の画像処理モジュール、前段のモジュールから出力される画像データをバッファに書き込ませると共に前記バッファに記憶されている画像データを後段のモジュールによって読み出させるバッファモジュール、前段のモジュールから出力される画像データを当該画像データが表す画像上の互いに異なる領域に対応する複数個のデータに分割し分割した個々のデータを後段の複数のモジュールのうちの互いに異なるモジュールへ供給する分配供給部、及び、前段の複数のモジュールから各々取得したデータを単一の画像の画像データとして合成する画像合成部のプログラムを各々記憶する記憶手段と接続されたコンピュータを、
前記記憶手段に記憶されている各種モジュールのプログラムに基づき、前記複数種の画像処理モジュールの中から選択した1つ以上の画像処理モジュールの各々の前段及び後段の少なくとも一方に前記バッファモジュールが連結され、各モジュールがパイプライン形態又は有向非循環グラフ形態で連結されると共に、そのうちの少なくとも一部分のモジュールが多重化され、当該多重化部分の前段に前記分配モジュール、後段に前記合成モジュールが各々挿入された画像処理部を構築する構築手段、
及び、前記構築手段によって構築された画像処理部によって画像処理を行わせる制御手段
として機能させるための画像処理プログラム。
A plurality of types of image processing modules that perform different image processing on the image data acquired from the previous stage of the own module, and output 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, A buffer module that causes image data output from the module to be written to the buffer and that the image data stored in the buffer is read out by a subsequent module, and an image data that represents the image data output from the previous module. The distribution supply unit that divides and divides the divided data into a plurality of data corresponding to different areas of the plurality of modules, and supplies data to different modules among the plurality of modules in the subsequent stage, and data acquired from the modules in the previous stage, respectively Image composition unit that composes image data as single image data Each computer that is connected to the storage means for storing a program,
The buffer module is connected to at least one of the preceding stage and the succeeding stage of each of the one or more image processing modules selected from the plurality of types of image processing modules based on the programs of the various modules stored in the storage means. , Each module is connected in the form of a pipeline or a directed acyclic graph, and at least a part of the modules is multiplexed, and the distribution module is inserted before the multiplexed part, and the synthesis module is inserted after the multiplexed part. A construction means for constructing the processed image processing unit,
And an image processing program for causing the image processing unit constructed by the construction unit to function as a control unit that performs image processing.
JP2007221117A 2007-08-28 2007-08-28 Image processor and program Pending JP2009054001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007221117A JP2009054001A (en) 2007-08-28 2007-08-28 Image processor and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007221117A JP2009054001A (en) 2007-08-28 2007-08-28 Image processor and program

Publications (1)

Publication Number Publication Date
JP2009054001A true JP2009054001A (en) 2009-03-12

Family

ID=40505016

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007221117A Pending JP2009054001A (en) 2007-08-28 2007-08-28 Image processor and program

Country Status (1)

Country Link
JP (1) JP2009054001A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016091137A (en) * 2014-10-31 2016-05-23 コニカミノルタ株式会社 Image forming apparatus, specific processing execution method, and computer program
WO2017163592A1 (en) * 2016-03-24 2017-09-28 富士フイルム株式会社 Image processing device, image processing method, and image processing program
WO2017163591A1 (en) * 2016-03-24 2017-09-28 富士フイルム株式会社 Image processing device, image processing method, and image processing program
WO2019053915A1 (en) * 2017-09-15 2019-03-21 富士ゼロックス株式会社 Image processing device, image processing method, and image processing program
US10803589B2 (en) 2016-04-11 2020-10-13 Olympus Corporation Image processing device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016091137A (en) * 2014-10-31 2016-05-23 コニカミノルタ株式会社 Image forming apparatus, specific processing execution method, and computer program
US9781295B2 (en) 2014-10-31 2017-10-03 Konica Minolta, Inc. Image processing apparatus, a method for performing specific process on an image processing apparatus, and a computer-readable storage medium for a program to be executed by an image processing apparatus
WO2017163592A1 (en) * 2016-03-24 2017-09-28 富士フイルム株式会社 Image processing device, image processing method, and image processing program
WO2017163591A1 (en) * 2016-03-24 2017-09-28 富士フイルム株式会社 Image processing device, image processing method, and image processing program
CN108780565A (en) * 2016-03-24 2018-11-09 富士胶片株式会社 Image processing apparatus, image processing method and image processing program
JPWO2017163592A1 (en) * 2016-03-24 2019-01-24 富士フイルム株式会社 Image processing apparatus, image processing method, and image processing program
US10878526B2 (en) 2016-03-24 2020-12-29 Fujifilm Corporation Image processing apparatus, image processing method, and image processing program
US10949942B2 (en) 2016-03-24 2021-03-16 Fujifilm Corporation Image processing apparatus, image processing method, and image processing program
US10803589B2 (en) 2016-04-11 2020-10-13 Olympus Corporation Image processing device
WO2019053915A1 (en) * 2017-09-15 2019-03-21 富士ゼロックス株式会社 Image processing device, image processing method, and image processing program
CN110741408A (en) * 2017-09-15 2020-01-31 富士施乐株式会社 Image processing apparatus, image processing method, and image processing program
US11341599B2 (en) 2017-09-15 2022-05-24 Fujifilm Business Innovation Corp. Image processing apparatus, image processing method, and computer readable medium storing image processing program

Similar Documents

Publication Publication Date Title
US7602394B2 (en) Image processing device, method, and storage medium which stores a program
JP5046801B2 (en) Image processing apparatus and program
US7605819B2 (en) Image processing device, method, and storage medium which stores a program
US7605818B2 (en) Image processing device, method, and storage medium which stores a program
US7602392B2 (en) Image processing device, method, and storage medium which stores a program
US8203733B2 (en) Image processing apparatus, storage medium in which image processing program is stored, and image processing method
US20080129740A1 (en) Image processing apparatus, storage medium that stores image processing program, and image processing method
US7602391B2 (en) Image processing device, method, and storage medium which stores a program
US7595803B2 (en) Image processing device, method, and storage medium which stores a program
US20070248288A1 (en) Image processing device, and recording medium
US7652671B2 (en) Image processing device and method and storage medium storing program
US8314951B2 (en) Image processing apparatus, and computer-readable recording medium
US7598957B2 (en) Image processing device, method, and storage medium which stores a program
CN108463836B (en) Image processing apparatus, image processing method, and image processing program
US7602393B2 (en) Image processing device, method, and storage medium which stores a program
JP2009054001A (en) Image processor and program
US10878526B2 (en) Image processing apparatus, image processing method, and image processing program
US20070247466A1 (en) Image processing apparatus and program
CN111937029B (en) Image processing device, image processing method, image processing program, and storage medium
KR20170099211A (en) Method for enhancing quality of image object included in compound document and apparatus for performing the same
JP4964219B2 (en) Image processing apparatus, method, and program
JP5750018B2 (en) Image processing system, printing system, control device, image processing method and program
JP5047139B2 (en) Image processing apparatus and program
JP2016206934A (en) Image processing device, image processing method and program
JP7086772B2 (en) Image forming device, control method of image forming device, and program