JP2017054490A - Information processing apparatus, program, image processing method, and image processing system - Google Patents

Information processing apparatus, program, image processing method, and image processing system Download PDF

Info

Publication number
JP2017054490A
JP2017054490A JP2016141263A JP2016141263A JP2017054490A JP 2017054490 A JP2017054490 A JP 2017054490A JP 2016141263 A JP2016141263 A JP 2016141263A JP 2016141263 A JP2016141263 A JP 2016141263A JP 2017054490 A JP2017054490 A JP 2017054490A
Authority
JP
Japan
Prior art keywords
image
image data
information
storage area
memory
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
JP2016141263A
Other languages
Japanese (ja)
Inventor
吉岡 達郎
Tatsuro Yoshioka
達郎 吉岡
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to US15/249,917 priority Critical patent/US9942441B2/en
Publication of JP2017054490A publication Critical patent/JP2017054490A/en
Pending legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an apparatus and method with which the efficiency of use of a storage area can be improved.SOLUTION: The present apparatus is an information processing apparatus that performs processing of coupling a plurality of pieces of image data, and comprises: acquisition means 60 that acquires the plurality of pieces of image data in order from first image data; prediction means 61 that predicts the size of a storage area for coupling the plurality of pieces of image data and storing coupled image data, by using image information on the acquired first image data or image information on the first image data and second image data acquired subsequently thereto; ensuring means 62 that ensures a storage area of the predicted size in a storage device; and coupling means 63 that couples the plurality of pieces of image data and stores the coupled image data in the ensured storage area.SELECTED DRAWING: Figure 4

Description

本発明は、複数の画像データを結合する処理を行う情報処理装置、その処理をコンピュータに実行させるためのプログラム、画像処理方法および該情報処理装置を含む画像処理システムに関する。   The present invention relates to an information processing apparatus that performs processing for combining a plurality of image data, a program for causing a computer to execute the processing, an image processing method, and an image processing system including the information processing apparatus.

アプリケーションやOSが、データサイズが大きい画像データを複数に分割した場合、画像データを行(列)単位で比較し、重なりがあるかを判断し、分割前の画像データに再構築する技術が知られている(例えば、特許文献1参照)。   When an application or OS divides image data with a large data size into multiple pieces, a technology is known that compares the image data in rows (columns), determines whether there is an overlap, and reconstructs the image data before division. (For example, refer to Patent Document 1).

上記の技術では、分割前の画像データの画像サイズが分からないため、分割された画像を結合していく際に確保した記憶領域(メモリ)が不足した場合、別の領域を確保し直さなければならない。これでは、メモリの二重取りが発生し、メモリの使用効率が低いという問題があった。   In the above technique, since the image size of the image data before the division is not known, if the storage area (memory) secured when the divided images are combined is insufficient, another area must be secured again. Don't be. This causes a problem that the memory is doubled and the use efficiency of the memory is low.

そこで、画像データを結合していく際のメモリの二重取りの発生を防止し、メモリの使用効率を向上させることができる装置や方法等の提供が望まれている。   Therefore, it is desired to provide an apparatus, a method, and the like that can prevent the occurrence of double memory use when combining image data and improve the use efficiency of the memory.

本発明は、上記課題に鑑みなされたものであり、複数の画像データを結合する処理を行う情報処理装置であって、複数の画像データを第1の画像データから順に取得する取得手段と、取得された第1の画像データの画像情報、または該第1の画像データと次に取得された第2の画像データの画像情報を用いて、複数の画像データを結合して記憶するための記憶領域のサイズを予測する予測手段と、予測されたサイズの記憶領域を記憶装置内に確保する確保手段と、確保された記憶領域に複数の画像データを結合して記憶させる結合手段とを含む、情報処理装置が提供される。   The present invention has been made in view of the above problems, and is an information processing apparatus that performs processing for combining a plurality of image data, an acquisition unit that sequentially acquires the plurality of image data from the first image data, and an acquisition Storage area for combining and storing a plurality of pieces of image data using the image information of the first image data thus obtained or the image information of the second image data acquired next and the first image data Information including prediction means for predicting the size of the storage, securing means for securing a storage area of the predicted size in the storage device, and combining means for combining and storing a plurality of image data in the secured storage area A processing device is provided.

本発明によれば、記憶領域(メモリ)の使用効率を向上させることができる。   According to the present invention, the use efficiency of a storage area (memory) can be improved.

本実施形態の画像処理システムの構成例を示した図。1 is a diagram illustrating a configuration example of an image processing system according to an embodiment. 画像処理システムが備える情報処理装置のハードウェア構成を示した図。The figure which showed the hardware constitutions of the information processing apparatus with which an image processing system is provided. 情報処理装置のソフトウェア構成を示した図。The figure which showed the software structure of information processing apparatus. 情報処理装置の機能ブロック図。The functional block diagram of information processing apparatus. 画像データを分割し、結合して印刷出力するまでの全体の処理の概略を説明する図。The figure explaining the outline of the whole process until it divides | segments image data, and is combined and printed out. 分割された画像データを結合する処理の概要を説明する図。The figure explaining the outline | summary of the process which couple | bonds the divided image data. 情報処理装置において実施される処理の流れを示したフローチャート。The flowchart which showed the flow of the process implemented in information processing apparatus. 分割された画像データを結合する処理の処理例を示した図。The figure which showed the process example of the process which couple | bonds the divided image data. 分割された画像データを結合する処理の具体例を示した図。The figure which showed the specific example of the process which couple | bonds the divided image data.

図1は、本実施形態の画像処理システムの構成例を示した図である。画像処理システムは、画像データを作成し、その画像データに対する画像形成の指示を受けて描画処理を行い、画像形成処理を実行させるための命令(コマンド)を生成し、そのコマンドに従って画像形成処理を行うシステムである。このため、画像処理システムは、画像データの作成、描画処理、コマンドの生成を行う情報処理装置と、コマンドに従って画像形成処理を行う画像形成装置とを含んで構成される。   FIG. 1 is a diagram illustrating a configuration example of an image processing system according to the present embodiment. The image processing system creates image data, performs a drawing process in response to an image forming instruction for the image data, generates a command (command) for executing the image forming process, and performs the image forming process according to the command. It is a system to do. For this reason, the image processing system includes an information processing apparatus that creates image data, performs drawing processing, and command generation, and an image forming apparatus that performs image formation processing according to the command.

図1では、情報処理装置は、PC10とされ、画像形成装置は、印刷装置11とされている。印刷装置11は、プリンタであってもよいし、印刷機能以外にスキャナ機能やファックス送受信機能等を備えるMFP(Multi-Function Peripheral)であってもよい。プリンタは、電子写真方式のプリンタであってもよいし、インクジェット方式のプリンタであってもよい。以下、情報処理装置をPC10とし、画像形成装置を印刷装置11として説明するが、情報処理装置は、PC10以外のタブレット端末、ワークステーション、スマートフォン等であってもよい。画像形成装置は、コピー機やファックス装置等であってもよい。   In FIG. 1, the information processing apparatus is a PC 10, and the image forming apparatus is a printing apparatus 11. The printer 11 may be a printer, or an MFP (Multi-Function Peripheral) having a scanner function and a fax transmission / reception function in addition to the printing function. The printer may be an electrophotographic printer or an inkjet printer. Hereinafter, the information processing apparatus will be described as the PC 10, and the image forming apparatus will be described as the printing apparatus 11. However, the information processing apparatus may be a tablet terminal other than the PC 10, a workstation, a smartphone, or the like. The image forming apparatus may be a copier, a fax machine, or the like.

PC10と印刷装置11とは、直接ケーブルにより接続されていてもよいが、図1に示すようにネットワーク12を介して接続されていてもよい。ネットワーク12は、LAN(Local Area Network)であってもよいし、WAN(Wide Area Network)であってもよいし、インターネットであってもよい。また、ネットワーク12は、有線ネットワークであってもよいし、無線LAN等の無線ネットワークであってもよい。ネットワーク12は、1つのネットワークに限られるものではなく、ルータやプロキシサーバ等の中継装置を使用して接続された2以上のネットワークから構成されていてもよい。2以上のネットワークから構成され、それが有線ネットワークと無線ネットワークとを含んで構成される場合、有線ネットワークにはアクセスポイントを介して接続することができる。   The PC 10 and the printing apparatus 11 may be directly connected by a cable, but may be connected via a network 12 as shown in FIG. The network 12 may be a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet. The network 12 may be a wired network or a wireless network such as a wireless LAN. The network 12 is not limited to one network, and may be composed of two or more networks connected using a relay device such as a router or a proxy server. In the case where the network includes two or more networks and includes a wired network and a wireless network, the wired network can be connected via an access point.

PC10は、ユーザからの情報の入力により画像データを作成し、ユーザからの印刷指示を受けて、記憶装置内の記憶領域(メモリ)を確保し、確保したメモリを使用して描画処理を行う。そして、PC10は、描画処理されたデータを変換して印刷コマンドを生成し、その印刷コマンドを印刷装置11に、ネットワーク12を介して送信する。印刷装置11は、受信した印刷コマンドを解釈し、その内容に従って、用紙等の印刷媒体に対して印刷を実行する。   The PC 10 creates image data by inputting information from the user, receives a print instruction from the user, secures a storage area (memory) in the storage device, and performs drawing processing using the secured memory. Then, the PC 10 converts the rendered data to generate a print command, and transmits the print command to the printing apparatus 11 via the network 12. The printing apparatus 11 interprets the received print command, and executes printing on a print medium such as paper according to the contents.

PC10は、上記の処理を実行するために、図2に示すハードウェアを備える。PC10は、そのハードウェアとして、CPU20と、ROM21と、RAM22と、HDD23と、通信I/F24と、入出力I/F25と、入力装置26と、表示装置27とを備える。CPU20、ROM21、RAM22、HDD23、通信I/F24、入出力I/F25は、互いに情報等のやりとりを行うためにバス28に接続される。   The PC 10 includes hardware shown in FIG. 2 in order to execute the above processing. The PC 10 includes a CPU 20, a ROM 21, a RAM 22, an HDD 23, a communication I / F 24, an input / output I / F 25, an input device 26, and a display device 27 as hardware. The CPU 20, ROM 21, RAM 22, HDD 23, communication I / F 24, and input / output I / F 25 are connected to the bus 28 for exchanging information and the like.

CPU20は、PC10全体の制御を行う演算処理装置で、後述するアプリケーション、OS、プリンタドライバ等を実行する。ROM21は、PC10を起動させるためのブートプログラムやファームウェア等を記憶する不揮発性の記憶装置である。RAM22は、CPU20に対して作業領域を提供し、上記のメモリとして使用される揮発性の記憶装置である。HDD23は、アプリケーション、OS、プリンタドライバ、各種のデータ等を記憶する不揮発性の記憶装置である。HDD23も、上記のメモリとして利用することができる。なお、アプリケーション等を記憶する記憶装置は、HDD23に限られるものではなく、SSD(Solid State Drive)等の他の記憶装置を利用することもできる。   The CPU 20 is an arithmetic processing unit that controls the entire PC 10, and executes an application, an OS, a printer driver, and the like, which will be described later. The ROM 21 is a nonvolatile storage device that stores a boot program, firmware, and the like for starting the PC 10. The RAM 22 is a volatile storage device that provides a work area to the CPU 20 and is used as the memory. The HDD 23 is a non-volatile storage device that stores an application, an OS, a printer driver, various data, and the like. The HDD 23 can also be used as the memory. Note that the storage device for storing the application and the like is not limited to the HDD 23, and other storage devices such as an SSD (Solid State Drive) may be used.

通信I/F24は、PC10をネットワーク12に接続し、ネットワーク12を介した通信を可能にする。入出力I/F25は、入力装置26から入力された情報を、バス28を介してCPU20等に提供し、表示すべき情報を表示装置27に出力する制御を行う。入力装置26は、キーボードやマウス等とされ、ユーザが入力した情報を受け付ける。表示装置27は、CRT(Cathode Ray Tube)、液晶ディスプレイ、有機ELディスプレイ等とされ、作成した画像データの内容、印刷設定画面、エラー画面等の表示すべき情報を表示する。   The communication I / F 24 connects the PC 10 to the network 12 and enables communication via the network 12. The input / output I / F 25 provides information input from the input device 26 to the CPU 20 or the like via the bus 28 and performs control to output information to be displayed to the display device 27. The input device 26 is a keyboard, a mouse, or the like, and receives information input by the user. The display device 27 is a CRT (Cathode Ray Tube), a liquid crystal display, an organic EL display, or the like, and displays information to be displayed such as the contents of the created image data, a print setting screen, and an error screen.

印刷装置11については詳述しないが、ハードウェアとして、CPU、ROM、RAM、HDD等を含むコントローラと、印刷を実行するプリンタエンジンと、ネットワーク12に接続するための通信I/Fとを含んで構成される。プリンタエンジンは、電子写真方式であれば、露光装置、感光体ドラム、現像装置、転写装置、定着装置等を備え、インクジェット方式であれば、インクタンク、ポンプ、吐出ヘッド等を備えることができる。   Although the printing apparatus 11 will not be described in detail, the hardware includes a controller including a CPU, ROM, RAM, HDD, and the like, a printer engine for executing printing, and a communication I / F for connecting to the network 12. Composed. The printer engine includes an exposure device, a photosensitive drum, a developing device, a transfer device, a fixing device, and the like in the case of an electrophotographic method, and may include an ink tank, a pump, a discharge head, and the like in the case of an ink jet method.

PC10に実装される上記の処理を実現するためのソフトウェアについて、図3を参照して説明する。PC10は、ソフトウェアとして、アプリケーション30、OS31、プリンタドライバ32を備える。アプリケーション30は、画像データを作成し、ユーザからの印刷指示を受けてOS31に対して印刷処理を要求する。OS31は、アプリケーション30やプリンタドライバ32が共通して利用する基本的な機能を提供する。このため、アプリケーション30やプリンタドライバ32は、OS31による制御の下で実行される。   Software for realizing the above-described processing implemented in the PC 10 will be described with reference to FIG. The PC 10 includes an application 30, an OS 31, and a printer driver 32 as software. The application 30 creates image data, and requests printing processing from the OS 31 in response to a print instruction from the user. The OS 31 provides basic functions that are commonly used by the application 30 and the printer driver 32. Therefore, the application 30 and the printer driver 32 are executed under the control of the OS 31.

プリンタドライバ32は、メモリの確保、画像の結合、描画処理、印刷コマンドの生成、印刷コマンドの送信等を行う。このため、プリンタドライバ32は、描画処理モジュール40、UIモジュール41、イメージ結合モジュール42、メモリ取得モジュール43、イメージ識別モジュール44を含んで構成される。   The printer driver 32 performs memory reservation, image combination, drawing processing, print command generation, print command transmission, and the like. Therefore, the printer driver 32 includes a drawing processing module 40, a UI module 41, an image combining module 42, a memory acquisition module 43, and an image identification module 44.

描画処理モジュール40は、OS31から画像データを印刷データとして取得し、その印刷データを描画処理し、描画処理されたデータを変換し、印刷装置11が解釈可能な印刷コマンドを生成するモジュールである。UIモジュール41は、アプリケーション30やOS31に対して印刷装置11が備える機能のリストを通知し、UIを提供してユーザとのやりとりを実現するためのモジュールである。   The drawing processing module 40 is a module that acquires image data from the OS 31 as print data, performs drawing processing on the print data, converts the drawn data, and generates a print command that can be interpreted by the printing apparatus 11. The UI module 41 is a module for notifying the application 30 and the OS 31 of a list of functions provided in the printing apparatus 11 and providing a UI to realize interaction with the user.

アプリケーション30やOS31は、サイズが大きい画像の画像データを扱う場合、メモリの制約等から画像データを複数に分割することがある。このように複数に分割された画像データは、描画処理モジュール40が受け取り、イメージ結合モジュール42を介してイメージ識別モジュール44に渡される。イメージ識別モジュール44は、複数に分割された画像データを1つずつ受け取り、画像データを解析し、その画像データを結合すべきか否か判断する。   When the application 30 or the OS 31 handles image data of a large image, the application 30 or the OS 31 may divide the image data into a plurality of parts due to memory restrictions or the like. The image data divided into a plurality of images is received by the drawing processing module 40 and passed to the image identification module 44 via the image combination module 42. The image identification module 44 receives image data divided into a plurality of pieces one by one, analyzes the image data, and determines whether the image data should be combined.

イメージ結合モジュール42は、イメージ識別モジュール44が結合すべきと判断した画像データを結合するため、結合した画像を保存するためのメモリの取得を、メモリ取得モジュール43に対して指示する。メモリ取得モジュール43は、イメージ結合モジュール42の指示に従って、メモリ33の所定サイズの領域を確保し、その領域を取得する。そして、メモリ取得モジュール43は、取得した領域をイメージ結合モジュール42に通知する。イメージ結合モジュール42は、メモリ取得モジュール43が取得したメモリ33の所定サイズの領域を使用し、結合すべきと判断された画像データを結合する処理を行う。   The image combination module 42 instructs the memory acquisition module 43 to acquire a memory for storing the combined image in order to combine the image data that the image identification module 44 has determined to combine. The memory acquisition module 43 secures an area of a predetermined size in the memory 33 in accordance with an instruction from the image combination module 42 and acquires the area. Then, the memory acquisition module 43 notifies the image combining module 42 of the acquired area. The image combining module 42 uses an area of a predetermined size in the memory 33 acquired by the memory acquisition module 43 and performs processing for combining image data determined to be combined.

描画処理モジュール40は、画像データを描画処理し、描画処理したデータをイメージ結合モジュール42に渡し、結合処理を実行させることができる。描画処理モジュール40は、イメージ結合モジュール42が結合したデータを受け取り、そのデータを変換して印刷コマンドを生成し、通信ポート34を介して印刷装置11へ送信する。通信ポート34は、図2に示す通信I/F24により提供されるUSBポートやLANポート等である。なお、通信ポート34は、印刷装置11が備える通信ポート50と接続される。   The drawing processing module 40 can draw image data, pass the drawn data to the image combining module 42, and execute the combining process. The drawing processing module 40 receives the data combined by the image combining module 42, converts the data to generate a print command, and transmits the print command to the printing apparatus 11 via the communication port 34. The communication port 34 is a USB port or a LAN port provided by the communication I / F 24 shown in FIG. The communication port 34 is connected to the communication port 50 provided in the printing apparatus 11.

このプリンタドライバ32により実現される機能の機能ブロックを図4に示す。プリンタドライバ32は、PC10に実装され、PC10により実行されて上記の機能が実現されるため、PC10がこれらの機能を備えるものとみることができる。PC10は、その機能を実現するための機能手段として、取得手段60、予測手段61、確保手段62、結合手段63を少なくとも含む。PC10は、そのほか、判断手段64、処理手段65、送信手段66を備えることができる。   FIG. 4 shows functional blocks of functions realized by the printer driver 32. Since the printer driver 32 is mounted on the PC 10 and executed by the PC 10 to realize the above functions, it can be considered that the PC 10 has these functions. The PC 10 includes at least an acquisition unit 60, a prediction unit 61, a securing unit 62, and a coupling unit 63 as functional units for realizing the function. In addition, the PC 10 can include a determination unit 64, a processing unit 65, and a transmission unit 66.

取得手段60は、図3に示すプリンタドライバ32の描画処理モジュール40により実現され、OS31から印刷データを取得する。印刷データは、画像データのほか、テキストデータ等を含んでいてもよい。取得手段60は、取得した印刷データを判断手段64に渡す。判断手段64は、イメージ識別モジュール44により実現され、印刷データが画像データかどうかを判断し、画像データである場合、その画像データが結合する最初の画像データかどうかを判断する。最初の画像データかどうかは、メモリに既に保存されている画像データと連続性を有する(繋がりがある)画像データかどうかにより判断することができる。したがって、メモリに記憶されている画像データがない場合は、最初の画像データであり、また、メモリに記憶されている画像データがあったとしても、その記憶されている画像データと連続性を有しない画像データは、最初の画像データである。   The acquisition unit 60 is realized by the drawing processing module 40 of the printer driver 32 illustrated in FIG. 3 and acquires print data from the OS 31. The print data may include text data and the like in addition to the image data. The acquisition unit 60 passes the acquired print data to the determination unit 64. The determination unit 64 is realized by the image identification module 44 and determines whether the print data is image data. If the print data is image data, the determination unit 64 determines whether the image data is the first image data to be combined. Whether the image data is the first image data can be determined based on whether the image data has continuity with the image data already stored in the memory. Therefore, if there is no image data stored in the memory, it is the first image data, and even if there is image data stored in the memory, it has continuity with the stored image data. The image data not to be processed is the first image data.

予測手段61は、イメージ識別モジュール44により実現され、最初の画像データの画像情報、または最初の画像データと次に取得された画像データの画像情報を用いて、複数の画像データを結合して保存するためのメモリサイズを予測する。画像情報は、具体的には画像の短辺と長辺を表す縦横の長さの情報、すなわちその長さの比(縦横比)、画像の種類を識別するための画像識別情報等である。これらの情報を用いてメモリサイズを計算することにより、取得すべきメモリサイズを予測することができる。なお、メモリサイズの計算方法については後述する。   The prediction means 61 is realized by the image identification module 44, and combines and stores a plurality of image data using the image information of the first image data or the image information of the first image data and the next acquired image data. Predict the memory size to do. Specifically, the image information is information on length and width representing the short side and long side of the image, that is, the ratio of the length (aspect ratio), image identification information for identifying the type of image, and the like. By calculating the memory size using these pieces of information, the memory size to be acquired can be predicted. A method for calculating the memory size will be described later.

予測手段61は、予測したメモリサイズを確保手段62に通知する。確保手段62は、メモリ取得モジュール43により実現され、通知されたメモリサイズのメモリを記憶装置内に確保する。記憶装置は、RAMやHDD等である。結合手段63は、イメージ結合モジュール42により実現され、確保されたメモリを使用し、そのメモリ上に画像データをコピーして結合する。画像データの結合は、例えば画像を構成する画素の座標を用いて行うことができる。結合手段63は、結合する画像データがなくなるまで結合処理を行い、全て結合したところで、処理手段65に対して結合した画像データの処理を依頼する。   The prediction unit 61 notifies the securing unit 62 of the predicted memory size. The securing means 62 is realized by the memory acquisition module 43 and secures a memory having the notified memory size in the storage device. The storage device is a RAM, an HDD, or the like. The combining means 63 is realized by the image combining module 42, uses a reserved memory, and copies and combines image data on the memory. The image data can be combined using, for example, the coordinates of the pixels constituting the image. The combining unit 63 performs a combining process until there is no image data to be combined, and requests all the combined image data from the processing unit 65 when all the images are combined.

処理手段65は、描画処理モジュール40により実現され、結合手段63からの処理の依頼を受け、結合した画像データを変換し、印刷装置11が解釈可能な印刷コマンドを生成する。そして、処理手段65は、その印刷コマンドの送信を送信手段66に依頼する。送信手段66は、描画処理モジュール40および通信ポート34により実現され、処理手段65からの依頼を受け、印刷装置11にその印刷コマンドを送信する。   The processing unit 65 is realized by the drawing processing module 40, receives a processing request from the combining unit 63, converts the combined image data, and generates a print command that can be interpreted by the printing apparatus 11. Then, the processing unit 65 requests the transmission unit 66 to transmit the print command. The transmission unit 66 is realized by the drawing processing module 40 and the communication port 34, receives a request from the processing unit 65, and transmits the print command to the printing apparatus 11.

ここで、図5を参照して、画像データを分割し、結合して印刷出力するまでの全体の処理の概略を説明する。ユーザは、PC10上でアプリケーション30を起動させ、図5に示すような画像データ70を表示させ、印刷を指示する。画像データ70は、写真データ等で、スキャナ装置で読み取ったデータであってもよいし、デジタルカメラで撮像したデータであってもよい。また、アプリケーション30を使用して一部を加工したものであってもよい。デジタルカメラで撮像した写真データは、縦横の画素(ピクセル)が4000を超えるものもあり、その場合、データサイズは数MBにもなる。すると、ユーザがアプリケーション30に対して印刷を要求した場合、アプリケーション30が画像データ70を複数に分割し、分割した複数の画像データを送信して印刷を指示することがある。   Here, with reference to FIG. 5, an outline of the entire processing from dividing image data to combining and printing out will be described. The user activates the application 30 on the PC 10, displays image data 70 as shown in FIG. 5, and instructs printing. The image data 70 may be photographic data or the like read by a scanner device, or may be data captured by a digital camera. Moreover, what processed some using the application 30 may be used. Some photographic data taken with a digital camera has more than 4000 vertical and horizontal pixels, and in this case, the data size is several MB. Then, when the user requests the application 30 to print, the application 30 may divide the image data 70 into a plurality of pieces and transmit the divided pieces of image data to instruct printing.

図5に示す例では、アプリケーション30において画像データ70が3つに分割されている。なお、この分割処理は、ユーザに意識させず、内部処理として実施される。3つに分割された各画像データ70a、70b、70cは、印刷処理のためにOS31に渡される。OS31は、アプリケーション30が1つの画像を3つに分割して出力していることは知らないので、各画像データ70a、70b、70cを独立した画像データとして印刷処理を行う。したがって、OS31からは、画像データ70a、70b、70cは、それぞれが関連のないデータである。   In the example shown in FIG. 5, the image data 70 is divided into three in the application 30. This division process is performed as an internal process without making the user aware of it. Each of the image data 70a, 70b, and 70c divided into three is transferred to the OS 31 for print processing. Since the OS 31 does not know that the application 30 outputs one image divided into three, the print processing is performed using the image data 70a, 70b, and 70c as independent image data. Therefore, from the OS 31, the image data 70a, 70b, and 70c are irrelevant data.

OS31は、印刷処理のために、画像データ70a、70b、70cをプリンタドライバ32に渡す。図5(a)に示す一般のプリンタドライバであれば、各画像データ70a、70b、70cを、別個に描画処理を行い、印刷コマンドに変換して、印刷装置11に送信する。印刷装置11は、印刷コマンドを取得した順番で用紙上に印刷して出力する。   The OS 31 passes the image data 70a, 70b, and 70c to the printer driver 32 for printing processing. In the case of the general printer driver shown in FIG. 5A, each image data 70 a, 70 b, 70 c is separately rendered, converted into a print command, and transmitted to the printing apparatus 11. The printing apparatus 11 prints and outputs on the paper in the order in which the print commands are acquired.

これに対し、図3に示すプリンタドライバ32を使用した場合、図5(b)に示すように、画像データにおける画像の幅(横)や高さ(縦)のサイズ(長さ)、変倍率、画像フォーマット(画像形式)、描画先の座標等から、画像データの連続姓を解析する。すなわち、繋がりがある画像であるかを判断する。ここで、連続性があると判断した場合、プリンタドライバ32においてメモリを確保し、画像データ70a、70b、70cの結合処理を行う。画像データの結合処理が終了すると、印刷コマンドを生成し、印刷装置11にその印刷コマンドを送信する。印刷装置11は、印刷コマンドに従って用紙上に印刷して出力する。   On the other hand, when the printer driver 32 shown in FIG. 3 is used, as shown in FIG. 5B, the width (horizontal) and height (vertical) size (length) of the image data, and the scaling ratio are used. Then, the last name of the image data is analyzed from the image format (image format), the coordinates of the drawing destination, and the like. That is, it is determined whether the image is connected. If it is determined that there is continuity, a memory is secured in the printer driver 32, and the image data 70a, 70b, and 70c are combined. When the image data combining process is completed, a print command is generated, and the print command is transmitted to the printing apparatus 11. The printing device 11 prints and outputs on paper according to a print command.

図6を参照して、図5(b)に示した画像データの結合処理の概要を説明する。取得手段60は、アプリケーション30が複数に分割した画像データを、1つずつOS31から印刷データとして取得する。図6に示す例では、分割した画像データの1つを、イメージ1として取得している。判断手段64は、以前に画像データをメモリに保存したかどうかを確認する。保存しておらず、最初の画像データである場合は、イメージ1をメモリに保存し、処理をOS31に戻す。このように、アプリケーション30から送出される画像データに対してプリンタドライバ32が処理を行うためには、画像データを一度メモリに書き込む必要がある。   With reference to FIG. 6, the outline of the image data combining process shown in FIG. 5B will be described. The acquisition unit 60 acquires image data divided into a plurality of pieces by the application 30 from the OS 31 one by one as print data. In the example illustrated in FIG. 6, one of the divided image data is acquired as an image 1. The determination unit 64 confirms whether the image data has been previously stored in the memory. If the image data is not stored and is the first image data, the image 1 is stored in the memory, and the process returns to the OS 31. Thus, in order for the printer driver 32 to process image data sent from the application 30, it is necessary to write the image data once in the memory.

処理をOS31に戻すと、OS31から次の印刷データを取得する。ここでは、次の印刷データも分割した画像データの1つであり、イメージ2として取得している。既にメモリにはイメージ1が保存されているので、判断手段64は、既に保存されているイメージ1と今回取得したイメージ2との連続性を解析する。連続性は、画像のサイズ、画像形式、描画先の座標等を参照し、繋がりがあるかどうかにより、その有無を判断することができる。連続性があると判断すると、予測手段61に通知し、予測手段61が保存用のメモリサイズを予測する。このメモリサイズは、通常はプリンタドライバ32内で設定した固定値のみであるが、ここでは画像のサイズ等から予測して算出される。   When the processing is returned to the OS 31, the next print data is acquired from the OS 31. Here, the next print data is also one of the divided image data, and is acquired as an image 2. Since the image 1 is already stored in the memory, the determination unit 64 analyzes the continuity between the already stored image 1 and the image 2 acquired this time. The continuity can be determined by referring to the size of the image, the image format, the coordinates of the drawing destination, and the like based on whether or not there is a connection. When it is determined that there is continuity, the prediction unit 61 is notified, and the prediction unit 61 predicts the memory size for storage. This memory size is usually only a fixed value set in the printer driver 32, but here it is calculated by prediction from the size of the image.

予測手段61は、予測したメモリサイズを確保手段62に通知し、確保手段62がそのサイズのメモリを確保する。確保手段62は、メモリ確保の際、メモリにおける連続したメモリ領域を確保する。詳細には、確保手段62は、イメージ1を書き込んだメモリ領域に連続し、そのメモリ領域を含む領域のサイズが上記の予測したメモリサイズになるように、メモリ領域を確保する。確保手段62は、メモリを取得した旨を結合手段63に通知し、結合手段63は、それを受けて、確保されたメモリ(連続したメモリ領域)上にイメージ1とイメージ2をコピーし、イメージ1とイメージ2を結合する。これにより、イメージ1とイメージ2は、メモリ上に結合して保存される。なお、イメージ1は、既に書き込まれているので、読み出してコピーする必要はなく、イメージ2のみをコピーし、結合してもよい。   The prediction unit 61 notifies the securing unit 62 of the predicted memory size, and the securing unit 62 reserves a memory of that size. The securing means 62 secures a continuous memory area in the memory when securing the memory. Specifically, the securing unit 62 secures the memory area so that the memory area is continuous with the memory area in which the image 1 is written, and the size of the area including the memory area is equal to the predicted memory size. The securing unit 62 notifies the combining unit 63 that the memory has been acquired, and the combining unit 63 receives the information and copies the image 1 and the image 2 onto the secured memory (consecutive memory area). Combine 1 and image 2. As a result, the image 1 and the image 2 are combined and stored on the memory. Since image 1 has already been written, there is no need to read and copy, and only image 2 may be copied and combined.

結合手段63は、結合処理が終了した後、判断手段64に終了した旨を通知し、判断手段64が、処理をOS31に戻す。処理をOS31に戻すと、OS31から次の印刷データを取得する。ここでは、次の印刷データも分割した画像データの1つであり、イメージ3として取得している。判断手段64は、上記と同様にして連続性を解析し、連続性があると判断した場合、上記で既にメモリを確保しているので、結合手段63に対してイメージ3の結合処理を依頼する。結合手段63は、確保手段62により確保されたメモリにイメージ1、イメージ2に続くようにイメージ3をコピーし、結合する。そして、同様にしてOS31に処理を戻す。   After the combining process is completed, the combining unit 63 notifies the determining unit 64 that the combining process has ended, and the determining unit 64 returns the process to the OS 31. When the processing is returned to the OS 31, the next print data is acquired from the OS 31. Here, the next print data is also one of the divided image data, and is acquired as an image 3. If the determination means 64 analyzes the continuity in the same manner as described above and determines that there is continuity, the determination means 64 has already secured the memory as described above, and therefore requests the combining means 63 to perform the image 3 combining processing. . The combining unit 63 copies the image 3 to the memory secured by the securing unit 62 so as to follow the image 1 and the image 2 and combines them. Similarly, the process is returned to the OS 31.

OS31から取得した印刷データが画像データでない場合や、画像データであってもイメージ1〜3と連続性がない場合は、処理手段65がメモリに保存された、結合された画像データを取得する。処理手段65は、その結合された画像データを変換して印刷コマンドを生成し、送信手段66に送信を依頼する。送信手段66は、その依頼を受けて、印刷装置11に印刷コマンドを送信して印刷を実行させる。送信手段66は、印刷コマンドを送信すると、送信した旨を確保手段62に通知し、確保手段62は、その通知を受けて、取得したメモリを開放する。   If the print data acquired from the OS 31 is not image data, or if the image data is not continuous with the images 1 to 3, the processing means 65 acquires the combined image data stored in the memory. The processing unit 65 converts the combined image data to generate a print command, and requests the transmission unit 66 to transmit it. In response to the request, the transmission unit 66 transmits a print command to the printing apparatus 11 to execute printing. When transmitting the print command, the transmitting unit 66 notifies the securing unit 62 of the transmission, and the securing unit 62 releases the acquired memory in response to the notification.

仮に、アプリケーション30により分割されていると考えられる画像データが最初に送出されてきた際に画像サイズを予測して連続したメモリ領域を確保しないものとすると、現在確保している領域の次の領域に他のアプリケーション等からのデータの書き込みがあった場合、連続する画像データがアプリケーション30から送出されてきても、上記の確保している領域に連続する次の領域にメモリ領域を確保することはできない。すると、他の領域に既に書き込まれている画像データと送出されてきた連続する画像データとを保存可能な充分なメモリ領域を新たに確保し、既に書き込まれているデータをその新たに確保した領域にコピーした上で、その新たに確保した領域へデータを書き込む必要があり、余分な処理が発生する。これに対し、上記のように画像サイズを予測して連続したメモリ領域を確保することで、このような余分な処理の発生をなくすことができる。   Assuming that when the image data considered to be divided by the application 30 is sent for the first time, the image size is predicted and the continuous memory area is not secured, the next area after the currently secured area When data is written from another application or the like, even if continuous image data is sent from the application 30, it is not possible to secure a memory area in the next area that is contiguous to the secured area. Can not. Then, a sufficient memory area that can store the image data already written in another area and the transmitted continuous image data is newly secured, and the data that has already been written is newly secured. In this case, it is necessary to write data to the newly secured area, and extra processing occurs. On the other hand, by generating a continuous memory area by predicting the image size as described above, it is possible to eliminate such extra processing.

図7に示すフローチャートを参照して、PC10が実行する処理の流れを詳細に説明する。ユーザからアプリケーション30に対して印刷が指示されたことを受けて、ステップ700からこの処理を開始する。ユーザは、起動するアプリケーション30上で印刷開始ボタンを押下する等して、印刷を指示する。アプリケーション30は、その印刷指示を受けて、OS31に対して印刷処理を要求する。その際、アプリケーション30は、大きい画像を扱う場合、画像を複数に分割することがある。OS31は、アプリケーション30から印刷要求を受け、印刷処理を開始する。   With reference to the flowchart shown in FIG. 7, the flow of processing executed by the PC 10 will be described in detail. In response to a print instruction from the user to the application 30, this process is started from step 700. The user instructs printing by pressing a print start button on the application 30 to be activated. In response to the print instruction, the application 30 requests the OS 31 for print processing. At that time, when the application 30 handles a large image, the application 30 may divide the image into a plurality of parts. The OS 31 receives a print request from the application 30 and starts print processing.

ステップ701では、取得手段60が、OS31から印刷データを取得する。ステップ702では、判断手段64が、印刷データが写真等の画像データであるかどうかを判断する。画像データかどうかは、例えばデータのサイズやフォーマット等から判断することができる。取得した印刷データが画像データであった場合、ステップ703へ進み、以前に画像データをメモリに保存しているかどうかを判断する。保存していない場合、ステップ704へ進み、その画像データをメモリに保存し、処理をOS31に戻す。ステップ703でメモリに保存している場合、ステップ705へ進み、その保存された画像データと今回OS31から取得された画像データの連続性を解析する。   In step 701, the acquisition unit 60 acquires print data from the OS 31. In step 702, the determination unit 64 determines whether the print data is image data such as a photograph. Whether it is image data can be determined from the size and format of the data, for example. If the acquired print data is image data, the process proceeds to step 703 to determine whether the image data has been previously stored in the memory. If not saved, the process proceeds to step 704, where the image data is saved in the memory, and the process returns to the OS 31. If the image data is stored in the memory in step 703, the process proceeds to step 705, where the continuity between the stored image data and the image data acquired from the current OS 31 is analyzed.

ここでは、メモリ取得の効率化のため、画像データに連続性があると確定してから結合用のメモリを取得するようにしているが、最初の画像データを取得したときに、その画像データのみで結合後のデータサイズを予測してもよい。   Here, in order to increase the efficiency of memory acquisition, it is determined that image data has continuity, and then the memory for combination is acquired. However, when the first image data is acquired, only that image data is acquired. The data size after the combination may be predicted by.

ステップ706では、連続性を解析した結果に基づき、これら2つの画像データが結合可能かどうかを判断する。連続性があり、結合可能である場合、ステップ707へ進み、画像の種類の1つである自然画像かどうかを判断する。すなわち、画像データがデジタルカメラ等で撮像された自然画像か、別の種類の図形等から作成された人工画像かを判断する。なお、写真である場合、さらに風景画(ランドスケープ)か人物画(ポートレート)かの判断も行う。自然画像である場合、ステップ708へ進み、人工画像である場合、ステップ709へ進む。   In step 706, based on the result of analyzing the continuity, it is determined whether or not these two image data can be combined. If the image is continuous and can be combined, the process proceeds to step 707 to determine whether the image is a natural image that is one of image types. That is, it is determined whether the image data is a natural image captured by a digital camera or the like, or an artificial image created from another type of figure or the like. In the case of a photograph, it is further determined whether it is a landscape image (landscape) or a portrait image (portrait). If it is a natural image, the process proceeds to step 708, and if it is an artificial image, the process proceeds to step 709.

ステップ708では、画像が自然画像である場合、写真である可能性が高いため、予測手段61が、短辺:長辺が2:3や3:4といった写真データの縦横比に決定し、その縦横比に基づき、保存に必要なメモリサイズを予測する。結合した元の画像は、その縦横比になると予測できるからである。必要なサイズは、取得する画像データにおける画像のサイズや画像形式、上記の風景画か人物画かにより予測する。   In step 708, if the image is a natural image, there is a high possibility that the image is a photo. Therefore, the predicting means 61 determines the aspect ratio of the photo data such that the short side: the long side is 2: 3 or 3: 4. Based on the aspect ratio, the memory size required for storage is predicted. This is because the combined original image can be predicted to have the aspect ratio. The required size is predicted based on the size and format of the image in the acquired image data, and whether it is a landscape image or a portrait image.

予測手段61は、例えば、風景画であればランドスケープ(横長の画像)で、縦:横を2:3または3:4の比率の画像と判断し、人物画であればポートレート(縦長の画像)で、縦:横を3:2または4:3の比率の画像と判断することができる。この判断により縦横比を決定すると、現在取得している画像サイズが同じとき、人物画は、風景画に比較して確保すべきメモリ領域が大きくなる。   For example, the predicting unit 61 determines that the landscape image is a landscape (horizontal image), and the portrait: landscape is an image having a ratio of 2: 3 or 3: 4. ), It can be determined that the image has a ratio of 3: 2 or 4: 3. When the aspect ratio is determined based on this determination, when the currently acquired image size is the same, the human image has a larger memory area to be secured than the landscape image.

人物画と判断しても、その画像がどの程度縦長の画像であるかは分からない。そこで、上記のうちの最も大きいメモリ領域を確保することとなる縦:横が3:2の比率の画像と推測する等、自然画像の場合に固定の縦横比でメモリ領域の確保を行ってもよい。このように、メモリが足りなくなることを想定し、ポートレートと想定し、最も大きいメモリサイズを予測することが望ましい。しかしながら、上記のランドスケープかポートレートかの判断でランドスケープと判断された場合は、ランドスケープ画像としてメモリサイズを予測することができる。   Even if it is determined to be a portrait, it is not known how long the image is. Therefore, even in the case of a natural image, it is possible to secure a memory area with a fixed aspect ratio, such as inferring that the image has a ratio of vertical: horizontal of 3: 2 that will secure the largest memory area among the above. Good. As described above, assuming that the memory is insufficient, it is desirable to estimate the largest memory size assuming a portrait. However, if it is determined to be a landscape by the above-described determination of landscape or portrait, the memory size can be predicted as a landscape image.

写真データとしては、デジタルカメラで撮像されたもののほか、ファックス装置で受信したものや、スキャナ装置で読み込まれたものも存在する。ファックス装置で受信したデータやスキャナ装置で読み込まれたデータの場合、上記の写真データの縦横比ではなく、汎用の用紙サイズの縦横比で見積もることもできる。用紙の縦横比は、用紙の種類、すなわちA版、B版、Letter等によって異なるため、その用紙を使用する国等によって適宜変更することができる。なお、スキャナ装置で読み込まれたデータか否かは、画像解析において画像データにおける画像に余白が存在するか否か等により判断することができる。   Photo data includes those captured by a digital camera, those received by a fax machine, and those read by a scanner device. In the case of data received by a fax machine or data read by a scanner, it can be estimated by the aspect ratio of a general-purpose paper size instead of the above aspect ratio of photo data. The aspect ratio of the paper varies depending on the type of paper, that is, the A plate, B plate, Letter, and the like, and can be appropriately changed depending on the country or the like where the paper is used. Whether or not the data is read by the scanner device can be determined based on whether or not there is a margin in the image of the image data in the image analysis.

ステップ709では、画像が人工画像である場合、画像の縦横比が任意に設定される可能性が高いため、プリンタドライバ32が規定したメモリサイズ(固定サイズ)を取得用のメモリサイズとして予測することができる。ステップ710では、確保手段62が、ステップ708またはステップ709で予測されたメモリサイズのメモリ、すなわちメモリにおける連続したメモリ領域を確保する。そして、ステップ711で、結合手段63が、保存した画像データとOS31から取得した画像データとを、取得したメモリにコピーし、これら画像データを結合する。   In step 709, if the image is an artificial image, it is highly likely that the aspect ratio of the image is arbitrarily set, so the memory size (fixed size) defined by the printer driver 32 is predicted as the memory size for acquisition. Can do. In step 710, the securing unit 62 secures a memory having the memory size predicted in step 708 or 709, that is, a continuous memory area in the memory. In step 711, the combining unit 63 copies the stored image data and the image data acquired from the OS 31 to the acquired memory, and combines these image data.

画像データの結合が終了すると、今回取得した画像データに関する処理は終了し、ステップ701へ戻り、OS31からの次の印刷データを待つ。次の印刷データを取得し、取得した印刷データが画像データである場合、ステップ702以降の処理を繰り返す。   When the combination of the image data is completed, the process related to the image data acquired this time is completed, and the process returns to step 701 to wait for the next print data from the OS 31. The next print data is acquired, and if the acquired print data is image data, the processes in and after step 702 are repeated.

ステップ706で2つの画像データを結合することができないと判断された場合、ステップ712へ進み、処理手段65が、メモリに保存されている画像データを変換して印刷コマンドを生成する。メモリに保存されている画像データは、独立した画像データと考えられるからである。そして、ステップ713で、送信手段66が、その印刷コマンドを印刷装置11に送信する。ステップ714では、確保手段62が、保存されている画像に対して取得したメモリを開放し、ステップ715において、判断手段64が、今回取得した画像データを開放したメモリに保存する。すなわち、メモリを再利用する。メモリに保存したところで、ステップ701へ戻り、OS31からの印刷データを待つ。   If it is determined in step 706 that the two image data cannot be combined, the process proceeds to step 712, where the processing means 65 converts the image data stored in the memory to generate a print command. This is because the image data stored in the memory is considered as independent image data. In step 713, the transmission unit 66 transmits the print command to the printing apparatus 11. In step 714, the securing unit 62 releases the acquired memory for the stored image, and in step 715, the determining unit 64 stores the currently acquired image data in the released memory. That is, the memory is reused. When the data is stored in the memory, the process returns to step 701 and waits for print data from the OS 31.

ステップ702で取得した印刷データが画像データではない場合、例えばテキストデータ等の場合、ステップ716へ進み、メモリに保存されている画像データが存在するかを判断する。保存されている場合は、ステップ717へ進み、処理手段65が、保存されている画像データを変換して印刷コマンドを生成する。そして、ステップ718で、送信手段66が、その印刷コマンドを印刷装置11に送信する。ステップ719では、確保手段62が、保存されている画像データに対して取得したメモリを開放する。   If the print data acquired in step 702 is not image data, for example, if it is text data, the process proceeds to step 716 to determine whether there is image data stored in the memory. If it is stored, the process proceeds to step 717, and the processing means 65 converts the stored image data to generate a print command. In step 718, the transmission unit 66 transmits the print command to the printing apparatus 11. In step 719, the securing unit 62 releases the acquired memory for the stored image data.

ステップ716において保存されている画像データが存在しない場合や、ステップ719でメモリを開放した後、ステップ720で、処理手段65が、今回取得した画像データではない印刷データを変換して印刷コマンドを生成する。そして、ステップ721で、送信手段66が、その印刷コマンドを印刷装置11に送信する。   If there is no image data stored in step 716, or after the memory is released in step 719, in step 720, the processing means 65 converts the print data that is not the image data acquired this time to generate a print command. To do. In step 721, the transmission unit 66 transmits the print command to the printing apparatus 11.

ステップ722では、判断手段64が、印刷データの最終ページの印刷コマンドを送信したかを判断する。最終ページか否かは、これまでに送信した印刷コマンドの数と、印刷要求により与えられる全ページ数とが一致するかどうかに判断することができる。最終ページではないと判断した場合、ステップ701へ戻り、取得手段60が、OS31から次の印刷データを取得する。最終ページと判断した場合、ステップ723へ進み、処理手段65が、排紙先を指定する排紙コマンドを生成し、送信手段66が、その排紙コマンドを印刷装置11に送信する。排紙コマンドを送信したところで、ステップ724へ進み、この処理を終了する。   In step 722, the determination unit 64 determines whether the print command for the last page of the print data has been transmitted. Whether it is the last page or not can be determined whether or not the number of print commands transmitted so far matches the number of all pages given by the print request. If it is determined that the page is not the last page, the process returns to step 701, and the acquisition unit 60 acquires the next print data from the OS 31. If it is determined that the page is the last page, the process proceeds to step 723, where the processing unit 65 generates a paper discharge command for designating a paper discharge destination, and the transmission unit 66 transmits the paper discharge command to the printing apparatus 11. When the paper discharge command is transmitted, the process proceeds to step 724 and the process is terminated.

図8を参照して、複数に分割された画像データを結合する処理について詳細に説明する。アプリケーション30は、画像データを3つに分割し、プリンタドライバ32は、OS31から分割された各画像データとしてイメージ1〜イメージ3を順に取得するものとする。プリンタドライバ32は、イメージ1とイメージ2を取得したとき、最終的に画像がどの程度の大きさになるかを予測する。   With reference to FIG. 8, a process for combining the image data divided into a plurality of parts will be described in detail. The application 30 divides the image data into three, and the printer driver 32 acquires the images 1 to 3 in order as the divided image data from the OS 31. When the printer driver 32 acquires the image 1 and the image 2, the printer driver 32 predicts how much the image will finally become.

ここでは、画像データを写真データとし、図8(a)に示すように、高さが最も高くなるように縦横比を2:3で予測し、保存するメモリを確保する。確保できたら、イメージ1とイメージ2をメモリにコピーし、それらを結合する。そして、残りのイメージ3をメモリにコピーし、さらに結合する。図8(a)では、メモリに余りが生じているが、プリンタドライバ32に規定されているメモリサイズより小さいので、メモリの使用効率を向上させることができる。   Here, the image data is taken as photo data, and as shown in FIG. 8A, the aspect ratio is predicted at 2: 3 so that the height is the highest, and a memory to be stored is secured. Once secured, copy image 1 and image 2 to memory and combine them. The remaining image 3 is then copied to the memory and further combined. In FIG. 8A, the memory has a surplus, but the memory size is smaller than the memory size defined in the printer driver 32, so that the memory use efficiency can be improved.

上記の写真データが画像判別によりランドスケープと判断した場合、図8(b)に示すように、ランドスケープ用の縦横比3:2でメモリサイズを予測し、保存するメモリを確保することができる。この場合も同様に、メモリを確保できたら、イメージ1とイメージ2をメモリにコピーし、それらを結合する。そして、残りのイメージ3をメモリにコピーし、さらに結合する。イメージはイメージ3までであるので、確保したメモリサイズと結合した画像データのサイズが同一であり、理想的である。イメージ4がある場合、確保したメモリサイズではイメージ4を結合することができないので、別途そのサイズより大きいメモリを確保し、そこにイメージ1〜イメージ3をコピーし、それに続けてイメージ4をコピーして結合する。イメージ5以降がある場合も同様にして、結合できればそのメモリにコピーして結合し、結合できなければ別途メモリを確保する。   When the above photographic data is determined to be a landscape by image discrimination, as shown in FIG. 8B, the memory size can be predicted with a landscape aspect ratio of 3: 2, and a memory to be stored can be secured. Similarly in this case, when the memory can be secured, the image 1 and the image 2 are copied to the memory and combined. The remaining image 3 is then copied to the memory and further combined. Since the image is up to image 3, the size of the image data combined with the reserved memory size is the same, which is ideal. If image 4 is present, image 4 cannot be combined with the reserved memory size. Therefore, a memory larger than that size is secured separately, and images 1 to 3 are copied there, and then image 4 is copied. And combine. Similarly, when there is an image 5 or later, if it can be combined, it is copied and combined into that memory, and if it cannot be combined, a separate memory is secured.

イメージ1〜イメージ3は、逆順で結合されるような場合でも、図8(c)に示すように、メモリの逆から順にコピーして結合していくので、処理上の不都合は発生しない。   Even when the images 1 to 3 are combined in the reverse order, as shown in FIG. 8C, since they are copied and combined in order from the reverse of the memory, there is no inconvenience in processing.

イメージ1〜イメージ3の幅は上記と同じ幅であるが、高さが高いイメージである場合、イメージ1とイメージ2の結合により、縦横比3:2に対し、高さがそれ以上になることがある。その場合は、ランドスケープであっても、ポートレートと判断し、図8(d)に示すように、縦横比2:3でメモリサイズを予測し、そのサイズのメモリを確保することができる。メモリを確保できたら、イメージ1とイメージ2をコピーして結合し、イメージ3をさらにコピーして結合する。   The width of image 1 to image 3 is the same width as above, but if the image is high in height, the height is more than the aspect ratio of 3: 2 due to the combination of image 1 and image 2. There is. In this case, even a landscape can be determined as a portrait, and as shown in FIG. 8D, a memory size can be predicted with an aspect ratio of 2: 3, and a memory of that size can be secured. When the memory is secured, image 1 and image 2 are copied and combined, and image 3 is further copied and combined.

図8に示した例では、縦方向の画像の結合処理に関して記載したが、縦長の画像の横方向の結合でも、左から右へ、もしくは右から左へ、上記と同様の方法により結合処理を行うことができる。   In the example shown in FIG. 8, description has been made regarding the combination processing of the images in the vertical direction. However, even in the combination of the vertical images in the horizontal direction, the combination processing is performed from the left to the right or from the right to the left by the same method as described above. It can be carried out.

これまでは、画像データの結合処理を概念的に説明してきたが、図9を参照し、数値を使用して具体的に説明する。アプリケーション30は、画像データを複数に分割し、OS31に処理を指示する。取得手段60は、OS31から印刷データを取得する。ここでは、印刷データが画像データで、イメージ1として取得している。この取得したイメージ1は、画像の幅が3000pixel、高さが500pixel、画像形式が24bit/pixelであるものとする。画像形式が24bit/pixelであるので、フルカラー画像であり、各画素は、3バイトのデータを持っている。したがって、このイメージ1のデータサイズは、3000×500×3=4500000バイトである。また、イメージ1は、印刷装置11では座標(0,0)から幅3000pixel、高さ500pixelで描画されるように規定されている。   Up to now, the image data combining process has been conceptually described, but a specific description will be given using numerical values with reference to FIG. The application 30 divides the image data into a plurality of parts and instructs the OS 31 to perform processing. The acquisition unit 60 acquires print data from the OS 31. Here, the print data is image data and is acquired as image 1. This acquired image 1 has an image width of 3000 pixels, a height of 500 pixels, and an image format of 24 bits / pixel. Since the image format is 24 bits / pixel, it is a full-color image, and each pixel has 3 bytes of data. Therefore, the data size of this image 1 is 3000 × 500 × 3 = 4500000 bytes. Further, the image 1 is defined to be drawn with a width of 3000 pixels and a height of 500 pixels from the coordinates (0, 0) in the printing apparatus 11.

取得手段60は、続いてOS31から次の印刷データを取得する。ここでは、印刷データが画像データで、イメージ2として取得している。このイメージ2も、イメージ1と同様、画像の幅が3000pixel、高さが500pixel、画像形式が24bit/pixelであるものとする。したがって、イメージ2も、フルカラー画像で、データサイズが4500000バイトである。ただし、イメージ2は、印刷装置11で座標(0,500)から幅3000pixel、高さ500pixelで描画されるように規定されている。   The acquisition unit 60 then acquires the next print data from the OS 31. Here, the print data is image data and is acquired as an image 2. Similarly to the image 1, the image 2 is assumed to have an image width of 3000 pixels, a height of 500 pixels, and an image format of 24 bits / pixel. Therefore, the image 2 is also a full-color image and has a data size of 4.500000 bytes. However, the image 2 is defined to be drawn with a width of 3000 pixels and a height of 500 pixels from the coordinates (0,500) by the printing apparatus 11.

判断手段64は、これらの情報からイメージ1とイメージ2が連続性を有するかどうかを判断する。これら2つの画像データは、画像の幅が同じで、描画先で縦方向に連続して描画され、画像形式が同じ24bit/pixelであることから、連続性があると判断する。次に、イメージ1およびイメージ2を調査し、どのような画像であるかを判断する。例えば、イメージ1およびイメージ2が画像の大半を青色で占められ、人工的なべた塗り領域がないとする。これらの情報を画像識別情報とし、この画像識別情報から自然画像で、風景画であると判断することができる。このため、写真の方向は、縦横比が3:2のランドスケープと推測することができる。   The determination means 64 determines whether or not the image 1 and the image 2 have continuity from these pieces of information. These two image data have the same image width, are continuously drawn in the vertical direction at the drawing destination, and have the same image format of 24 bits / pixel. Therefore, it is determined that there is continuity. Next, image 1 and image 2 are examined to determine what kind of image they are. For example, it is assumed that the image 1 and the image 2 are mostly blue, and there is no artificial solid area. These pieces of information can be used as image identification information, and it can be determined from this image identification information that the image is a natural image and a landscape image. For this reason, the direction of the photograph can be estimated as a landscape having an aspect ratio of 3: 2.

したがって、画像中に人物が存在し、人工的なべた塗り領域がない場合は、自然画像で、人物画であると判断することができる。人物が存在するか否かは、これまでに知られた顔認識等の技術を使用して判断することができる。   Therefore, when a person is present in the image and there is no artificial solid area, it can be determined that the image is a natural image and a person image. Whether or not a person exists can be determined using a technique such as face recognition that has been known so far.

予測手段61は、これらの結果から、最終的な写真がどのようなサイズの画像になるかを予測する。この例では、写真画像としては最も縦横比が小さい3:2で予測し、縦方向に結合され、その幅が3000pixelであることから、その高さは、3000/3×2=2000pixelと算出される。したがって、必要なメモリは、3000×2000×3=18000000バイトということになる。このように予測したサイズのメモリ、すなわち18000000バイト分のメモリを確保する。   The prediction means 61 predicts the size of the final photo from these results. In this example, the photographic image is predicted with the smallest aspect ratio of 3: 2, and is combined in the vertical direction, and its width is 3000 pixels, so the height is calculated as 3000/3 × 2 = 2000 pixels. The Therefore, the necessary memory is 3000 × 2000 × 3 = 18000000 bytes. The memory of the predicted size, that is, the memory for 18000000 bytes is secured.

この確保したメモリにイメージ1とイメージ2を続けてコピーし、これらを結合する。これらのコピーにより、メモリは、18000000バイトのうち、3000×1000×3=9000000バイト分が埋められる。これにイメージ3、イメージ4という結合可能な同じサイズのデータが取得されれば、この取得したメモリに順次コピーし、結合していく。このようにして、イメージ1〜イメージ4を結合すると、最終的に18000000バイトのデータとなる。   Image 1 and image 2 are subsequently copied to this secured memory and combined. These copies fill the memory with 3000 × 1000 × 3 = 9000000 bytes of the 18000000 bytes. If data of the same size that can be combined, that is, the image 3 and the image 4 are acquired, the data is sequentially copied to the acquired memory and combined. When images 1 to 4 are combined in this way, the final data becomes 18000000 bytes.

画像データがランドスケープの写真サイズのデータであれば、上記のようにメモリに余りがないため、メモリは最も良い効率で使用されたことになる。メモリ上で結合されたデータは変換されて印刷コマンドが生成され、その印刷コマンドが印刷装置11へ送信される。   If the image data is landscape-sized data, there is not much memory in the memory as described above. Therefore, the memory is used with the highest efficiency. The data combined on the memory is converted to generate a print command, and the print command is transmitted to the printing apparatus 11.

以上に説明してきたように、アプリケーション30で複数に分割された画像データを取得する場合に、取得した画像データの1つあるいは2つから、元の画像データの画像のサイズを予測する。これにより、画像の結合が必要な場合に、処理用に取得するメモリを最小限の量で済ますことができる。また、必要なメモリ量を予測して取得するので、画像データを取得する毎にメモリを拡張するという従来の方式に比較して、メモリの再取得も発生しにくくなり、プリンタドライバ32の処理でメモリを無駄に消費することもなくなる。   As described above, when the application 30 acquires image data divided into a plurality of pieces, the image size of the original image data is predicted from one or two of the acquired image data. This allows a minimum amount of memory to be acquired for processing when image merging is required. Further, since the necessary amount of memory is predicted and acquired, re-acquisition of the memory is less likely to occur compared to the conventional method of expanding the memory every time image data is acquired. Memory is not wasted.

これまで本発明を、情報処理装置、プログラム、画像処理方法および画像処理システムとして上述した実施の形態をもって説明してきたが、本発明は上述した実施の形態に限定されるものではない。本発明は、他の実施の形態、追加、変更、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。したがって、本発明は、上記のプログラムが記録された記録媒体、そのプログラムを、ネットワークを介して提供する外部機器等も提供することができるものである。   The present invention has been described with the above-described embodiments as an information processing apparatus, a program, an image processing method, and an image processing system, but the present invention is not limited to the above-described embodiments. The present invention can be modified within a range that can be conceived by those skilled in the art, such as other embodiments, additions, modifications, and deletions, and the present invention is not limited as long as the operations and effects of the present invention are exhibited in any aspect. It is included in the scope of the invention. Therefore, the present invention can also provide a recording medium on which the above program is recorded, an external device that provides the program via a network, and the like.

10…PC、11…印刷装置、12…ネットワーク、20…CPU、21…ROM、22…RAM、23…HDD、24…通信I/F、25…入出力I/F、26…入力装置、27…表示装置、28…バス、30…アプリケーション、31…OS、32…プリンタドライバ、33…メモリ、34…通信ポート、40…描画処理モジュール、41…UIモジュール、42…イメージ結合モジュール、43…メモリ取得モジュール、44…イメージ識別モジュール、50…通信ポート、60…取得手段、61…予測手段、62…確保手段、63…結合手段、64…判断手段、65…処理手段、66…送信手段、70、70a、70b、70c…画像データ、 DESCRIPTION OF SYMBOLS 10 ... PC, 11 ... Printing apparatus, 12 ... Network, 20 ... CPU, 21 ... ROM, 22 ... RAM, 23 ... HDD, 24 ... Communication I / F, 25 ... Input / output I / F, 26 ... Input device, 27 ... Display device, 28 ... Bus, 30 ... Application, 31 ... OS, 32 ... Printer driver, 33 ... Memory, 34 ... Communication port, 40 ... Drawing processing module, 41 ... UI module, 42 ... Image combination module, 43 ... Memory Acquisition module 44 ... Image identification module 50 ... Communication port 60 ... Acquisition means 61 ... Prediction means 62 ... Securing means 63 ... Coupling means 64 ... Judgment means 65 ... Processing means 66 ... Transmission means 70 , 70a, 70b, 70c ... image data,

特開2003−308189号公報JP 2003-308189 A

Claims (15)

複数の画像データを結合する処理を行う情報処理装置であって、
前記複数の画像データを第1の画像データから順に取得する取得手段と、
前記取得手段により取得された前記第1の画像データの画像情報、または該第1の画像データと次に取得された第2の画像データの画像情報を用いて、前記複数の画像データを結合して記憶するための記憶領域のサイズを予測する予測手段と、
前記予測手段により予測されたサイズの記憶領域を記憶装置内に確保する確保手段と、
前記確保手段により確保された前記記憶領域に前記複数の画像データを結合して記憶させる結合手段とを含む、情報処理装置。
An information processing apparatus that performs processing for combining a plurality of image data,
Acquisition means for acquiring the plurality of image data in order from the first image data;
The plurality of image data are combined using the image information of the first image data acquired by the acquisition unit or the image information of the first image data and the second image data acquired next. Predicting means for predicting the size of the storage area for storing
Securing means for securing a storage area of the size predicted by the prediction means in the storage device;
An information processing apparatus comprising: a combining unit configured to combine and store the plurality of image data in the storage area secured by the securing unit.
前記画像情報は、画像の短辺と長辺を表す縦横の長さの情報を含み、
前記予測手段は、写真または用紙の短辺と長辺の比である縦横比に基づき、前記縦横の長さの情報を用いて前記記憶領域のサイズを予測する、請求項1に記載の情報処理装置。
The image information includes length and width information representing a short side and a long side of the image,
2. The information processing according to claim 1, wherein the predicting unit predicts the size of the storage area using the length and width information based on an aspect ratio that is a ratio of a short side to a long side of a photograph or paper. apparatus.
前記用紙の縦横比は、使用する用紙の種類に応じて設定される、請求項2に記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the aspect ratio of the paper is set according to a type of paper to be used. 前記画像情報は、画像の種類を識別するための画像識別情報をさらに含み、
前記予測手段は、前記画像識別情報に応じて、前記縦横比を決定し、決定した該縦横比に基づき、前記記憶領域のサイズを予測する、請求項2または3に記載の情報処理装置。
The image information further includes image identification information for identifying the type of image,
The information processing apparatus according to claim 2, wherein the prediction unit determines the aspect ratio according to the image identification information, and predicts a size of the storage area based on the determined aspect ratio.
前記取得手段により取得された前記画像データの画像情報と、確保された前記記憶領域に記憶された画像データの画像情報とを参照し、前記取得手段により取得された前記画像データを前記記憶領域に記憶された画像データに結合するか否かを判断する判断手段を含む、請求項1〜4のいずれか1項に記載の情報処理装置。   The image information of the image data acquired by the acquisition unit and the image information of the image data stored in the secured storage area are referred to, and the image data acquired by the acquisition unit is stored in the storage area. The information processing apparatus according to claim 1, further comprising a determination unit that determines whether or not to combine the stored image data. 前記情報処理装置は、前記確保手段により確保された前記記憶領域を、次の複数の画像データを結合する処理に使用する、請求項1〜5のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the information processing apparatus uses the storage area secured by the securing unit for a process of combining the next plurality of image data. 前記記憶領域に記憶された、結合された画像データを用いて画像形成装置に画像形成処理を実行させるための命令を生成する処理手段と、前記処理手段により生成された前記命令を前記画像形成装置に送信する送信手段とをさらに含む、請求項1〜6のいずれか1項に記載の情報処理装置。   Processing means for generating an instruction for causing the image forming apparatus to execute an image forming process using the combined image data stored in the storage area, and the instruction generated by the processing means for the image forming apparatus The information processing apparatus according to claim 1, further comprising: a transmitting unit that transmits the information to the information processing apparatus. 複数の画像データを結合する処理をコンピュータに実行させるためのプログラムであって、
前記複数の画像データを第1の画像データから順に取得するステップと、
取得された前記第1の画像データの画像情報、または該第1の画像データと次に取得された第2の画像データの画像情報を用いて、前記複数の画像データを結合して記憶するための記憶領域のサイズを予測するステップと、
予測されたサイズの記憶領域を記憶装置内に確保するステップと、
確保された前記記憶領域に前記複数の画像データを結合して記憶させるステップとを実行させる、プログラム。
A program for causing a computer to execute a process of combining a plurality of image data,
Obtaining the plurality of image data in order from the first image data;
To combine and store the plurality of image data using the acquired image information of the first image data or the first image data and the image information of the second image data acquired next. Predicting the size of the storage area of
Securing a storage area of the predicted size in the storage device;
A program for executing the step of combining and storing the plurality of image data in the reserved storage area.
前記画像情報は、画像の短辺と長辺を表す縦横の長さの情報を含み、
前記予測するステップでは、写真または用紙の短辺と長辺の比である縦横比に基づき、前記縦横の長さの情報を用いて前記記憶領域のサイズを予測する、請求項8に記載のプログラム。
The image information includes length and width information representing a short side and a long side of the image,
9. The program according to claim 8, wherein, in the predicting step, the size of the storage area is predicted using information on the length and width based on an aspect ratio that is a ratio of a short side to a long side of a photograph or paper. .
前記用紙の縦横比は、使用する用紙の種類に応じて設定される、請求項9に記載のプログラム。   The program according to claim 9, wherein the aspect ratio of the paper is set according to a type of paper to be used. 前記画像情報は、画像の種類を識別するための画像識別情報をさらに含み、
前記予測するステップでは、前記画像識別情報に応じて、前記縦横比を決定し、決定した該縦横比に基づき、前記記憶領域のサイズを予測する、請求項9または10に記載のプログラム。
The image information further includes image identification information for identifying the type of image,
The program according to claim 9 or 10, wherein in the predicting step, the aspect ratio is determined according to the image identification information, and the size of the storage area is predicted based on the determined aspect ratio.
取得された前記画像データの画像情報と、確保された前記記憶領域に記憶された画像データの画像情報とを参照し、取得された前記画像データを前記記憶領域に記憶された画像データに結合するか否かを判断するステップをさらに実行させる、請求項8〜11のいずれか1項に記載のプログラム。   Refer to the image information of the acquired image data and the image information of the image data stored in the secured storage area, and combine the acquired image data with the image data stored in the storage area The program according to any one of claims 8 to 11, further executing a step of determining whether or not. 前記記憶領域に記憶された、結合された画像データを用いて印刷装置に印刷を実行させるための命令を生成するステップと、生成された前記命令を前記印刷装置に送信するステップとをさらに実行させる、請求項8〜12のいずれか1項に記載のプログラム。   Generating a command for causing the printing apparatus to execute printing using the combined image data stored in the storage area; and transmitting the generated command to the printing apparatus. The program according to any one of claims 8 to 12. 請求項7に記載の情報処理装置と、受信した命令に従って画像形成処理を行う画像形成装置とを含む、画像処理システム。   An image processing system, comprising: the information processing apparatus according to claim 7; and an image forming apparatus that performs an image forming process according to a received command. 複数の画像データを結合する画像処理方法であって、
前記複数の画像データを第1の画像データから順に取得するステップと、
取得された前記第1の画像データの画像情報、または該第1の画像データと次に取得された第2の画像データの画像情報を用いて、前記複数の画像データを結合して記憶するための記憶領域のサイズを予測するステップと、
予測されたサイズの記憶領域を記憶装置内に確保するステップと、
確保された前記記憶領域に前記複数の画像データを結合して記憶させるステップとを含む、画像処理方法。
An image processing method for combining a plurality of image data,
Obtaining the plurality of image data in order from the first image data;
To combine and store the plurality of image data using the acquired image information of the first image data or the first image data and the image information of the second image data acquired next. Predicting the size of the storage area of
Securing a storage area of the predicted size in the storage device;
Combining the plurality of image data to be stored in the secured storage area.
JP2016141263A 2015-09-09 2016-07-19 Information processing apparatus, program, image processing method, and image processing system Pending JP2017054490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/249,917 US9942441B2 (en) 2015-09-09 2016-08-29 Information processing apparatus configured to predict a size of a storage-use region , method, image processing system, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015177609 2015-09-09
JP2015177609 2015-09-09

Publications (1)

Publication Number Publication Date
JP2017054490A true JP2017054490A (en) 2017-03-16

Family

ID=58320923

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016141263A Pending JP2017054490A (en) 2015-09-09 2016-07-19 Information processing apparatus, program, image processing method, and image processing system

Country Status (1)

Country Link
JP (1) JP2017054490A (en)

Similar Documents

Publication Publication Date Title
KR100748620B1 (en) Method and apparatus for setting print-option
US8018618B2 (en) Information processing apparatus that outputs images having same size to single page of recording sheet and computer readable medium
CN112732206A (en) Print control method, print driving apparatus, and computer-readable storage medium
JP6447564B2 (en) Image forming apparatus, program, and information processing system
US20110286034A1 (en) Information processing apparatus and non-transitory computer-readable recording medium
US8804188B2 (en) Computer-readable storage device storing page-layout program and information processing device
JP5994509B2 (en) Image output system, portable terminal device, preview image creation control method, preview image creation control program, and image preview system
JP2017054490A (en) Information processing apparatus, program, image processing method, and image processing system
JP5654883B2 (en) Information processing apparatus, control method therefor, and program
US9165225B2 (en) Program and information processing apparatus
JP5667135B2 (en) Image forming apparatus
JP2009143124A (en) Image processing apparatus
JP6597510B2 (en) Image processing apparatus and image processing method
JP6492948B2 (en) Information processing apparatus, output system, and program
US20110128298A1 (en) Display system, image processing apparatus, control method therefor, and storage medium
JP4999729B2 (en) Image processing method and image processing apparatus
JP5202265B2 (en) Image processing apparatus, program, and control method for image processing apparatus
JP6518155B2 (en) Information processing apparatus, information processing method
JP2008080592A (en) Image data generating apparatus, image forming apparatus, image forming system, and image data generating program
JP6168311B2 (en) Image forming apparatus, image forming system, and image forming method
JP4881897B2 (en) Image processing method and image processing apparatus
JP2021076980A (en) Image file creation device, image file creation method, information processing apparatus, information processing method, and program
JP2016036932A (en) Image formation apparatus
US9864554B2 (en) Information processing apparatus and data processing method for inserting image information into a document by converting a size of the image information into a size suitable for an output paper size of the document
US20170070643A1 (en) Information processing apparatus, method, image processing system, and storage medium