JP2015046701A - Image compression method and image compression device - Google Patents

Image compression method and image compression device Download PDF

Info

Publication number
JP2015046701A
JP2015046701A JP2013175808A JP2013175808A JP2015046701A JP 2015046701 A JP2015046701 A JP 2015046701A JP 2013175808 A JP2013175808 A JP 2013175808A JP 2013175808 A JP2013175808 A JP 2013175808A JP 2015046701 A JP2015046701 A JP 2015046701A
Authority
JP
Japan
Prior art keywords
image
color channel
data
value
gradation value
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
JP2013175808A
Other languages
Japanese (ja)
Inventor
由明 堀
Yoshiaki Hori
由明 堀
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.)
Make Software Co Ltd
Original Assignee
Make Software 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 Make Software Co Ltd filed Critical Make Software Co Ltd
Priority to JP2013175808A priority Critical patent/JP2015046701A/en
Publication of JP2015046701A publication Critical patent/JP2015046701A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image compression method and an image compression device which allows for reduction in the amount of data while maintaining the image quality.SOLUTION: In an image compression method for storing image data, composed of pixel data including a color channel for specifying the color information by a gradation value of a predetermined bit length, in a memory, generating a data stream by sequentially reading the gradation value of each color channel from the memory, detecting a plurality of partial data streams matching each other from the data stream thus generated, and then encoding the data stream based on the partial data streams thus detected, the least significant bit of each gradation value composing the data stream is rewritten to a common value of 0 or 1.

Description

本発明は、画質の低下を抑えつつ、データ量を削減できる画像圧縮方法及び画像圧縮装置に関する。   The present invention relates to an image compression method and an image compression apparatus that can reduce the amount of data while suppressing deterioration in image quality.

近年、ゲームセンター等の遊戯を提供する店舗では、写真を撮影してシールプリントを出力する写真シール作成装置が数多く設置されている。このような写真シール作成装置は、一般に、被写体であるユーザを装置付属のカメラで撮影し、得られた撮影画像をタブレットディスプレイなどに表示して付属のタッチペンで文字や図形などを入力する、いわゆる落書きやお絵描きといわれている編集機能があるものが一般的になっている。そして、このような編集入力された編集画像は撮影画像と合成され、合成画像がプリンタで印刷されてユーザに提供される。   In recent years, stores providing games such as game centers have installed many photo sticker creation apparatuses that take pictures and output sticker prints. Such a photo sticker creating apparatus generally captures a user, who is a subject, with a camera attached to the apparatus, displays the obtained photographed image on a tablet display or the like, and inputs characters or figures with an attached touch pen. Those with editing functions called graffiti and drawing are becoming common. Then, the edited and edited image is combined with the captured image, and the combined image is printed by a printer and provided to the user.

また、写真シール作成装置は通信手段を備え、写真シール作成装置にて作成した撮影画像または合成画像を、ネットワークを介して外部のサーバ装置に送信して蓄積し、ユーザの携帯電話機等に配信できるようにした画像配信システムが登場している。   In addition, the photo sticker creating apparatus includes a communication unit, and the photographed image or the composite image created by the photo sticker creating apparatus can be transmitted to an external server device via a network, stored, and distributed to a user's mobile phone or the like. An image distribution system like this has appeared.

このような画像を携帯電話機に配信する技術に関して、例えば、特許文献1には、画像合成装置で撮影され、合成出力された画像を通信回線を介して任意の携帯電話機、PHS、PDA等の端末に送信して表示可能にする技術が開示されている。   With regard to a technique for distributing such an image to a mobile phone, for example, Patent Document 1 discloses a terminal such as an arbitrary mobile phone, PHS, PDA, etc. via a communication line. A technique for transmitting data to and displaying it is disclosed.

特開2001−245290号公報JP 2001-245290 A

上述した写真シール作成装置では、撮影画像又はユーザによって編集された合成画像をシール紙に印刷してユーザに提供するので、印刷用に比較的高精細な画像を用いることが多い。すなわち、写真シール作成装置の付属カメラにより画素数が多い画像を用意しておき、この画像に対する編集入力を受付けた上でシール紙に印刷するので、写真シール作成装置で用いる画像は、一般的な画面表示用の画像と比較して、データ量が大きいことが多い。   In the above-described photo sticker creating apparatus, a photographed image or a composite image edited by the user is printed on a sticker sheet and provided to the user, so a relatively high-definition image is often used for printing. That is, an image having a large number of pixels is prepared by the camera attached to the photo sticker creating apparatus, and an edit input for the image is received and printed on the sticker paper. The amount of data is often large compared to an image for screen display.

また、写真シール作成装置には、ユーザのウェブログやSNSで利用するための画像を生成する、おまけ撮影と称する撮影機能、おまけらくがきと称する画像作成機能等の付加機能を有するものがあり、ネットワークを介してユーザの携帯電話機に配信する画像の枚数が従来と比較して増加する傾向にある。   In addition, some photo sticker creation apparatuses have an additional function such as a shooting function called bonus shooting, an image creation function called bonus graffiti, or the like that generates an image for use in a user's weblog or SNS. There is a tendency that the number of images distributed to the user's mobile phone via the network increases as compared with the conventional case.

このため、写真シール作成装置で作成された撮影画像又は合成画像を圧縮せずにサーバ装置にアップロードした場合、非常に時間が掛かるという問題点を有している。特に、写真シール作成装置が設置されるゲームセンターなどの遊戯施設では、無線通信環境の電波状態が不安定であり、データ量が大きいデータを送信することは困難である。   For this reason, when the photographed image or composite image created by the photo sticker creating device is uploaded to the server device without being compressed, it takes a very long time. In particular, in amusement facilities such as a game center where a photo sticker creation apparatus is installed, the radio wave condition of the wireless communication environment is unstable, and it is difficult to transmit data with a large amount of data.

写真シール作成装置で作成された撮影画像又は合成画像を高圧縮率で圧縮することにより、データ量を削減することは可能である。しかしながら、データ量を削減するために高圧縮率で画像を圧縮した場合、画質の劣化が発生し易いという側面を有している。近年のスマートフォン等の携帯電話機では、ディスプレイの高解像度化が進んでいるため、ユーザに提供する画像には高解像度のものが求められており、高圧縮率で圧縮することによって画質が劣化した画像は、ユーザに提供する閲覧用の画像として適さないという問題点を有している。   It is possible to reduce the amount of data by compressing a photographed image or composite image created by the photo sticker creating apparatus at a high compression rate. However, when the image is compressed at a high compression rate in order to reduce the data amount, there is an aspect that the image quality is likely to be deteriorated. In recent mobile phones such as smartphones, the resolution of displays has been increasing, so images provided to users are required to have high resolution, and images with degraded image quality due to compression at a high compression rate are required. Has a problem that it is not suitable as a browsing image provided to the user.

上述した写真シール作成装置に限らず、画像データを処理し、記録する様々な装置において、画質を低下させることなくデータ量を削減できる画像圧縮方法の開発が求められていた。   There has been a demand for the development of an image compression method capable of reducing the amount of data without degrading the image quality in various apparatuses that process and record image data, not limited to the above-described photo sticker creating apparatus.

本発明は斯かる事情に鑑みてなされたものであり、画質の低下を抑えつつ、データ量を削減できる画像圧縮方法及び画像圧縮装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide an image compression method and an image compression apparatus that can reduce the amount of data while suppressing deterioration in image quality.

本発明に係る画像圧縮方法は、所定ビット長の階調値にて色情報を指定するカラーチャンネルを含んだ画素データにより構成された画像データをメモリに記憶し、該メモリから画素データ毎に各カラーチャンネルの階調値を順次読み出してデータ列を生成し、生成したデータ列から互いに一致する複数の部分データ列を検出し、検出した部分データ列に基づき前記データ列を符号化することで前記画像データを圧縮する画像圧縮方法において、前記データ列を構成する各階調値の最下位ビットを0又は1の共通の値に書き換えることを特徴とする。   The image compression method according to the present invention stores, in a memory, image data composed of pixel data including a color channel that specifies color information with a gradation value having a predetermined bit length, and each pixel data from the memory is stored in each memory. The color channel gradation values are sequentially read out to generate a data string, a plurality of partial data strings that match each other are detected from the generated data string, and the data string is encoded based on the detected partial data string In the image compression method for compressing image data, the least significant bit of each gradation value constituting the data string is rewritten to a common value of 0 or 1.

本発明に係る画像圧縮方法は、各画素データは、前記ビット長の階調値にて透明度を指定するアルファチャンネルを更に含むことを特徴とする。   The image compression method according to the present invention is characterized in that each pixel data further includes an alpha channel for designating transparency with the gradation value of the bit length.

本発明に係る画像圧縮方法は、カラーチャンネル毎に各階調値の出現頻度を計数し、計数したカラーチャンネル毎の各階調値の出現頻度に基づいて、前記最下位ビットの書き換えを禁止すべきカラーチャンネルを決定し、決定したカラーチャンネルの階調値における最下位ビットの書き換えを禁止することを特徴とする。   The image compression method according to the present invention counts the appearance frequency of each gradation value for each color channel, and based on the counted appearance frequency of each gradation value, rewrites the least significant bit. A channel is determined, and rewriting of the least significant bit in the gradation value of the determined color channel is prohibited.

本発明に係る画像圧縮方法は、カラーチャンネル毎に各階調値の出現頻度を計数し、計数したカラーチャンネル毎の各階調値の出現頻度に基づいて、前記最下位ビットより高位側のビットを0又は1の共通の値に書き換えるカラーチャンネルを決定し、決定したカラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換えることを特徴とする。   In the image compression method according to the present invention, the appearance frequency of each gradation value is counted for each color channel, and the higher-order bit from the least significant bit is set to 0 based on the appearance frequency of each gradation value for each color channel. Alternatively, a color channel to be rewritten to a common value of 1 is determined, and a bit higher than the least significant bit in the gradation value of the determined color channel is rewritten to a common value of 0 or 1.

本発明に係る画像圧縮方法は、アルファチャンネルにより指定される透明度が閾値以上であるか否かを画素データ毎に判断し、前記透明度が閾値以上であると判断した画素データについて、カラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換えることを特徴とする。   The image compression method according to the present invention determines, for each pixel data, whether or not the transparency specified by the alpha channel is greater than or equal to a threshold, and for the pixel data for which the transparency is determined to be greater than or equal to the threshold, A bit higher than the least significant bit in the key value is rewritten to a common value of 0 or 1.

本発明に係る画像圧縮装置は、所定ビット長の階調値にて色情報を指定するカラーチャンネルを含んだ画素データにより構成された画像データをメモリに記憶し、該メモリから画素データ毎に各カラーチャンネルの階調値を順次読み出してデータ列を生成し、生成したデータ列から互いに一致する複数の部分データ列を検出し、検出した部分データ列に基づき前記データ列を符号化することで前記画像データを圧縮する画像圧縮装置において、前記データ列を構成する各階調値の最下位ビットを0又は1の共通の値に書き換える手段を備えることを特徴とする。   An image compression apparatus according to the present invention stores image data composed of pixel data including color channels that specify color information with gradation values of a predetermined bit length in a memory, and each pixel data from the memory is stored in each memory. The color channel gradation values are sequentially read out to generate a data string, a plurality of partial data strings that match each other are detected from the generated data string, and the data string is encoded based on the detected partial data string An image compression apparatus for compressing image data includes means for rewriting the least significant bit of each gradation value constituting the data string to a common value of 0 or 1.

本発明に係る画像圧縮装置は、各画素データは、前記ビット長の階調値にて透明度を指定するアルファチャンネルを更に含むことを特徴とする。   The image compression apparatus according to the present invention is characterized in that each pixel data further includes an alpha channel for designating transparency with the bit length gradation value.

本発明に係る画像圧縮装置は、カラーチャンネル毎の階調値の出現頻度を計数する手段と、計数したカラーチャンネル毎の階調値の出現頻度に基づいて、前記最下位ビットの書き換えを禁止すべきカラーチャンネルを決定する手段と、決定したカラーチャンネルの階調値における最下位ビットの書き換えを禁止する手段とを更に備えることを特徴とする。   The image compression apparatus according to the present invention prohibits rewriting of the least significant bit based on the means for counting the appearance frequency of the gradation value for each color channel and the appearance frequency of the gradation value for each color channel. The method further comprises means for determining a color channel to be changed and means for prohibiting rewriting of the least significant bit in the gradation value of the determined color channel.

本発明に係る画像圧縮装置は、カラーチャンネル毎の階調値の出現頻度を計数する手段と、計数したカラーチャンネル毎の階調値の出現頻度に基づいて、前記最下位ビットより高位側のビットを0又は1の共通の値に書き換えるカラーチャンネルを決定する手段と、決定したカラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換える手段とを更に備えることを特徴とする。   The image compression apparatus according to the present invention includes means for counting the appearance frequency of the gradation value for each color channel, and a higher-order bit than the least significant bit based on the counted appearance frequency of the gradation value for each color channel. Means for determining a color channel that rewrites a common value of 0 or 1 and means for rewriting a bit higher than the least significant bit in the gradation value of the determined color channel to a common value of 0 or 1 It is characterized by providing.

本発明に係る画像圧縮装置は、アルファチャンネルにより指定される透明度が閾値以上であるか否かを画素データ毎に判断する手段と、前記透明度が閾値以上であると判断した画素データについて、カラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換える手段とを更に備えることを特徴とする。   The image compression apparatus according to the present invention is configured to determine, for each pixel data, whether or not the transparency specified by the alpha channel is greater than or equal to a threshold value, and for the pixel data for which the transparency is determined to be greater than or equal to the threshold value, And means for rewriting the higher-order bits than the least significant bit in the grayscale value to a common value of 0 or 1.

本願では、データ列の符号化処理を実行する前に、各階調値の最下位ビットを0又は1の共通の値に書き換えることを特徴の1つとしている。ビット変換処理において変換する階調値はたかだか1に過ぎないので、この差を色差として人間の眼により認識することはほぼ不可能である。その一方で、各色の階調値及びアルファ値における最下位ビットを0又は1の共通の値に書き換えることにより、符号化対象のデータ列に現れる値の数を256個(各階調値を8ビットとした場合)から128個に減らすことができるため、続く符号化処理において、互いに一致する部分データ列をより多く検出できる可能性、より長い一致長で一致する部分データ列を検出できる可能性が高まり、その結果、圧縮率を高めることができる。   One feature of the present application is that the least significant bit of each gradation value is rewritten to a common value of 0 or 1 before the encoding process of the data string is executed. Since the gradation value to be converted in the bit conversion process is only 1, it is almost impossible to recognize this difference as a color difference by human eyes. On the other hand, by rewriting the least significant bit in the gradation value and alpha value of each color to a common value of 0 or 1, the number of values that appear in the data string to be encoded is 256 (each gradation value is 8 bits). In the subsequent encoding process, it is possible to detect more partial data strings that match each other, and to detect partial data strings that match with a longer match length. As a result, the compression rate can be increased.

本発明による場合、画質を維持しつつ、画像データのデータ量を削減することができるので、通信コストを抑制することができ、外部のサーバ装置へ画像データをアップロードする時間、及び外部サーバからユーザの端末に画像データをダウンロードする時間を短縮することができる。   According to the present invention, the amount of image data can be reduced while maintaining the image quality, so that the communication cost can be suppressed, the time for uploading image data to an external server device, and the user from the external server Time for downloading image data to the terminal can be shortened.

本実施の形態に係る写真シール作成装置の外観を示す斜視図である。It is a perspective view which shows the external appearance of the photograph sticker production apparatus which concerns on this Embodiment. 本実施の形態に係る写真シール作成装置の外観を示す斜視図である。It is a perspective view which shows the external appearance of the photograph sticker production apparatus which concerns on this Embodiment. 本実施の形態に係る写真シール作成装置の構成を模式的に示すブロック図である。It is a block diagram which shows typically the structure of the photograph sticker production apparatus which concerns on this Embodiment. 本実施の形態に係る写真シール作成装置の構成を模式的に示すブロック図である。It is a block diagram which shows typically the structure of the photograph sticker production apparatus which concerns on this Embodiment. 画像処理部の機能的構成の一例を示すブロック図である。It is a block diagram which shows an example of a functional structure of an image process part. 本実施の形態に係るビット変換処理を説明する説明図である。It is explanatory drawing explaining the bit conversion process which concerns on this Embodiment. 本実施の形態に係る写真シール作成装置が実行する処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the process which the photograph sticker production apparatus which concerns on this Embodiment performs. 送信用画像データの生成手順を示すフローチャートである。It is a flowchart which shows the production | generation procedure of the image data for transmission. 実施の形態2に係る送信用画像データの生成手順を示すフローチャートである。10 is a flowchart showing a procedure for generating transmission image data according to the second embodiment. 実施の形態3に係る送信用画像データの生成手順を示すフローチャートである。10 is a flowchart showing a procedure for generating transmission image data according to the third embodiment. 実施の形態4に係る送信用画像データの生成手順を示すフローチャートである。14 is a flowchart showing a procedure for generating transmission image data according to the fourth embodiment.

以下、本発明の適用例の1つとして、写真シール作成装置に本願の画像圧縮方法を適用した形態について、図面を用いて具体的に説明する。
実施の形態1.
図1及び図2は本実施の形態に係る写真シール作成装置の外観を示す斜視図である。写真シール作成装置は全体として略直方体形状のボックス型の装置であり、鉛直方向に略半分に分けるように仕切りが設けられている。写真シール作成装置は、この仕切りによって撮影空間R1及び編集空間R2に分けられている。図1は主に写真シール作成装置の撮影空間R1側から観た外観斜視図を示しており、図2は主に編集空間R2側から観た写真シール作成装置の外観斜視図を示している。
Hereinafter, as one application example of the present invention, an embodiment in which the image compression method of the present application is applied to a photographic sticker creating apparatus will be specifically described with reference to the drawings.
Embodiment 1 FIG.
1 and 2 are perspective views showing the external appearance of the photographic sticker creating apparatus according to the present embodiment. The photo sticker creating apparatus is a box-shaped apparatus having a substantially rectangular parallelepiped shape as a whole, and a partition is provided so as to divide it substantially in the vertical direction. The photo sticker creating apparatus is divided into a photographing space R1 and an editing space R2 by this partition. FIG. 1 is an external perspective view mainly viewed from the photographing space R1 side of the photo sticker creating apparatus, and FIG. 2 is an external perspective view of the photo sticker creating apparatus viewed mainly from the editing space R2 side.

図1の斜視図に示すように、撮影空間R1は略直方体をなすフレームに囲まれた空間である。撮影空間R1は、ユーザからの料金の投入を受け付け、ユーザの写真撮影を実行するための空間である。撮影空間R1には、所定料金を受け付ける受付部1が外側に設けられており、また、編集空間R2との仕切りに相当する内部壁面にはユーザを撮影するためのカメラ21、ディスプレイ22等の機器を含む撮影部2が設けられている。   As shown in the perspective view of FIG. 1, the imaging space R1 is a space surrounded by a frame that forms a substantially rectangular parallelepiped. The shooting space R1 is a space for accepting the input of a fee from the user and for taking a picture of the user. The photographing space R1 is provided with a receiving unit 1 that accepts a predetermined fee on the outside, and devices such as a camera 21 and a display 22 for photographing a user on an inner wall surface corresponding to a partition with the editing space R2. An imaging unit 2 including is provided.

受付部1には、硬貨の投入を受け付けるコイン投入口10と、コイン投入口10から投入される硬貨の真偽を判定するコインセレクタ11と、投入された硬貨の総額又は投入残額等の各種情報を表示するための表示パネル12とが含まれる。コインセレクタ11は、コイン投入口10から投入される硬貨の真偽を判定して判定信号を送出する。コインセレクタ11は、硬貨が偽と判定された場合、又は硬貨を受け付けないように設定されている間、図示しないコイン返却口へ硬貨を吐き出す。表示パネル12は、液晶パネル、セグメントLED等からなり、制御信号を受け付けてコインの投入を促す案内、投入すべき料金、投入総額、残額、又は他のユーザが撮影中でありコインの投入を受け付けていない旨の案内等を表示する。   The reception unit 1 includes a coin insertion slot 10 that accepts coin insertion, a coin selector 11 that determines the authenticity of coins inserted from the coin insertion slot 10, and various types of information such as the total amount of coins inserted or the amount remaining. And a display panel 12 for displaying. The coin selector 11 determines the authenticity of the coin inserted from the coin insertion slot 10 and sends a determination signal. The coin selector 11 discharges a coin to a coin return port (not shown) when the coin is determined to be false or while it is set not to accept a coin. The display panel 12 is composed of a liquid crystal panel, a segment LED, etc., and receives a control signal to prompt the insertion of coins, a charge to be inserted, the total amount to be inserted, the remaining amount, or another user is shooting and accepts the insertion of a coin A message indicating that it has not been displayed.

受付部1に含まれている表示パネル12及びコインセレクタ11は、後述する第1筐体の内部に収納された制御機構に接続されており、制御機構との間で判定信号、制御信号等を送受信する。   The display panel 12 and the coin selector 11 included in the receiving unit 1 are connected to a control mechanism housed in a first housing described later, and a determination signal, a control signal, and the like are transmitted to the control mechanism. Send and receive.

ユーザは、受付部1のコイン投入口10から所定料金に相当する硬貨を投入することにより、写真シール作成装置によるサービスを受けることができる。   The user can receive a service from the photo sticker creating apparatus by inserting coins corresponding to a predetermined fee from the coin insertion slot 10 of the reception unit 1.

撮影空間R1の内部、即ち撮影ブース内部には、撮影部2を構成する各機器が設置されている。撮影ブース内部の編集空間R2との空間を仕切る壁面の下部には、各機器を制御する制御機構を収納した第1筐体20が設置されている。第1筐体20の上方であって、立った状態のユーザの略目線の高さの位置にカメラ21が設置されている。カメラ21の下方には、カメラ21から出力される映像信号に基づきプレビュー画面を表示し、且つユーザの操作を受け付けるタッチパネル式のディスプレイ22が設定されている。また、カメラ21及びディスプレイ22を囲むように被写体に光を照射するストロボ・ランプ23が設置されている。また、第1筐体20上部には音楽、案内音声を出力するスピーカ24,24が設置されている。   In the imaging space R1, that is, inside the imaging booth, each device constituting the imaging unit 2 is installed. A first housing 20 containing a control mechanism for controlling each device is installed at the lower part of the wall surface that partitions the space with the editing space R2 inside the photographing booth. A camera 21 is installed above the first housing 20 and at a height that is approximately the height of the standing user. A touch panel display 22 that displays a preview screen based on a video signal output from the camera 21 and accepts a user operation is set below the camera 21. Further, a strobe lamp 23 for irradiating the subject with light is provided so as to surround the camera 21 and the display 22. Speakers 24 and 24 for outputting music and guidance voice are installed on the upper portion of the first housing 20.

撮影部2を構成するカメラ21、ディスプレイ22、ストロボ・ランプ23及びスピーカ24,24は夫々、第1筐体20の内部に設置されている制御機構に夫々接続されている。   The camera 21, the display 22, the strobe lamp 23, and the speakers 24 and 24 constituting the photographing unit 2 are respectively connected to a control mechanism installed in the first housing 20.

カメラ21は、ユーザを被写体として撮影するため、内部にレンズ群、絞り、シャッター、CCD(Charge Coupled Device)等の撮像素子を含むデジタルカメラである。カメラ21は、タイマー機能によりシャッターが動作して撮像素子から静止画像を取得し記憶することにより写真撮影を実行する。また、カメラ21は起動している間、撮像素子から出力されるデジタル化された映像信号を制御機構へ出力している。制御機構からは、この映像信号に基づくプレビュー画面の表示用の撮影画像が出力される。   The camera 21 is a digital camera that includes an imaging element such as a lens group, a diaphragm, a shutter, and a CCD (Charge Coupled Device) in order to photograph a user as a subject. The camera 21 takes a picture by acquiring and storing a still image from the imaging device by operating a shutter by a timer function. While the camera 21 is activated, the camera 21 outputs a digitized video signal output from the image sensor to the control mechanism. The control mechanism outputs a captured image for displaying a preview screen based on the video signal.

ディスプレイ22は撮影中の操作を案内する操作画面とプレビュー画面とを表示するための液晶パネルを有し、カメラ21からリアルタイムに出力される映像信号に基づいて制御機構から出力されている画像を受け付けて表示する。また、ディスプレイ22はタッチパネル式であり、ユーザによってタッチされた箇所の画面上の位置の情報を含む信号が制御機構へ出力される。   The display 22 has a liquid crystal panel for displaying an operation screen for guiding operations during shooting and a preview screen, and accepts an image output from the control mechanism based on a video signal output from the camera 21 in real time. To display. Further, the display 22 is a touch panel type, and a signal including information on a position on the screen at a location touched by the user is output to the control mechanism.

ストロボ・ランプ23は、撮影ブース内の照明機器であると共に、写真撮影時にはフラッシュとして機能する。なお、本実施の形態ではストロボ・ランプ23は図に示すように7つに分けられており、制御機構に含まれる制御基盤を介して夫々の発光のタイミングがカメラ21による写真撮影(シャッターの動作)に同期して制御される。   The strobe lamp 23 is a lighting device in the photographing booth and functions as a flash when taking a picture. In the present embodiment, the strobe lamp 23 is divided into seven as shown in the figure, and the timing of each light emission is taken by the camera 21 via the control base included in the control mechanism (the operation of the shutter). ) Is controlled in synchronization with

撮影ブースの外周は遮光性を有するシート材(図示せず)によって覆われている。このシート材によって外部からの光が遮断され、且つ外部からの覗き見を防止することができ、さらにユーザが撮影ブース内で自由にポーズをとることができるプライベート空間が実現される。   The outer periphery of the photography booth is covered with a light-shielding sheet material (not shown). This sheet material blocks external light, prevents peeping from the outside, and realizes a private space where the user can freely pose in the shooting booth.

また、撮影ブース内側から見たシート材は均等な色調及び明度となるようにしてある。カメラ21から観た場合にユーザの後方がシート材の均等な色調及び明度となるので、後述にて説明するようにユーザが写っている領域以外を透明化するクロマキー処理が可能になる。   In addition, the sheet material viewed from the inside of the photographing booth has uniform color tone and brightness. When viewed from the camera 21, the rear side of the user has the same color tone and lightness of the sheet material, so that the chroma key process for making the area other than the area in which the user is visible transparent becomes possible, as will be described later.

ユーザは撮影ブース内に入り、ディスプレイ22に表示される案内及びスピーカ24,24から出力される案内音声に従い操作画面を操作し、ストロボ・ランプ23からの照明を受けてポーズを決め、カメラ21による写真撮影を実行することができる。まず、ユーザはタッチパネル式のディスプレイ22に表示される操作画面から、ユーザが写る写真を装飾する前景画像及び/又は背景画像を選択することができる。ユーザが前景画像及び/又は背景画像を選択した場合、ディスプレイ22には、カメラ21から制御機構を介してリアルタイムに出力されている画像、即ちカメラ21から出力されている撮影画像、選択された前景画像及び/又は背景画像に基づく印刷結果のプレビュー画面が表示される。ユーザはプレビュー画面を確認しながらポーズを決め、写真撮影を実行することができる。   The user enters the shooting booth, operates the operation screen according to the guidance displayed on the display 22 and the guidance voice output from the speakers 24, 24, determines the pose by receiving illumination from the strobe lamp 23, and uses the camera 21. A photo shoot can be performed. First, the user can select a foreground image and / or a background image that decorates a photograph taken by the user from an operation screen displayed on the touch panel display 22. When the user selects the foreground image and / or the background image, the display 22 displays an image output in real time from the camera 21 via the control mechanism, that is, a captured image output from the camera 21, and the selected foreground. A print result preview screen based on the image and / or the background image is displayed. The user can determine a pose while confirming the preview screen, and execute a photo shoot.

写真撮影が実行された場合、制御機構はカメラ21で記憶された静止画像を取得し、後にユーザによる編集操作を受け付けるための画像、及び、後に印刷出力するための画像として夫々複製する。   When a photograph is taken, the control mechanism acquires a still image stored by the camera 21 and copies it as an image for later accepting an editing operation by the user and an image for later printing out.

次に図2の斜視図に示す編集空間R2に設置されている各構成部について説明する。編集空間R2は、上述の撮影空間R1の内部のカメラ21、ディスプレイ22、ストロボ・ランプ23、スピーカ24,24及び第1筐体20が設置されていた壁面の裏側の空間であり、ユーザが写真撮影を実行した後に画像の編集をすることができる空間である。図2に示す編集空間R2は撮影空間R1の上面から延設されているバーに取り付けられたカーテン状のシート材(図示せず)によって他の空間から仕切られる。そして編集空間R2には、以下に示す各構成部を内外に備える略直方体の第2筐体30が設置されている。   Next, each component installed in the editing space R2 shown in the perspective view of FIG. 2 will be described. The editing space R2 is a space behind the wall where the camera 21, display 22, strobe / lamp 23, speakers 24 and 24, and the first housing 20 are installed, and the user can take photographs. This is a space where an image can be edited after shooting. The editing space R2 shown in FIG. 2 is partitioned from other spaces by a curtain-like sheet material (not shown) attached to a bar extending from the upper surface of the photographing space R1. The editing space R <b> 2 is provided with a substantially rectangular parallelepiped second housing 30 having the following components inside and outside.

第2筐体30の一方の側面は撮影空間R1との仕切りである壁面に接しており、他の三側面の内の対向する面には夫々、写真撮影された画像及びその他の画像を編集するためのインタフェースを備える第1編集部4a及び第2編集部4bが設けられている。他方の側面には編集された画像を所定の写真シール用紙に印刷出力する印刷部5が設けられている。また、第2筐体30の内部には、第1編集部4a、第2編集部4b及び印刷部5の各構成部を制御する制御機構が設置されている。   One side surface of the second housing 30 is in contact with a wall surface that is a partition with the imaging space R1, and a photographed image and other images are edited on the opposing surfaces of the other three side surfaces, respectively. A first editing unit 4a and a second editing unit 4b having an interface for the above are provided. On the other side, a printing unit 5 is provided for printing out the edited image on a predetermined photo sticker sheet. In addition, a control mechanism that controls each component of the first editing unit 4 a, the second editing unit 4 b, and the printing unit 5 is installed in the second housing 30.

なお、第1筐体20及び第2筐体30の相互に接している面は夫々が有する開口部(図示せず)を介して内部が連通しており、第1筐体20の内部に設置されている撮影部2の制御機構と、第2筐体30の内部に設置されている第1編集部4a、第2編集部4b及び印刷部5の制御機構とは、複数のケーブル類によって接続されている。   Note that the surfaces of the first casing 20 and the second casing 30 that are in contact with each other communicate with each other through an opening (not shown) of each, and are installed inside the first casing 20. The control mechanism of the photographing unit 2 and the control mechanism of the first editing unit 4a, the second editing unit 4b, and the printing unit 5 installed in the second housing 30 are connected by a plurality of cables. Has been.

第1編集部4aには夫々、写真撮影された画像及び他の画像を編集するための操作画面を表示するタブレットディスプレイ40aと、2つのタッチペン41a,42aと、スピーカ43aとが含まれる。なお後述の第2編集部4bにもタブレットディスプレイ40bと、2つのタッチペン41b,42bと、スピーカ43bとが含まれている。第1編集部4a及び第2編集部4b夫々のタブレットディスプレイ40a,40b、タッチペン41a,42a,41b,42b、及びスピーカ43a,43bは夫々、第2筐体30の対向する面に向かい合うように設置されている。また、タブレットディスプレイ40a,40b、タッチペン41a,42a,41b,42b及びスピーカ43a,43bは第2筐体30の内部の制御機構に接続されている。   The first editing unit 4a includes a tablet display 40a that displays an operation screen for editing a photographed image and other images, two touch pens 41a and 42a, and a speaker 43a. Note that the second editing unit 4b described later also includes a tablet display 40b, two touch pens 41b and 42b, and a speaker 43b. The tablet displays 40a and 40b, the touch pens 41a, 42a, 41b, and 42b, and the speakers 43a and 43b of the first editing unit 4a and the second editing unit 4b are installed so as to face the opposing surfaces of the second housing 30, respectively. Has been. The tablet displays 40 a and 40 b, the touch pens 41 a, 42 a, 41 b and 42 b and the speakers 43 a and 43 b are connected to a control mechanism inside the second housing 30.

印刷部5には、第2筐体30の内部に設置されており画像を所定の用紙に印刷するプリンタ50と、印刷された用紙がプリンタから吐き出されるシール吐出口51と、各種情報を表示する表示パネル52とが含まれる。表示パネル52は第2筐体30の内部に設置された制御機構に接続されており、プリンタ50も第2筐体30の内部で制御機構に接続されている。   The printing unit 5 displays a printer 50 that is installed inside the second housing 30 and prints an image on a predetermined sheet, a seal discharge port 51 through which the printed sheet is discharged from the printer, and various types of information. Display panel 52. The display panel 52 is connected to a control mechanism installed inside the second housing 30, and the printer 50 is also connected to the control mechanism inside the second housing 30.

ユーザは、撮影ブース内で撮影部2により撮影を完了した後、第1編集部4a又は第2編集部4bにより印刷する画像の選択、選択した画像に対する落書き等の作業が可能である。第1編集部4a又は第2編集部4b夫々のタブレットディスプレイ40a,40bには、写真撮影が実行されたことによって取得された画像と、選択された前景画像及び/又は背景画像とが共に表示される。タブレットディスプレイ40a,40bは、共に設置されているタッチペン41a,42a,41b,42bによる操作を受け付けるようにしてあり、ユーザはタッチペン41a,42a,41b,42bにより印刷する画像の選択及び選択した画像への文字、スタンプ状の絵柄の挿入などの操作が可能である。   The user can perform operations such as selecting an image to be printed by the first editing unit 4a or the second editing unit 4b and graffiti on the selected image after completing the shooting by the shooting unit 2 in the shooting booth. On the tablet displays 40a and 40b of the first editing unit 4a and the second editing unit 4b, both the image acquired by executing the photography and the selected foreground image and / or background image are displayed. The The tablet displays 40a and 40b are configured to accept operations by the touch pens 41a, 42a, 41b, and 42b installed together, and the user selects an image to be printed by the touch pens 41a, 42a, 41b, and 42b, and selects the selected image. Operations such as insertion of characters and stamp-like patterns.

制御機構により、写真撮影された画像に対し、後述する画像処理部7(図3を参照)による補正処理が行なわれる。そして、ユーザによる編集が完了した場合、補正処理後の印刷出力用の画像に、選択された前景画像及び/又は背景画像、更に編集結果に基づく文字、絵柄等などが合成される。合成された後の画像は、第2筐体30内部に設置されているプリンタ50によって所定のシール紙に印刷され、写真シールとしてシール吐出口51に吐き出される。ユーザは、シール吐出口51から完成した写真シールを取得することができ、これにより写真シールの撮影提供サービスが実現する。   The control mechanism performs a correction process on the photographed image by an image processing unit 7 (see FIG. 3) described later. When the editing by the user is completed, the selected foreground image and / or background image, and characters, designs, and the like based on the editing result are combined with the print output image after the correction process. The combined image is printed on a predetermined sticker sheet by a printer 50 installed in the second housing 30 and discharged to the sticker discharge port 51 as a photographic sticker. The user can obtain the completed photo sticker from the sticker discharge port 51, thereby realizing a photo sticker photographing providing service.

図3及び図4は本実施の形態に係る写真シール作成装置の構成を模式的に示すブロック図である。図3は、主に以下に説明する制御部6、画像処理部7、電源部8、通信部9及び受付部1の構成を示し、図4は、撮影部2、第1編集部4a、第2編集部4b及び印刷部5の構成を示している。図3及び図4に示すように写真シール作成装置は、各構成部を制御する制御部6と、撮影された画像を補正する画像処理部7と、AC電源から電力を供給する電源部8と、インターネット等の外部ネットワークNへ通信が可能な通信部9と、上述のコイン投入口10、コインセレクタ11及び表示パネル12を含む受付部1と、カメラ21、ディスプレイ22、ストロボ・ランプ23及びスピーカ24,24を含む撮影部2と、タブレットディスプレイ40a、2つのタッチペン41a,42a及びスピーカ43aを含む第1編集部4aと、タブレットディスプレイ40b、2つのタッチペン41b,42b及びスピーカ43bを含む第2編集部4bと、プリンタ50、シール吐出口51及び表示パネル52を含む印刷部5と、各部を接続するバス100とにより構成される。なお、制御部6、画像処理部7、電源部8、通信部9及びバス100が、第1筐体20及び第2筐体30の内部に設置された制御機構に対応する。   3 and 4 are block diagrams schematically showing the configuration of the photo sticker creating apparatus according to the present embodiment. 3 mainly shows configurations of the control unit 6, the image processing unit 7, the power supply unit 8, the communication unit 9, and the receiving unit 1 described below. FIG. 4 shows the photographing unit 2, the first editing unit 4a, and the first unit. 2 shows the configuration of the editing unit 4b and the printing unit 5. As shown in FIGS. 3 and 4, the photo sticker creating apparatus includes a control unit 6 that controls each component, an image processing unit 7 that corrects a captured image, and a power supply unit 8 that supplies power from an AC power source. A communication unit 9 capable of communicating with an external network N such as the Internet, a reception unit 1 including the above-described coin insertion slot 10, coin selector 11 and display panel 12, a camera 21, a display 22, a strobe lamp 23 and a speaker. The first editing unit 4a including the photographing unit 2 including 24 and 24, the tablet display 40a, the two touch pens 41a and 42a, and the speaker 43a, and the second editing including the tablet display 40b, the two touch pens 41b and 42b, and the speaker 43b. Each unit is connected to the printing unit 5 including the unit 4b, the printer 50, the seal discharge port 51, and the display panel 52. Constituted by a bus 100. The control unit 6, the image processing unit 7, the power supply unit 8, the communication unit 9, and the bus 100 correspond to control mechanisms installed inside the first casing 20 and the second casing 30.

受付部1、撮影部2、第1編集部4a、第2編集部4b及び印刷部5を夫々構成する各ハードウェアは、上述のように、写真シール作成装置のユーザによる操作が可能なように撮影空間R1、編集空間R2に設置されており、第1筐体20及び第2筐体30内部に設置されている制御機構内のバス100に接続されている。これに対し制御部6、画像処理部7、電源部8及び通信部9は第1筐体20及び第2筐体30の内部に設置されている制御機構内に含まれており、制御機構内に配されたバス100に接続されている。   As described above, the hardware configuring the reception unit 1, the photographing unit 2, the first editing unit 4a, the second editing unit 4b, and the printing unit 5 can be operated by the user of the photo sticker creating apparatus. It is installed in the imaging space R1 and the editing space R2, and is connected to the bus 100 in the control mechanism installed in the first housing 20 and the second housing 30. On the other hand, the control unit 6, the image processing unit 7, the power supply unit 8, and the communication unit 9 are included in a control mechanism installed inside the first casing 20 and the second casing 30. Are connected to the bus 100.

制御機構は、第1筐体20及び第2筐体30の内部に設置された複数のパーソナルコンピュータ(以下、PC:Personal Computerという。)と、上述の受付部1、撮影部2、第1編集部4a、第2編集部4b及び印刷部5を構成する各ハードウェアをPCから制御するための制御基盤とを含んで構成される。なお、複数のPCは夫々、その制御対象によって機能が分割される。例えば、撮影空間R1の受付部1を制御するPCと、撮影部2を制御するPCと、第1編集部4a及び第2編集部4bを制御するPCと、撮影された画像に画像処理を施し印刷部5にて出力するPCと、夫々機能が分割されて動作するように構成される。本実施の形態では、画像処理について主に説明するため仮想的に、受付部1、撮影部2、第1編集部4a及び第2編集部4bを制御する第1PCと、画像処理を行ない印刷部5にて出力する第2PCとの動作によって各構成部が制御されるとして以下に説明する。   The control mechanism includes a plurality of personal computers (hereinafter referred to as PC: Personal Computer) installed in the first housing 20 and the second housing 30, the above-described reception unit 1, imaging unit 2, and first editing. And a control base for controlling each hardware constituting the unit 4a, the second editing unit 4b, and the printing unit 5 from a PC. Note that the functions of each of the plurality of PCs are divided depending on the control target. For example, the PC that controls the reception unit 1 of the imaging space R1, the PC that controls the imaging unit 2, the PC that controls the first editing unit 4a and the second editing unit 4b, and the captured image are subjected to image processing. The PC that is output by the printing unit 5 is configured so that the functions are divided and operated. In the present embodiment, in order to mainly describe image processing, a first PC that virtually controls the receiving unit 1, the photographing unit 2, the first editing unit 4a, and the second editing unit 4b, and a printing unit that performs image processing. It will be described below that each component is controlled by the operation with the second PC that outputs at 5.

制御部6には第1PCに備えられた、各構成部のハードウェアを制御するCPU60と、CPU60の動作により発生する情報を一時的に記憶するDRAM(Dynamic Random Access Memory)等のメモリ61と、各種データを記憶するHDD(Hard Disk Drive)62と、撮影部2のカメラ21から出力される映像信号から静止画像を撮影画像としてキャプチャし、クロマキー処理を実行するためのキャプチャ・クロマキーボード63とが含まれる。   The control unit 6 includes a CPU 60 provided in the first PC that controls hardware of each component, a memory 61 such as a DRAM (Dynamic Random Access Memory) that temporarily stores information generated by the operation of the CPU 60, An HDD (Hard Disk Drive) 62 for storing various data and a capture / chroma keyboard 63 for capturing a still image as a photographed image from a video signal output from the camera 21 of the photographing unit 2 and executing chroma key processing. included.

CPU60は、HDD62に記憶されている後述の制御プログラム6Pを読み出して実行することにより、受付部1のコインセレクタ11からの判定信号を受け付け、受け付けた判定信号に応じて表示パネル12へ制御信号を送出し、所定料金の受け付けを実現する。またCPU60は、制御プログラム6Pを読み出して実行することにより、撮影部2のカメラ21による撮影と、ストロボ・ランプ23との動作を同期させる制御を行ない、カメラ21によって写真撮影されて記憶された印刷出力用の画像を取得する処理、更に、カメラ21から出力される映像信号を、キャプチャ・クロマキーボード63を介してプレビュー画面、編集画面用の撮影画像として取得する処理、ディスプレイ22に表示する処理、第1編集部4a及び第2編集部4bによる編集を受け付ける処理等の各種処理を実行する。   The CPU 60 reads and executes a later-described control program 6P stored in the HDD 62, thereby accepting a judgment signal from the coin selector 11 of the accepting unit 1, and sending a control signal to the display panel 12 in accordance with the accepted judgment signal. Send out and realize acceptance of a predetermined charge. Further, the CPU 60 reads out and executes the control program 6P, thereby performing control to synchronize the photographing with the camera 21 of the photographing unit 2 and the operation with the strobe lamp 23, and the print photographed by the camera 21 and stored. A process of acquiring an image for output; a process of acquiring a video signal output from the camera 21 as a captured image for a preview screen and an editing screen via the capture / chroma keyboard 63; a process of displaying on the display 22; Various processes such as a process of accepting editing by the first editing unit 4a and the second editing unit 4b are executed.

HDD62には、CPU60が各構成部のハードウェアを制御するための制御プログラム6Pが記憶されている。CPU60がHDD62から制御プログラム6Pをメモリ61に読み出して実行することにより、各ハードウェアの制御及び種々のソフトウェア機能が実現される。   The HDD 62 stores a control program 6P for the CPU 60 to control the hardware of each component. When the CPU 60 reads the control program 6P from the HDD 62 to the memory 61 and executes it, control of each hardware and various software functions are realized.

また、HDD62には、制御プログラム6Pの他に、写真撮影された印刷出力用の画像と合成するための前景/背景画像、撮影部2のディスプレイ22に撮影画像と共に表示するための前景/背景画像が記憶されている。HDD62には更に、撮影部2のディスプレイ22に表示される操作画面に用いられる各画像、第1及び第2編集部4a,4bのタブレットディスプレイ40a,40bに表示される編集画面に用いられる画像、テキストファイル、スピーカ24,24,43a,43bに出力する案内音声などの音声データ等のデータが記憶されている。また、HDD62には、ユーザが写真撮影を実行したことでCPU60によりカメラ21から取得された印刷出力用の画像、前景画像及び/又は背景画像と合成処理が実行されることで得られる合成画像及び編集処理によって得られる編集画像が記憶される。   In addition to the control program 6P, the HDD 62 includes a foreground / background image to be combined with a photographed printout image, and a foreground / background image to be displayed on the display 22 of the photographing unit 2 together with the photographed image. Is remembered. The HDD 62 further includes images used for operation screens displayed on the display 22 of the photographing unit 2, images used for editing screens displayed on the tablet displays 40a and 40b of the first and second editing units 4a and 4b, Data such as a text file and voice data such as guidance voices output to the speakers 24, 24, 43a, and 43b are stored. The HDD 62 also includes a composite image obtained by executing a composite process with a print output image, foreground image, and / or background image acquired from the camera 21 by the CPU 60 when the user has taken a picture. An edited image obtained by the editing process is stored.

キャプチャ・クロマキーボード63は、受け付けた映像信号から例えば毎秒30枚の静止画像を取得して出力するキャプチャ機能と、キャプチャされた各静止画像から所定の色調及び明度の画素を認識し、一定の範囲内で同一の色調及び明度の画素に対してアルファ値(透明度)を設定することにより透明化し出力するクロマキー機能とを有するハードウェアである。キャプチャ・クロマキーボード63は、カメラ21から出力される映像信号を受け付けるように接続されている。また、キャプチャ及びクロマキー処理された後の静止画像は、キャプチャ・クロマキーボード63に内蔵される図示しないメモリに書き込まれる。CPU60は当該メモリから静止画像をプレビュー用の撮影画像として読み出し、クロマキー処理を行なわせ、ディスプレイ22のプレビュー画面に表示する処理を実行する。   The capture / chroma keyboard 63 acquires, for example, 30 still images per second from the received video signal and outputs them, and recognizes pixels of a predetermined color tone and brightness from each captured still image, and has a certain range. Hardware having a chroma key function for transparentizing and outputting an alpha value (transparency) for pixels having the same color and lightness. The capture / chroma keyboard 63 is connected to receive a video signal output from the camera 21. The still image after the capture and chroma key processing is written in a memory (not shown) built in the capture / chroma keyboard 63. The CPU 60 reads a still image from the memory as a photographed image for preview, performs a chroma key process, and executes a process for displaying on the preview screen of the display 22.

また、キャプチャ・クロマキーボード63は、ドライバソフトにより毎秒取得する静止画像の枚数、及び透明化する所定の色調及び明度、例えばRGB値の設定が可能である。CPU60は、カメラ21によって撮影される画像の内のユーザの後方に位置するシート材が写っている領域の色調及び明度を透明化するように指示する。これにより、CPU60は、キャプチャ・クロマキーボード63にて、クロマキー処理された人物のみの人物画像を得ることができ、前景画像及び/又は背景画像と重ねてプレビュー画面を表示させることができる。   In addition, the capture / chroma keyboard 63 can set the number of still images acquired every second by the driver software, and a predetermined color tone and lightness to be made transparent, for example, RGB values. The CPU 60 instructs to make the color tone and lightness of the area in which the sheet material located behind the user in the image photographed by the camera 21 is shown transparent. As a result, the CPU 60 can obtain a person image of only the person who has been subjected to the chroma key processing with the capture / chroma keyboard 63, and can display a preview screen superimposed on the foreground image and / or the background image.

画像処理部7には第2PCに備えられた、各構成部のハードウェアを制御するCPU70と、CPU70の動作により発生する情報を一時的に記憶するDRAM等のメモリ71と、各種データを記憶するHDD72と、画像及び描画命令を受け付けて描画処理を行なうグラフィックボード73とが含まれる。   The image processing unit 7 stores a CPU 70 provided in the second PC for controlling the hardware of each component, a memory 71 such as a DRAM for temporarily storing information generated by the operation of the CPU 70, and various data. An HDD 72 and a graphic board 73 that receives an image and a drawing command and performs a drawing process are included.

CPU70は、HDD72に記憶されている後述の画像処理プログラム7Pを読み出して実行することにより、制御部6の制御に基づく写真撮影によってカメラ21にて撮影された画像を加工する画像処理を実現する。詳細には、制御部6の制御により、ユーザが写真撮影を実行してカメラ21にて写真撮影された画像が画像処理部7へ受け渡される。そしてCPU70は、制御部6から写真撮影された画像を取得してメモリ71に書き込み、画像処理を実行することによって、画像中のユーザの顔を小顔にするなどの見栄えを良くする加工を行なう。   The CPU 70 reads out and executes an image processing program 7P, which will be described later, stored in the HDD 72, thereby realizing image processing for processing an image photographed by the camera 21 by photographing based on the control of the control unit 6. Specifically, under the control of the control unit 6, an image taken by the user and photographed by the camera 21 is delivered to the image processing unit 7. The CPU 70 obtains a photographed image from the control unit 6, writes it in the memory 71, and executes image processing so as to improve the appearance such as making the user's face in the image a small face. .

HDD72には、CPU70が、取得した画像に対する加工などの画像処理を行なうための画像処理プログラム7Pが記憶されている。画像処理プログラム7Pは、図示しないCD−ROM、DVD等の記録媒体に記録された画像処理プログラムをHDD72に複製したものでもよいし、通信部9を介して取得したものでもよい。   The HDD 72 stores an image processing program 7P for the CPU 70 to perform image processing such as processing on the acquired image. The image processing program 7P may be a copy of the image processing program recorded on a recording medium such as a CD-ROM or DVD (not shown) in the HDD 72, or may be acquired via the communication unit 9.

グラフィックボード73は、受け付けた画像及び描画命令に基づき、図示しない内蔵メモリに画像を描画するハードウェアである。CPU70は、自身が制御部6から取得してメモリ71に一時的に記憶した画像に対する画像処理を、グラフィックボード73を用いて行なう。具体的には、CPU70は画像と、画像処理に伴なう描画命令とをグラフィックボード73に与えて描画処理を行なわせ、描画処理によって得られた画像をメモリ71に取得する。   The graphic board 73 is hardware for drawing an image in a built-in memory (not shown) based on the received image and drawing command. The CPU 70 uses the graphic board 73 to perform image processing on the image acquired from the control unit 6 and temporarily stored in the memory 71. Specifically, the CPU 70 gives an image and a drawing command accompanying the image processing to the graphic board 73 to perform the drawing processing, and acquires the image obtained by the drawing processing in the memory 71.

電源部8は、第1PC及び第2PCのみならず各構成部へのAC電源からの電力の供給を実現する。写真シール作成装置には、電源を投入する電源スイッチ(図示せず)が設けられており、電源部8に接続されている。電源部8は電源スイッチのオン/オフを検知し、写真シール作成装置の稼動/動作を切り替える。なお、電源部8はUPS(Uninterruptible Power Supply:無停電電源装置)ユニット80を含んで構成される。UPSユニット80により、AC電源からの電力が突然遮断された場合でも、各構成部へのダメージを減らすことができる。電源スイッチがオフに切り替えられた場合、UPSユニット80は停電信号をCPU60へ出力し、CPU60は停電信号を検知したときの所定の終了処理を行ない写真シール作成装置全体の電源をオフにする。   The power supply unit 8 realizes power supply from the AC power supply to each component as well as the first PC and the second PC. The photo sticker creating apparatus is provided with a power switch (not shown) for turning on the power, and is connected to the power supply unit 8. The power supply unit 8 detects the on / off of the power switch, and switches the operation / operation of the photo sticker creating apparatus. The power supply unit 8 includes a UPS (Uninterruptible Power Supply) unit 80. Even when the power from the AC power supply is suddenly cut off by the UPS unit 80, damage to each component can be reduced. When the power switch is switched off, the UPS unit 80 outputs a power failure signal to the CPU 60, and the CPU 60 performs predetermined termination processing when the power failure signal is detected, and turns off the power of the entire photo sticker creating apparatus.

通信部9は、PHSユニット90により構成され、制御部6(CPU60)に内部バス100を介して接続されている。PHSユニット90は、インターネット等の外部ネットワークNに接続してデータの送受信を実現する。CPU60は、通信部9のPHSユニット90を介して外部ネットワークN上の他の装置と通信してデータの送受信が可能である。本実施の形態における写真シール作成装置は、CPU60はユーザの名前、メールアドレス等の識別情報又は送信先のURLと共に、撮影して編集した後の画像データを外部ネットワークNに接続している不図示のサーバ装置へ送信(アップロード)する機能を有している。この機能により、サーバ装置に蓄積されているユーザ自身の画像を携帯電話機又は自宅のPCから閲覧することができるサービス、及びサーバ装置に蓄積されているユーザ自身の画像データを携帯電話機又はPCへダウンロードすることができるサービスを実現する。   The communication unit 9 includes a PHS unit 90 and is connected to the control unit 6 (CPU 60) via the internal bus 100. The PHS unit 90 is connected to an external network N such as the Internet to realize data transmission / reception. The CPU 60 can transmit and receive data by communicating with other devices on the external network N via the PHS unit 90 of the communication unit 9. In the photo sticker creating apparatus according to the present embodiment, the CPU 60 connects image data after being shot and edited to an external network N together with identification information such as a user name, mail address, or a URL of a transmission destination (not shown). It has the function to transmit (upload) to the server device. With this function, the user's own image stored in the server device can be viewed from the mobile phone or home PC, and the user's own image data stored in the server device can be downloaded to the mobile phone or PC. Realize a service that can.

本実施の形態では、写真シール作成装置にて撮影した画像をユーザが編集した後、シール紙に印刷することで写真シールを作成すると共に、ユーザによって編集された画像を符号化することで画像データの圧縮を行い、その後にサーバ装置にアップロードする構成としている。   In this embodiment, after the user edits the image taken by the photo sticker creation device, the photo sticker is created by printing on the sticker paper, and the image data edited by the user is encoded. Is compressed and then uploaded to the server device.

以下、写真シール作成装置が実行する画像データの圧縮処理について説明を行う。図5は画像処理部7の機能的構成の一例を示すブロック図である。なお、図5に示す例では、画像データの圧縮処理に関する機能的構成のみを示し、画像処理部7が備える他の機能についての構成は図示していない。画像処理部7は、CPU70が、HDD72に記憶されている画像処理プログラム7Pを読み出して実行することにより、本願の画像圧縮装置として機能するように構成されている。   Hereinafter, the image data compression processing executed by the photo sticker creating apparatus will be described. FIG. 5 is a block diagram illustrating an example of a functional configuration of the image processing unit 7. In the example shown in FIG. 5, only the functional configuration related to the compression processing of the image data is shown, and the configuration of other functions provided in the image processing unit 7 is not shown. The image processing unit 7 is configured to function as the image compression apparatus of the present application by the CPU 70 reading and executing the image processing program 7P stored in the HDD 72.

画像処理部7は機能的構成として、データ入力部701、入力バッファ702、ビット変換処理部703、符号化処理部704、及びデータ出力部705を備える。   The image processing unit 7 includes a data input unit 701, an input buffer 702, a bit conversion processing unit 703, an encoding processing unit 704, and a data output unit 705 as functional configurations.

圧縮対象の画像データは、カメラ21にて写真撮影された撮影画像に係る画像データ、又はユーザによって編集処理された合成画像に係る画像データであり、制御部6の制御によりHDD62に格納される。この画像データは複数の画素データにより構成されており、各画素データは、所定ビット長の階調値にて色情報を指定する複数のカラーチャンネル(例えば、8ビットの階調値で表されるRGB各色のカラーチャンネル)を含むものとする。また、各画素データは、カラーチャンネルだけでなく、各画素における透明度(アルファ値)を指定するアルファチャンネルを含むものであってもよい。   The image data to be compressed is image data related to a photographed image taken by the camera 21 or image data related to a composite image edited by the user, and is stored in the HDD 62 under the control of the control unit 6. This image data is composed of a plurality of pixel data, and each pixel data is represented by a plurality of color channels (for example, 8-bit gradation values) that specify color information with gradation values having a predetermined bit length. RGB color channels). Each pixel data may include not only a color channel but also an alpha channel that specifies transparency (alpha value) in each pixel.

データ入力部701は、圧縮対象の画像データをHDD62から取得する。入力バッファ702は、適宜のサイズからなるデータを一時的に記憶する記憶手段であり、データ入力部701が取得した画像データから、バッファサイズ分だけ各画素の階調値(RGB値及びアルファ値)を順次読み込んで記憶する。例えば、入力バッファ702が512バイトのバッファサイズを有し、圧縮対象の画像データにおけるRGB各色及びアルファ値がそれぞれ8ビットの階調値を有する場合、128画素分のRGB値及びアルファ値を圧縮対象の画像データから読み込んで入力バッファ702に記憶させることができる。   The data input unit 701 acquires image data to be compressed from the HDD 62. The input buffer 702 is a storage unit that temporarily stores data having an appropriate size. From the image data acquired by the data input unit 701, the gradation value (RGB value and alpha value) of each pixel by the buffer size. Are sequentially read and stored. For example, when the input buffer 702 has a buffer size of 512 bytes, and each RGB color and alpha value in the image data to be compressed has 8-bit gradation values, the RGB value and alpha value for 128 pixels are to be compressed. Can be read from the image data and stored in the input buffer 702.

ビット変換処理部703は、入力バッファ702に記憶した各階調値の最下位ビットを0又は1の共通の値に書き換える処理を行う。ビット変換処理部703は、入力バッファ702に記憶した各階調値の最下位ビットに0又は1の値を書き込むことにより、入力バッファ702に記憶した各階調値の最下位ビットを全て0(又は全て1)にするようにしてもよく、入力バッファ702に記憶した各階調値の最下位ビットが1でないものを0(又は各階調値の最下位ビットが0でないものを1)に書き換えることにより、入力バッファ702に記憶した各階調値の最下位ビットを全て0(又は全て1)にしてもよい。   The bit conversion processing unit 703 performs processing for rewriting the least significant bit of each gradation value stored in the input buffer 702 to a common value of 0 or 1. The bit conversion processing unit 703 writes the value 0 or 1 to the least significant bit of each gradation value stored in the input buffer 702, thereby setting all the least significant bits of each gradation value stored in the input buffer 702 to 0 (or all 1), and by rewriting the least significant bit of each gradation value stored in the input buffer 702 to 0 (or 1 to which the least significant bit of each gradation value is not 0), The least significant bits of each gradation value stored in the input buffer 702 may be all 0 (or all 1).

図6は本実施の形態に係るビット変換処理を説明する説明図である。図6(a)はビット変換処理前のデータ列を示し、図6(b)はビット変換処理後のデータ列を示している。圧縮対象の画像データのRGB各色が8ビットの階調値を有し、更に各画素に8ビットのアルファ値が設定されているものとする。圧縮対象の画像データから各画素におけるRGB値及びアルファ値を順次読み出して、階調値のデータ列を生成した場合、例えば、図6(a)に示すように、「148,126,92,0,148,126,100,0,…」といったデータ列が生成される。   FIG. 6 is an explanatory diagram for explaining the bit conversion processing according to the present embodiment. FIG. 6A shows a data string before the bit conversion process, and FIG. 6B shows a data string after the bit conversion process. It is assumed that each RGB color of the image data to be compressed has an 8-bit gradation value, and an 8-bit alpha value is set for each pixel. When the RGB value and the alpha value in each pixel are sequentially read out from the image data to be compressed to generate a gradation value data string, for example, as shown in FIG. 6A, “148, 126, 92, 0”. , 148, 126, 100, 0, ... "is generated.

本実施の形態では、各階調値における最下位ビットを0又は1の共通の値に書き換えるビット変換処理を実行するので、例えば、最下位ビットを1に書き換えるビット変換処理を実行した場合、図6(b)に示すように、「149,127,93,1,149,127,101,1,…」といったデータ列が生成される。   In this embodiment, since the bit conversion process for rewriting the least significant bit in each gradation value to a common value of 0 or 1 is executed, for example, when the bit conversion process for rewriting the least significant bit to 1 is executed, FIG. As shown in (b), a data string “149, 127, 93, 1, 149, 127, 101, 1,...” Is generated.

符号化処理部704は、ビット変換処理部703にて各階調値の最下位ビットを0又は1の共通の値に書き換えた後のデータ列について符号化処理を行う。本実施の形態では、PNG(Portable Network Graphics)で採用されている圧縮アルゴリズムを用いて、データ列の符号化処理を行う。PNGの圧縮アルゴリズムでは、LZ77の改良アルゴリズムであるLZSSと、ハフマン符号化とを組み合わせたデフレート圧縮により、データ列の符号化を行う。   The encoding processing unit 704 performs an encoding process on the data string after the bit conversion processing unit 703 rewrites the least significant bit of each gradation value to a common value of 0 or 1. In the present embodiment, a data string is encoded using a compression algorithm employed in PNG (Portable Network Graphics). In the PNG compression algorithm, a data string is encoded by deflate compression combining LZSS, which is an improved algorithm of LZ77, and Huffman encoding.

LZSSでは、符号化対象のデータ列から互いに一致する複数の部分データ列を検出し、一致長、一致位置に基づいて符号化対象のデータ列を符号化する。ハフマン符号化は、一定ビットごとに文字列を区切り、区切られた後の文字列を統計的に処理して、出現数が最も多い文字列に対して短い符号を与えることでデータ列を符号化するものである。
PNGの圧縮アルゴリズムでは、部分データ列を含むデータ及び一致長を合わせて1つのハフマン符号で符号化し、一致位置を別のハフマン符号で符号化する。
In LZSS, a plurality of partial data strings that match each other are detected from the data string to be encoded, and the data string to be encoded is encoded based on the matching length and the matching position. Huffman coding separates a character string at every fixed bit, statistically processes the separated character string, and encodes the data string by giving a short code to the character string with the highest number of occurrences. To do.
In the PNG compression algorithm, the data including the partial data string and the matching length are combined and encoded with one Huffman code, and the matching position is encoded with another Huffman code.

符号化処理部704は、符号化処理済みのデータ列をデータ出力部705に順次書き込むことにより、圧縮後の画像データをデータ出力部705に生成させる。   The encoding processing unit 704 causes the data output unit 705 to generate compressed image data by sequentially writing the encoded data sequence to the data output unit 705.

以下、写真シール作成装置が実行する処理について説明を行う。
図7は本実施の形態に係る写真シール作成装置が実行する処理の手順を示すフローチャートである。写真シール作成装置の制御部6に設けられたCPU60は、コイン投入口10から所定料金を満たす硬貨が投入されたか否かを判断する(ステップS1)。所定料金を満たす硬貨が投入されていないと判断した場合(S1:NO)、CPU60は、処理をステップS1へ戻して所定料金を満たす硬貨が投入されたと判断するまで待機する。なお、この間CPU60は、表示パネル12に投入済みの硬貨の総額を表示させるように制御信号を表示パネル12へ出力する。
Hereinafter, processing executed by the photo sticker creating apparatus will be described.
FIG. 7 is a flowchart showing a procedure of processing executed by the photo sticker creating apparatus according to the present embodiment. The CPU 60 provided in the control unit 6 of the photo sticker creating apparatus determines whether or not a coin satisfying a predetermined fee is inserted from the coin insertion slot 10 (step S1). If it is determined that no coin satisfying the predetermined fee has been inserted (S1: NO), the CPU 60 returns to step S1 and waits until it is determined that a coin satisfying the predetermined fee has been inserted. During this time, the CPU 60 outputs a control signal to the display panel 12 so as to display the total amount of coins already inserted on the display panel 12.

CPU60は、ステップS1において所定料金を満たす硬貨が投入されたと判断した場合(S1:YES)、表示パネル12に案内情報の画面を表示し、更に撮影部2のディスプレイ22に操作画面を表示させ、更にスピーカから案内音声を出力し(ステップS2)、ユーザに撮影ブース内に入り、撮影を実行するように促す。これにより、写真プリントサービスの提供が開始される。   When the CPU 60 determines in step S1 that coins satisfying a predetermined fee have been inserted (S1: YES), the CPU 60 displays a guidance information screen on the display panel 12, and further displays an operation screen on the display 22 of the photographing unit 2, Further, a guidance voice is output from the speaker (step S2), and the user is prompted to enter the shooting booth and execute shooting. Thereby, the provision of the photo print service is started.

CPU60は、ユーザがディスプレイ22における操作画面などを操作することにより、合成させる前景画像及び/又は背景画像が選択され、更に、撮影が実行され、完了したか否かを判断する(ステップS3)。具体的には、前景画像及び/又は背景画像が選択されると、シャッターを動作させるためのカウントが開始され、ディスプレイ22にプレビュー画面が表示される。そして、カウントアップされたとCPU60が判断してシャッターを動作させ写真撮影が実行される。ユーザがプレビュー画面を見て撮影された画像で決定する旨のボタン等を操作するか、例えば6回などの所定回数の写真撮影が終了するかにより撮影が完了する。CPU60は、撮影が完了していないと判断した場合(S3:NO)、処理をステップS3へ戻して、撮影が完了するまで待機する。   The CPU 60 determines whether the foreground image and / or the background image to be combined is selected by operating the operation screen on the display 22 and the photographing is executed and completed (step S3). Specifically, when a foreground image and / or a background image is selected, counting for operating the shutter is started, and a preview screen is displayed on the display 22. Then, the CPU 60 determines that the count has been incremented, operates the shutter, and executes photography. The shooting is completed depending on whether the user operates a button or the like indicating that the image is determined by looking at the preview screen, or whether a predetermined number of times of shooting such as six times is completed. If the CPU 60 determines that shooting has not been completed (S3: NO), it returns the process to step S3 and waits until shooting is completed.

CPU60は、撮影が完了したと判断した場合(S3:YES)、シャッターを動作させて写真撮影された画像をカメラ21から取得し、選択された前景画像及び/又は背景画像と関連付けてメモリ61に保存する(ステップS4)。そしてCPU60は、ディスプレイ22に案内情報の画面を表示させ、第1編集部4a又は第2編集部4bのタブレットディスプレイ40a,40bに操作画面を表示させ、スピーカ24,24によって案内音声を出力し(ステップS5)、ユーザに編集空間R2へ移動し、編集操作を行なうように促す。   If the CPU 60 determines that shooting has been completed (S3: YES), the CPU 60 acquires a photographed image from the camera 21 by operating the shutter, and associates it with the selected foreground image and / or background image in the memory 61. Save (step S4). The CPU 60 displays the guidance information screen on the display 22, displays the operation screen on the tablet displays 40a and 40b of the first editing unit 4a or the second editing unit 4b, and outputs guidance voices through the speakers 24 and 24 ( Step S5), prompting the user to move to the editing space R2 and perform an editing operation.

次にCPU60は、メモリ61に保存した写真撮影された画像を画像処理部7へ受け渡して、画像処理を実行させる(ステップS6)。そしてCPU60は、タブレットディスプレイ40a,40bの操作画面にて編集を受け付ける(ステップS7)。このとき、操作画面に表示されるユーザを撮影した画像は、画像処理後の画像であってもよい。この場合、CPU60は画像処理後の小顔にする加工が行なわれた撮影画像をクロマキー処理して人物のみの画像を作成し、操作画面に前景画像及び/又は背景画像と重ねて表示させる。   Next, the CPU 60 transfers the photographed image stored in the memory 61 to the image processing unit 7 to execute image processing (step S6). The CPU 60 accepts editing on the operation screen of the tablet displays 40a and 40b (step S7). At this time, the image of the user displayed on the operation screen may be an image after image processing. In this case, the CPU 60 performs chroma key processing on the captured image that has been processed to make a small face after image processing, creates an image of only the person, and displays the image on the operation screen so as to overlap the foreground image and / or the background image.

CPU60は、編集完了を指示する操作がされたことにより編集が完了し、且つ画像処理部7による画像処理が完了したか否かを判断する(ステップS8)。CPU60は、編集又は画像処理部7による画像処理のいずれかが未完了であると判断した場合(S8:NO)、処理をステップS8に戻して両者が完了するまで待機する。   The CPU 60 determines whether the editing is completed due to the operation for instructing the completion of editing and whether the image processing by the image processing unit 7 is completed (step S8). If the CPU 60 determines that either editing or image processing by the image processing unit 7 has not been completed (S8: NO), the process returns to step S8 and waits until both are completed.

CPU60は、編集及び画像処理のいずれもが完了したと判断した場合(S8:YES)、画像処理部7による画像処理によって加工が完了した加工画像と、編集結果の文字又は画像などの情報と、選択されて関連付けてメモリ61に保存されている背景画像及び/又は前景画像とに対し合成処理を実行して合成画像を生成する(ステップS9)。   When the CPU 60 determines that both editing and image processing have been completed (S8: YES), the processed image that has been processed by the image processing by the image processing unit 7, information such as characters or images of the editing result, A synthesis process is performed on the background image and / or the foreground image selected and associated and stored in the memory 61 to generate a synthesized image (step S9).

次いで、CPU60は、生成された合成画像を基に外部サーバ装置への送信用画像データを生成する(ステップS10)。このとき、CPU60は、画像処理部7に指示を与えることにより、合成画像に対して平滑化処理を施し、更に符号化処理を行うことによって送信用の画像データを生成する。   Next, the CPU 60 generates image data for transmission to the external server device based on the generated composite image (step S10). At this time, the CPU 60 gives an instruction to the image processing unit 7 to perform a smoothing process on the composite image, and further performs an encoding process to generate image data for transmission.

画像処理部7は、ステップS10で平滑化処理及び符号化処理を施した送信用の画像データを制御部6へ送出する。制御部6は、画像処理部7から取得した画像データをHDD62に格納する。そして、制御部6の制御により、HDD62に格納した符号化済みの画像データを、通信部9を介して外部のサーバ装置へ送信する。   The image processing unit 7 sends the image data for transmission subjected to the smoothing process and the encoding process in step S <b> 10 to the control unit 6. The control unit 6 stores the image data acquired from the image processing unit 7 in the HDD 62. Then, under the control of the control unit 6, the encoded image data stored in the HDD 62 is transmitted to an external server device via the communication unit 9.

また、CPU60は、ステップS9で生成された合成画像を操作画面に表示すると共に、印刷部5のプリンタ50へ出力して印刷出力を指示する(ステップS11)。このときCPU60は、操作画面にて印刷レイアウトの選択、印刷指示を受け付けてもよい。   In addition, the CPU 60 displays the composite image generated in step S9 on the operation screen and outputs it to the printer 50 of the printing unit 5 to instruct printing output (step S11). At this time, the CPU 60 may accept a print layout selection and a print instruction on the operation screen.

CPU60は、印刷が完了したか否かを判断し(ステップS12)、印刷が完了していないと判断した場合(S12:NO)、処理をステップS12へ戻して印刷が完了したと判断するまで待機する。CPU60は、プリンタ50における印刷が完了したと判断した場合(S12:YES)、印刷が完了した旨を示す案内表示を印刷部5の表示パネル52、第1編集部4a又は第2編集部4bのタブレットディスプレイ40a,40bに表示し、スピーカ43a,43bから案内音声を出力し(ステップS13)、処理を終了する。   The CPU 60 determines whether or not printing has been completed (step S12). If it is determined that printing has not been completed (S12: NO), the process returns to step S12 and waits until it is determined that printing has been completed. To do. When the CPU 60 determines that the printing in the printer 50 is completed (S12: YES), the CPU 60 displays a guidance display indicating that the printing is completed on the display panel 52, the first editing unit 4a, or the second editing unit 4b of the printing unit 5. The information is displayed on the tablet displays 40a and 40b, guidance voices are output from the speakers 43a and 43b (step S13), and the process is terminated.

このとき、印刷された写真シールがシール吐出口51に排出されているので、ユーザは自身が撮影された写真シールを取得することができる。このように、写真プリントサービスの提供が実現される。   At this time, since the printed photo sticker is discharged to the sticker discharge port 51, the user can obtain the photo sticker in which the user is photographed. Thus, the provision of a photo print service is realized.

次に、図7に示したフローチャートのステップS10の処理について詳細を説明する。図8は送信用画像データの生成手順を示すフローチャートである。画像処理部7は、圧縮対象の画像データを制御部6内のHDD62から取得する(ステップS101)。取得した画像データは、画像処理部7内のデータ入力部701に記憶される。   Next, details of step S10 of the flowchart shown in FIG. 7 will be described. FIG. 8 is a flowchart showing a procedure for generating image data for transmission. The image processing unit 7 acquires the image data to be compressed from the HDD 62 in the control unit 6 (step S101). The acquired image data is stored in the data input unit 701 in the image processing unit 7.

画像処理部7は、取得した画像データから、入力バッファ702のバッファサイズ分だけ、各画素の階調値(RGB値及びファルファ値)を順次読み込んで入力バッファ702に記憶させる(ステップS102)。   The image processing unit 7 sequentially reads the gradation value (RGB value and farfa value) of each pixel from the acquired image data by the buffer size of the input buffer 702 and stores it in the input buffer 702 (step S102).

ビット変換処理部703は、入力バッファ702に記憶させた各階調値の最下位ビットを0又は1の共通の値に書き換える処理を行う(ステップS103)。
次いで、画像処理部7は、入力バッファ702に記憶させた全画素についてのビット変換処理が完了したか否かを判断し(ステップS104)、入力バッファ702内の全画素についてビット変換処理が完了していない場合(S104:NO)、処理をステップS103へ戻す。
The bit conversion processing unit 703 performs processing to rewrite the least significant bit of each gradation value stored in the input buffer 702 to a common value of 0 or 1 (step S103).
Next, the image processing unit 7 determines whether or not the bit conversion processing for all the pixels stored in the input buffer 702 is completed (step S104), and the bit conversion processing is completed for all the pixels in the input buffer 702. If not (S104: NO), the process returns to step S103.

入力バッファ702に記憶させた全画素についてのビット変換処理が完了したと判断した場合(S104:YES)、入力バッファ702は、ビット変換処理後のデータ列を符号化処理部704へ出力する。   When it is determined that the bit conversion processing for all the pixels stored in the input buffer 702 has been completed (S104: YES), the input buffer 702 outputs the data string after the bit conversion processing to the encoding processing unit 704.

次いで、画像処理部7は、ステップS101で取得した画像データを構成する全画素についてビット変換処理が完了したか否かを判断する(ステップS105)。画像データを構成する全画素についてビット変換処理が完了していない場合(S105:NO)、画像処理部7は、処理をステップS102へ戻し、S102以降の処理を続行する。   Next, the image processing unit 7 determines whether or not the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S101 (step S105). If the bit conversion process has not been completed for all the pixels constituting the image data (S105: NO), the image processing unit 7 returns the process to step S102, and continues the processes after S102.

ステップS101で取得した画像データを構成する全画素についてビット変換処理が完了したと判断した場合(S105:YES)、符号化処理部704は、各階調値の最下位ビットを0又は1の共通の値に書き換えた全画素分のデータ列に対して、符号化処理を施す(ステップS106)。符号化処理部704は、例えば、PNGで採用されている圧縮アルゴリズムを用いて、データ列を符号化することができる。符号化処理部704は、符号化済みのデータ列をデータ出力部705へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S101 (S105: YES), the encoding processing unit 704 sets the least significant bit of each gradation value to 0 or 1 in common. Encoding processing is performed on the data string for all the pixels rewritten to values (step S106). The encoding processing unit 704 can encode the data string using, for example, a compression algorithm adopted by PNG. The encoding processing unit 704 outputs the encoded data string to the data output unit 705.

画像処理部7は、全画像データに対する符号化処理が完了したか否かを判断する(ステップS107)。未処理の画像データが存在する場合(S107:NO)、画像処理部7は、処理をステップS101へ戻し、ステップS101以降の処理を続行する。
全画像データに対する符号化処理が完了した場合(S107:YES)、画像処理部7は、本フローチャートによる処理を終了し、データ出力部705に生成される圧縮後の各画像データを送信用画像データとして出力する。
The image processing unit 7 determines whether or not the encoding process for all the image data has been completed (step S107). If unprocessed image data exists (S107: NO), the image processing unit 7 returns the process to step S101, and continues the processes after step S101.
When the encoding process for all the image data is completed (S107: YES), the image processing unit 7 ends the process according to this flowchart, and the compressed image data generated in the data output unit 705 is transmitted as the transmission image data. Output as.

実施の形態1では、データ列の符号化処理を実行する前に、各階調値の最下位ビットを0又は1の共通の値に書き換えることを特徴の1つとしている。ビット変換処理において変換する階調値はたかだか1に過ぎないので、この差を色差として人間の眼により認識することはほぼ不可能である。その一方で、RGB各色及びアルファ値における最下位ビットを0又は1の共通の値に書き換えることにより、符号化対象のデータ列に現れる階調数を256(各階調値が8ビットの場合)から128に減らすことができるため、続く符号化処理において、互いに一致する部分データ列を検出する際に、より多くの部分データ列を検出できる可能性が高まり、また、より長い一致長で一致する部分データ列を検出できる可能性が高まる。この結果、従来のPNG形式で用いられていた圧縮アルゴリズムと比較して、圧縮率を高めることができる。    The first embodiment is characterized in that the least significant bit of each gradation value is rewritten to a common value of 0 or 1 before executing the data string encoding process. Since the gradation value to be converted in the bit conversion process is only 1, it is almost impossible to recognize this difference as a color difference by human eyes. On the other hand, by rewriting the least significant bit of each RGB color and alpha value to a common value of 0 or 1, the number of gradations appearing in the data sequence to be encoded is 256 (when each gradation value is 8 bits). Since it can be reduced to 128, in the subsequent encoding process, when detecting partial data strings that match each other, the possibility that more partial data strings can be detected increases, and a part that matches with a longer match length The possibility that the data string can be detected increases. As a result, the compression rate can be increased as compared with the compression algorithm used in the conventional PNG format.

例えば、圧縮前の画像データが1.9MBのデータサイズを有し、各画素がRGBの3つのカラーチャンネル及び1つのアルファチャンネルからなる640画素×767画素のビットマップイメージを、従来のPNG形式による圧縮アルゴリズム(レベル9の最高圧縮を選択)で圧縮した場合、圧縮後の画像データのサイズは884KBとなった。これに対し、本願発明の画像圧縮方法を適用した場合、圧縮後の画像データのサイズは720KBとなり、レベル9の最高圧縮のPNG形式と比較しても、およそ120%程度の更なる高圧縮化が可能となった。   For example, a bitmap image of 640 pixels × 767 pixels in which the image data before compression has a data size of 1.9 MB and each pixel is composed of three color channels of RGB and one alpha channel is converted into a conventional PNG format. When compression was performed using a compression algorithm (the highest level 9 compression was selected), the size of the compressed image data was 884 KB. On the other hand, when the image compression method of the present invention is applied, the size of the compressed image data is 720 KB, which is about 120% higher compression than the highest compression PNG format of level 9. Became possible.

以上のように、本実施の形態では、写真シール作成装置で求められる画質を維持しつつ、画像データのデータ量を削減することができるので、写真シール作成装置から外部のサーバ装置へ画像データをアップロードする時間、及び外部のサーバ装置からユーザの端末に画像データをダウンロードする時間を短縮することができ、通信コストを抑制することができる。   As described above, in the present embodiment, the amount of image data can be reduced while maintaining the image quality required by the photo sticker creation device, so image data can be transferred from the photo sticker creation device to an external server device. The upload time and the time for downloading the image data from the external server device to the user terminal can be shortened, and the communication cost can be suppressed.

実施の形態2.
実施の形態1では、RGBの3つのカラーチャンネル及び1つのアルファチャンネルの夫々について最下位ビットを0又は1の共通の値に書き換える構成としたが、カラーチャンネル毎の各階調値の出現頻度に基づいて、最下位ビットの書き換えを禁止すべきカラーチャンネルを決定する構成としてもよい。
実施の形態2では、カラーチャンネル毎の各階調値の出現頻度に基づいて、最下位ビットの書き換えを禁止すべきカラーチャンネルを決定し、決定したカラーチャンネルについては最下位ビットの書き換えを禁止する構成について説明を行う。なお、実施の形態2に係る写真シール作成装置の構成は、実施の形態1と全く同様であるため、その説明を省略することとする。
Embodiment 2. FIG.
In the first embodiment, the least significant bit is rewritten to a common value of 0 or 1 for each of the three RGB color channels and one alpha channel, but based on the appearance frequency of each gradation value for each color channel. Thus, a configuration may be adopted in which a color channel that should prohibit rewriting of the least significant bit is determined.
In the second embodiment, a color channel that should prohibit rewriting of the least significant bit is determined based on the appearance frequency of each gradation value for each color channel, and rewriting of the least significant bit is prohibited for the determined color channel Will be described. Note that the configuration of the photo sticker creating apparatus according to the second embodiment is exactly the same as that of the first embodiment, and thus the description thereof is omitted.

図9は実施の形態2に係る送信用画像データの生成手順を示すフローチャートである。画像処理部7は、圧縮対象の画像データを制御部6内のHDD62から取得する(ステップS121)。取得した画像データは、画像処理部7内のデータ入力部701に記憶される。   FIG. 9 is a flowchart showing a procedure for generating image data for transmission according to the second embodiment. The image processing unit 7 acquires the image data to be compressed from the HDD 62 in the control unit 6 (step S121). The acquired image data is stored in the data input unit 701 in the image processing unit 7.

画像処理部7は、データ入力部701に記憶した画像データについて、カラーチャンネル毎に各階調値の出現頻度を計数し(ステップS122)、計数結果をメモリ71に保持する。   The image processing unit 7 counts the appearance frequency of each gradation value for each color channel in the image data stored in the data input unit 701 (step S122), and holds the count result in the memory 71.

次いで、画像処理部7は、計数したカラーチャンネル毎の各階調値の出現頻度に基づき、ビット変換処理を禁止するカラーチャンネルを決定する(ステップS123)。このとき、画像処理部7は、カラーチャンネル毎の各階調値の出現頻度についてヒストグラムを生成する。そして、画像処理部7は、例えば、カラーチャンネル毎にヒストグラムの中央値を求め、求めた中央値が最も大きいカラーチャンネルについてのビット変換処理を禁止すべきと決定する。   Next, the image processing unit 7 determines a color channel for which bit conversion processing is prohibited based on the appearance frequency of each gradation value for each counted color channel (step S123). At this time, the image processing unit 7 generates a histogram for the appearance frequency of each gradation value for each color channel. Then, for example, the image processing unit 7 obtains the median value of the histogram for each color channel, and determines that the bit conversion processing for the color channel having the largest obtained median value should be prohibited.

なお、本実施の形態では、ヒストグラムの中央値によりビット変換処理を禁止すべきカラーチャンネルを決定する構成としたが、カラーチャンネル毎の各階調値の出現頻度に基づき、画質に影響を及ぼす可能性が高いカラーチャンネルを禁止すべきカラーチャンネルと決定すればよく、ヒストグラムの中央値に限らず、平均値、ヒストグラムのピーク最大値を与える階調値等を用いて決定してもよい。   In this embodiment, the color channel for which bit conversion processing should be prohibited is determined based on the median value of the histogram. However, the image quality may be affected based on the appearance frequency of each gradation value for each color channel. The color channel having a high value may be determined as a color channel to be prohibited, and may be determined using not only the median value of the histogram but also an average value, a gradation value that gives the peak maximum value of the histogram, and the like.

次いで、画像処理部7は、データ入力部701に記憶した画像データから、入力バッファ702のバッファサイズ分だけ、各画素の階調値(RGB値及びアルファ値)を順次読み込んで入力バッファ702に記憶させる(ステップS124)。   Next, the image processing unit 7 sequentially reads the gradation value (RGB value and alpha value) of each pixel from the image data stored in the data input unit 701 by the buffer size of the input buffer 702 and stores it in the input buffer 702. (Step S124).

ビット変換処理部703は、入力バッファ702に生成させたデータ列における各階調値の最下位ビットのうち、ビット変換処理が禁止されたカラーチャンネル以外のカラーチャンネル及びアルファチャンネルについて、最下位ビットを0又は1の共通の値に書き換えるビット変換処理を行う(ステップS125)。
次いで、画像処理部7は、入力バッファ702に記憶させた全画素についてのビット変換処理が完了したか否かを判断し(ステップS126)、入力バッファ702内の全画素についてビット変換処理が完了していない場合(S126:NO)、処理をステップS125へ戻す。
The bit conversion processing unit 703 sets the least significant bit to 0 for the color channel and the alpha channel other than the color channel for which the bit conversion processing is prohibited among the least significant bits of each gradation value in the data string generated in the input buffer 702. Alternatively, a bit conversion process for rewriting to a common value of 1 is performed (step S125).
Next, the image processing unit 7 determines whether or not the bit conversion processing for all the pixels stored in the input buffer 702 has been completed (step S126), and the bit conversion processing has been completed for all the pixels in the input buffer 702. If not (S126: NO), the process returns to step S125.

入力バッファ702に記憶させた全画素についてのビット変換処理が完了したと判断した場合(S126:YES)、入力バッファ702は、ビット変換処理後のデータ列を符号化処理部704へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels stored in the input buffer 702 (S126: YES), the input buffer 702 outputs the data string after the bit conversion processing to the encoding processing unit 704.

次いで、画像処理部7は、ステップS121で取得した画像データを構成する全画素についてビット変換処理が完了したか否かを判断する(ステップS127)。画像データを構成する全画素についてビット変換処理が完了していない場合(S127:NO)、画像処理部7は、処理をステップS124へ戻し、S124以降の処理を続行する。   Next, the image processing unit 7 determines whether or not the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S121 (step S127). If the bit conversion process has not been completed for all the pixels constituting the image data (S127: NO), the image processing unit 7 returns the process to step S124, and continues the processes after S124.

ステップS121で取得した画像データを構成する全画素についてビット変換処理が完了したと判断した場合(S127:YES)、符号化処理部704は、ビット変換処理を行った後の全画素分のデータ列に対して、符号化処理を施す(ステップS128)。符号化処理部704は、例えば、PNGで採用されている圧縮アルゴリズムを用いて、データ列を符号化することができる。符号化処理部704は、符号化済みのデータ列をデータ出力部705へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S121 (S127: YES), the encoding processing unit 704 performs a data sequence for all the pixels after the bit conversion processing is performed. Is subjected to encoding processing (step S128). The encoding processing unit 704 can encode the data string using, for example, a compression algorithm adopted by PNG. The encoding processing unit 704 outputs the encoded data string to the data output unit 705.

画像処理部7は、全画像データに対する符号化処理が完了したか否かを判断する(ステップS129)。未処理の画像データが存在する場合(S129:NO)、画像処理部7は、処理をステップS121へ戻し、ステップS121以降の処理を続行する。
全画像データに対する符号化処理が完了した場合(S129:YES)、画像処理部7は、本フローチャートによる処理を終了し、データ出力部705に生成される圧縮後の各画像データを送信用画像データとして出力する。
The image processing unit 7 determines whether or not the encoding process for all the image data has been completed (step S129). If unprocessed image data exists (S129: NO), the image processing unit 7 returns the process to step S121, and continues the processes after step S121.
When the encoding process for all the image data is completed (S129: YES), the image processing unit 7 ends the process according to this flowchart, and the compressed image data generated in the data output unit 705 is transmitted as the transmission image data. Output as.

実施の形態2では、最下位ビットの階調値を0又は1の共通の値に変換した場合に画質に影響があるカラーチャンネルについてのビット変換処理を禁止するので、圧縮後の画質を低下させることなく、圧縮率の向上を見込むことができる。   In the second embodiment, since the bit conversion processing is prohibited for the color channel that affects the image quality when the gradation value of the least significant bit is converted to a common value of 0 or 1, the image quality after compression is reduced. Therefore, the improvement of the compression rate can be expected.

実施の形態3.
実施の形態1では、RGBの3つのカラーチャンネル及び1つのアルファチャンネルの夫々について最下位ビットを0又は1の共通の値に書き換える構成としたが、カラーチャンネル毎の各階調値の出現頻度に基づいて、最下位ビットより更に高位側のビットを書き換えるカラーチャンネルを決定する構成としてもよい。
実施の形態3では、カラーチャンネル毎の各階調値の出現頻度に基づいて、最下位ビットより更に高位側のビットを書き換えるカラーチャンネルを決定し、決定したカラーチャンネルについては更に高位側のビットを0又は1の共通の値に書き換える構成について説明を行う。なお、実施の形態3に係る写真シール作成装置の構成は、実施の形態1と全く同様であるため、その説明を省略することとする。
Embodiment 3 FIG.
In the first embodiment, the least significant bit is rewritten to a common value of 0 or 1 for each of the three RGB color channels and one alpha channel, but based on the appearance frequency of each gradation value for each color channel. Thus, the color channel for rewriting the higher-order bits than the least significant bit may be determined.
In Embodiment 3, based on the appearance frequency of each gradation value for each color channel, a color channel for rewriting a higher-order bit than the least significant bit is determined, and for the determined color channel, a higher-order bit is set to 0. Or the structure rewritten to the common value of 1 is demonstrated. Note that the configuration of the photo sticker creating apparatus according to the third embodiment is exactly the same as that of the first embodiment, and thus the description thereof is omitted.

図10は実施の形態3に係る送信用画像データの生成手順を示すフローチャートである。画像処理部7は、圧縮対象の画像データを制御部6内のHDD62から取得する(ステップS131)。取得した画像データは、画像処理部7内のデータ入力部701に記憶される。   FIG. 10 is a flowchart showing a procedure for generating image data for transmission according to the third embodiment. The image processing unit 7 acquires the image data to be compressed from the HDD 62 in the control unit 6 (step S131). The acquired image data is stored in the data input unit 701 in the image processing unit 7.

画像処理部7は、データ入力部701に記憶した画像データについて、カラーチャンネル毎に各階調値の出現頻度を計数し(ステップS132)、計数結果をメモリ71に保持する。   The image processing unit 7 counts the appearance frequency of each gradation value for each color channel in the image data stored in the data input unit 701 (step S132), and holds the count result in the memory 71.

次いで、画像処理部7は、計数したカラーチャンネル毎の各階調値の出現頻度に基づき、最下位ビットより高位側のビット(例えば、最下位側から2ビット目乃至3ビット目)を0又は1の共通の値に書き換えるカラーチャンネルを決定する(ステップS133)。このとき、画像処理部7は、カラーチャンネル毎の各階調値の出現頻度についてヒストグラムを生成する。そして、画像処理部7は、例えば、ヒストグラムの中央値に対応する階調値をカラーチャンネル毎に求め、求めた階調値が最も小さいカラーチャンネルを、更に高位側のビットを0又は1の共通の値に書き換えるべきカラーチャンネルとして決定する。   Next, the image processing unit 7 sets the bits higher than the least significant bit (for example, the second to third bits from the least significant bit) to 0 or 1 based on the appearance frequency of each gradation value for each color channel thus counted. A color channel to be rewritten to a common value is determined (step S133). At this time, the image processing unit 7 generates a histogram for the appearance frequency of each gradation value for each color channel. The image processing unit 7 obtains, for example, a gradation value corresponding to the median value of the histogram for each color channel, the color channel having the smallest obtained gradation value, and a higher-order bit of 0 or 1 in common. The color channel to be rewritten to the value of is determined.

なお、本実施の形態では、ヒストグラムの中央値により高位側のビットを変換すべきカラーチャンネルを決定する構成としたが、カラーチャンネル毎の各階調値の出現頻度に基づき、高位側のビットを変換したとしても画質に影響を及ぼす可能性が低いカラーチャンネルを決定する構成とすればよく、ヒストグラムの中央値に限らず、平均値、ヒストグラムのピーク最大値を与える階調値等を用いて決定してもよい。   In this embodiment, the color channel to which the high-order bit is to be converted is determined by the median value of the histogram. However, the high-order bit is converted based on the appearance frequency of each gradation value for each color channel. Even so, it is sufficient to determine a color channel with a low possibility of affecting the image quality, and not only the median value of the histogram but also the average value, the gradation value that gives the peak maximum value of the histogram, etc. May be.

次いで、画像処理部7は、データ入力部701に記憶した画像データから、入力バッファ702のバッファサイズ分だけ、各画素の階調値(RGB値及びアルファ値)を順次読み込んで入力バッファ702に記憶させる(ステップS134)。   Next, the image processing unit 7 sequentially reads the gradation value (RGB value and alpha value) of each pixel from the image data stored in the data input unit 701 by the buffer size of the input buffer 702 and stores it in the input buffer 702. (Step S134).

次いで、ビット変換処理部703は、入力バッファ702に生成させたデータ列における各階調値の最下位ビットを0又は1の共通の値に書き換えると共に、ステップS133で決定したカラーチャンネルについては最下位側から2ビット目乃至3ビット目の階調値を0又は1の共通の値に書き換えるビット変換処理を行う(ステップS135)。   Next, the bit conversion processing unit 703 rewrites the least significant bit of each gradation value in the data string generated in the input buffer 702 to a common value of 0 or 1, and the least significant side for the color channel determined in step S133. Then, bit conversion processing for rewriting the gradation values of the 2nd to 3rd bits to 0 or 1 common values is performed (step S135).

次いで、画像処理部7は、入力バッファ702に記憶させた全画素についてのビット変換処理が完了したか否かを判断し(ステップS136)、入力バッファ702内の全画素についてビット変換処理が完了していない場合(S136:NO)、処理をステップS135へ戻す。   Next, the image processing unit 7 determines whether or not the bit conversion processing has been completed for all the pixels stored in the input buffer 702 (step S136), and the bit conversion processing has been completed for all the pixels in the input buffer 702. If not (S136: NO), the process returns to step S135.

入力バッファ702に記憶させた全画素についてのビット変換処理が完了したと判断した場合(S136:YES)、入力バッファ702は、ビット変換処理後のデータ列を符号化処理部704へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels stored in the input buffer 702 (S136: YES), the input buffer 702 outputs the data string after the bit conversion processing to the encoding processing unit 704.

次いで、画像処理部7は、ステップS101で取得した画像データを構成する全画素についてビット変換処理が完了したか否かを判断する(ステップS137)。画像データを構成する全画素についてビット変換処理が完了していない場合(S137:NO)、画像処理部7は、処理をステップS134へ戻し、S134以降の処理を続行する。   Next, the image processing unit 7 determines whether or not the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S101 (step S137). If the bit conversion process has not been completed for all the pixels constituting the image data (S137: NO), the image processing unit 7 returns the process to step S134, and continues the processes after S134.

ステップS131で取得した画像データを構成する全画素についてビット変換処理が完了したと判断した場合(S137:YES)、符号化処理部704は、ビット変換処理を行った後の全画素分のデータ列に対して、符号化処理を施す(ステップS138)。符号化処理部704は、例えば、PNGで採用されている圧縮アルゴリズムを用いて、データ列を符号化することができる。符号化処理部704は、符号化済みのデータ列をデータ出力部705へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S131 (S137: YES), the encoding processing unit 704 performs a data sequence for all the pixels after the bit conversion processing is performed. Then, the encoding process is performed (step S138). The encoding processing unit 704 can encode the data string using, for example, a compression algorithm adopted by PNG. The encoding processing unit 704 outputs the encoded data string to the data output unit 705.

画像処理部7は、全画像データに対する符号化処理が完了したか否かを判断する(ステップS139)。未処理の画像データが存在する場合(S139:NO)、画像処理部7は、処理をステップS131へ戻し、ステップS131以降の処理を続行する。
全画像データに対する符号化処理が完了した場合(S139:YES)、画像処理部7は、本フローチャートによる処理を終了し、データ出力部705に生成される圧縮後の各画像データを送信用画像データとして出力する。
The image processing unit 7 determines whether or not the encoding process for all the image data has been completed (step S139). If unprocessed image data exists (S139: NO), the image processing unit 7 returns the process to step S131, and continues the processes after step S131.
When the encoding process for all the image data is completed (S139: YES), the image processing unit 7 ends the process according to the flowchart, and the compressed image data generated in the data output unit 705 is transmitted as the transmission image data. Output as.

実施の形態3では、最下位ビットだけでなく2ビット目乃至3ビット目の階調値を0又は1の共通の値に変換したとしても画質に影響が少ないカラーチャンネルを選択し、選択したカラーチャンネルについては、最下位ビットだけでなく2ビット目乃至3ビット目の階調値を0又は1の共通の値に変換するので、画質を低下させることなく、更なる圧縮率の向上を見込むことができる。   In Embodiment 3, not only the least significant bit but also the tone value of the 2nd to 3rd bits is converted to a common value of 0 or 1, a color channel that has little influence on image quality is selected, and the selected color For the channel, the gradation values of the 2nd to 3rd bits as well as the least significant bit are converted to a common value of 0 or 1, so that further improvement of the compression rate can be expected without degrading the image quality Can do.

実施の形態4.
実施の形態1では、RGBの3つのカラーチャンネル及び1つのアルファチャンネルの夫々について最下位ビットを0又は1の共通の値に書き換える構成としたが、アルファチャンネルにより略透明に設定されている画素については、カラーチャンネルで指定される色情報としての重要性は極めて低いため、そのような画素について更に高位側のビットを0又は1の共通の値に書き換える構成としてもよい。
実施の形態4では、各画素の透明度が閾値以上であるか否かを判断し、透明度が閾値以上の画素については最下位ビットだけでなく、更に高位側のビットを0又は1の共通の値に書き換える構成について説明を行う。なお、実施の形態4に係る写真シール作成装置の構成は、実施の形態1と全く同様であるため、その説明を省略することとする。
Embodiment 4 FIG.
In the first embodiment, the least significant bit is rewritten to a common value of 0 or 1 for each of the three color channels of RGB and one alpha channel, but pixels that are set to be substantially transparent by the alpha channel are described. Since the importance as color information specified by the color channel is extremely low, the higher-order bits of such pixels may be rewritten to a common value of 0 or 1.
In the fourth embodiment, it is determined whether or not the transparency of each pixel is equal to or greater than a threshold value. For pixels having a transparency equal to or greater than the threshold value, not only the least significant bit but also the higher-order bit is a common value of 0 or 1. The configuration to be rewritten will be described. In addition, since the structure of the photograph sticker production apparatus which concerns on Embodiment 4 is completely the same as that of Embodiment 1, the description will be omitted.

図11は実施の形態4に係る送信用画像データの生成手順を示すフローチャートである。画像処理部7は、圧縮対象の画像データを制御部6内のHDD62から取得する(ステップS141)。取得した画像データは、画像処理部7内のデータ入力部701に記憶される。   FIG. 11 is a flowchart showing a procedure for generating image data for transmission according to the fourth embodiment. The image processing unit 7 acquires the image data to be compressed from the HDD 62 in the control unit 6 (step S141). The acquired image data is stored in the data input unit 701 in the image processing unit 7.

画像処理部7は、データ入力部701に記憶した画像データから、入力バッファ702のバッファサイズ分だけ、各画素の階調値(RGB値及びアルファ値)を順次読み込み(ステップS142)、入力バッファ702内の各画素の透明度が予め設定した閾値以上であるか否かを判断する(ステップS143)。各画素の透明度は、例えば0から255までのアルファ値により指定されており、アルファ値が0の場合は透明、255の場合は不透明であるため、アルファ値が所定値以下(例えば、1以下)の場合に透明度が閾値以上であると判断することができる。   The image processing unit 7 sequentially reads the gradation value (RGB value and alpha value) of each pixel from the image data stored in the data input unit 701 by the buffer size of the input buffer 702 (step S142), and the input buffer 702. It is determined whether or not the transparency of each of the pixels is greater than or equal to a preset threshold value (step S143). The transparency of each pixel is specified by an alpha value from 0 to 255, for example. When the alpha value is 0, the transparency is transparent, and when it is 255, the alpha value is not more than a predetermined value (for example, 1 or less). In this case, it can be determined that the transparency is equal to or greater than the threshold value.

特定の画素の透明度が閾値以上であると判断した場合(S143:YES)、ビット変換処理部703は、当該画素のカラーチャンネル及びアルファチャンネルの最下位ビットを0又は1の共通の値に書き換えると共に、カラーチャンネルの高位側のビットを0又は1の共通の値に書き換える(ステップS144)。ビット変換処理部703により書き換える高位側のビットとしては、最下位側から2ビット目を選択してもよく、最下位側から2ビット目及び3ビット目を選択してもよい。   When it is determined that the transparency of the specific pixel is equal to or greater than the threshold (S143: YES), the bit conversion processing unit 703 rewrites the least significant bit of the color channel and the alpha channel of the pixel to a common value of 0 or 1. The high-order bits of the color channel are rewritten to a common value of 0 or 1 (step S144). As the high-order bits rewritten by the bit conversion processing unit 703, the second bit may be selected from the least significant side, and the second and third bits may be selected from the least significant side.

また、特定の画素の透明度が閾値未満であると判断した場合(S143:NO)、ビット変換処理部703は、当該画素のカラーチャンネル及びアルファチャンネルの最下位ビットを0又は1の共通の値に書き換る(ステップS145)。   If it is determined that the transparency of a specific pixel is less than the threshold (S143: NO), the bit conversion processing unit 703 sets the least significant bit of the color channel and the alpha channel of the pixel to a common value of 0 or 1. Rewriting is performed (step S145).

ステップS144又はS145でビット変換処理を行った後、画像処理部7は、入力バッファ702に記憶させた全画素についてのビット変換処理が完了したか否かを判断し(ステップS146)、入力バッファ702内の全画素についてビット変換処理が完了していない場合(S146:NO)、処理をステップS143へ戻す。   After performing the bit conversion process in step S144 or S145, the image processing unit 7 determines whether or not the bit conversion process for all the pixels stored in the input buffer 702 has been completed (step S146), and the input buffer 702. If bit conversion processing has not been completed for all of the pixels (S146: NO), the processing returns to step S143.

入力バッファ702に記憶させた全画素についてのビット変換処理が完了したと判断した場合(S146:YES)、入力バッファ702は、ビット変換処理後のデータ列を符号化処理部704へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels stored in the input buffer 702 (S146: YES), the input buffer 702 outputs the data string after the bit conversion processing to the encoding processing unit 704.

次いで、画像処理部7は、ステップS141で取得した画像データを構成する全画素についてビット変換処理が完了したか否かを判断する(ステップS147)。画像データを構成する全画素についてビット変換処理が完了していない場合(S147:NO)、画像処理部7は、処理をステップS142へ戻し、S142以降の処理を続行する。   Next, the image processing unit 7 determines whether or not the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S141 (step S147). When the bit conversion process has not been completed for all the pixels constituting the image data (S147: NO), the image processing unit 7 returns the process to step S142, and continues the processes after S142.

ステップS141で取得した画像データを構成する全画素についてビット変換処理が完了したと判断した場合(S147:YES)、符号化処理部704は、ビット変換処理を行った後の全画素分のデータ列に対して、符号化処理を施す(ステップS148)。符号化処理部704は、例えば、PNGで採用されている圧縮アルゴリズムを用いて、データ列を符号化することができる。符号化処理部704は、符号化済みのデータ列をデータ出力部705へ出力する。   When it is determined that the bit conversion processing has been completed for all the pixels constituting the image data acquired in step S141 (S147: YES), the encoding processing unit 704 has a data string for all the pixels after the bit conversion processing is performed. Then, the encoding process is performed (step S148). The encoding processing unit 704 can encode the data string using, for example, a compression algorithm adopted by PNG. The encoding processing unit 704 outputs the encoded data string to the data output unit 705.

画像処理部7は、全画像データに対する符号化処理が完了したか否かを判断する(ステップS149)。未処理の画像データが存在する場合(S149:NO)、画像処理部7は、処理をステップS141へ戻し、ステップS141以降の処理を続行する。
全画像データに対する符号化処理が完了した場合(S149:YES)、画像処理部7は、本フローチャートによる処理を終了し、データ出力部705に生成される圧縮後の各画像データを送信用画像データとして出力する。
The image processing unit 7 determines whether or not the encoding process for all image data has been completed (step S149). If unprocessed image data exists (S149: NO), the image processing unit 7 returns the process to step S141, and continues the processes after step S141.
When the encoding process for all the image data is completed (S149: YES), the image processing unit 7 ends the process according to the flowchart, and the compressed image data generated in the data output unit 705 is transmitted as the transmission image data. Output as.

実施の形態4では、各画素の透明度が閾値以上であるか否かを判断することにより、最下位ビットだけでなく2ビット目乃至3ビット目の階調値を0又は1の共通の値に変換したとしても画質に影響が少ない画素を選択し、選択した画素のカラーチャンネルについては、最下位ビットだけでなく2ビット目乃至3ビット目の階調値を0又は1の共通の値に変換するので、画質を低下させることなく、更なる圧縮率の向上を見込むことができる。   In the fourth embodiment, by determining whether or not the transparency of each pixel is equal to or greater than a threshold value, the gradation values of the second to third bits as well as the least significant bit are set to a common value of 0 or 1. Select a pixel that has little effect on image quality even if converted, and for the color channel of the selected pixel, convert not only the least significant bit but also the 2nd to 3rd bit gradation values to a common value of 0 or 1 Therefore, further improvement of the compression rate can be expected without degrading the image quality.

実施の形態1〜4では、適用例の1つとして、写真シール作成装置に本願の画像圧縮方法を適用した形態について説明を行ったが、本願の画像圧縮方法は写真シール作成装置のみに適用されるものではなく、デジタルカメラ、スマートフォン等の携帯電話機、スレートPCを含むパーソナルコンピュータ、携帯型ゲーム機、画像データ等を蓄積するストレージ等の、画像データを処理し、記憶する様々な装置に適用できることは勿論のことである。   In the first to fourth embodiments, as an example of application, the form in which the image compression method of the present application is applied to a photo sticker creation apparatus has been described. However, the image compression method of the present application is applied only to a photo sticker creation apparatus. It can be applied to various devices that process and store image data, such as digital cameras, mobile phones such as smartphones, personal computers including slate PCs, portable game machines, and storages that store image data. Of course.

今回開示された実施の形態は、全ての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上述した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。   The embodiment disclosed this time is to be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the meanings described above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

2 撮影部
5 印刷部
6 制御部
7 画像処理部
70 CPU
72 HDD
7P 画像処理プログラム
701 データ入力部
702 入力バッファ
703 ビット変換処理部
704 符号化処理部
705 データ出力部
2 photographing unit 5 printing unit 6 control unit 7 image processing unit 70 CPU
72 HDD
7P image processing program 701 data input unit 702 input buffer 703 bit conversion processing unit 704 encoding processing unit 705 data output unit

Claims (10)

所定ビット長の階調値にて色情報を指定するカラーチャンネルを含んだ画素データにより構成された画像データをメモリに記憶し、該メモリから画素データ毎に各カラーチャンネルの階調値を順次読み出してデータ列を生成し、生成したデータ列から互いに一致する複数の部分データ列を検出し、検出した部分データ列に基づき前記データ列を符号化することで前記画像データを圧縮する画像圧縮方法において、
前記データ列を構成する各階調値の最下位ビットを0又は1の共通の値に書き換えることを特徴とする画像圧縮方法。
Image data composed of pixel data including color channels that specify color information with gradation values of a predetermined bit length is stored in a memory, and gradation values of each color channel are sequentially read out from the memory for each pixel data. In the image compression method, a plurality of partial data sequences that match each other are detected from the generated data sequence, and the image data is compressed by encoding the data sequence based on the detected partial data sequence ,
An image compression method, wherein the least significant bit of each gradation value constituting the data string is rewritten to a common value of 0 or 1.
各画素データは、前記ビット長の階調値にて透明度を指定するアルファチャンネルを更に含むことを特徴とする請求項1に記載の画像圧縮方法。   The image compression method according to claim 1, wherein each pixel data further includes an alpha channel for designating transparency with the gradation value of the bit length. カラーチャンネル毎に各階調値の出現頻度を計数し、
計数したカラーチャンネル毎の各階調値の出現頻度に基づいて、前記最下位ビットの書き換えを禁止すべきカラーチャンネルを決定し、
決定したカラーチャンネルの階調値における最下位ビットの書き換えを禁止する
ことを特徴とする請求項1又は請求項2に記載の画像圧縮方法。
Count the appearance frequency of each gradation value for each color channel,
Based on the appearance frequency of each gradation value for each counted color channel, determine a color channel that should be prohibited from rewriting the least significant bit,
The image compression method according to claim 1, wherein rewriting of the least significant bit in the gradation value of the determined color channel is prohibited.
カラーチャンネル毎に各階調値の出現頻度を計数し、
計数したカラーチャンネル毎の各階調値の出現頻度に基づいて、前記最下位ビットより高位側のビットを0又は1の共通の値に書き換えるカラーチャンネルを決定し、
決定したカラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換える
ことを特徴とする請求項1又は請求項2に記載の画像圧縮方法。
Count the appearance frequency of each gradation value for each color channel,
Based on the appearance frequency of each gradation value for each counted color channel, a color channel for rewriting the higher-order bits than the least significant bits to a common value of 0 or 1 is determined,
The image compression method according to claim 1 or 2, wherein a bit higher than the least significant bit in the gradation value of the determined color channel is rewritten to a common value of 0 or 1.
アルファチャンネルにより指定される透明度が閾値以上であるか否かを画素データ毎に判断し、
前記透明度が閾値以上であると判断した画素データについて、カラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換える
ことを特徴とする請求項2に記載の画像圧縮方法。
It is determined for each pixel data whether or not the transparency specified by the alpha channel is greater than or equal to the threshold,
The pixel data for which the transparency is determined to be greater than or equal to a threshold value, the higher-order bit than the least significant bit in the gradation value of the color channel is rewritten to a common value of 0 or 1. Image compression method.
所定ビット長の階調値にて色情報を指定するカラーチャンネルを含んだ画素データにより構成された画像データをメモリに記憶し、該メモリから画素データ毎に各カラーチャンネルの階調値を順次読み出してデータ列を生成し、生成したデータ列から互いに一致する複数の部分データ列を検出し、検出した部分データ列に基づき前記データ列を符号化することで前記画像データを圧縮する画像圧縮装置において、
前記データ列を構成する各階調値の最下位ビットを0又は1の共通の値に書き換える手段
を備えることを特徴とする画像圧縮装置。
Image data composed of pixel data including color channels that specify color information with gradation values of a predetermined bit length is stored in a memory, and gradation values of each color channel are sequentially read out from the memory for each pixel data. In an image compression apparatus that generates a data sequence, detects a plurality of partial data sequences that match each other from the generated data sequence, and compresses the image data by encoding the data sequence based on the detected partial data sequence ,
An image compression apparatus comprising: means for rewriting the least significant bit of each gradation value constituting the data string to a common value of 0 or 1.
各画素データは、前記ビット長の階調値にて透明度を指定するアルファチャンネルを更に含むことを特徴とする請求項6に記載の画像圧縮装置。   The image compression apparatus according to claim 6, wherein each pixel data further includes an alpha channel that specifies transparency by the gradation value of the bit length. カラーチャンネル毎の階調値の出現頻度を計数する手段と、
計数したカラーチャンネル毎の階調値の出現頻度に基づいて、前記最下位ビットの書き換えを禁止すべきカラーチャンネルを決定する手段と、
決定したカラーチャンネルの階調値における最下位ビットの書き換えを禁止する手段と
を更に備えることを特徴とする請求項6又は請求項7に記載の画像圧縮装置。
Means for counting the frequency of appearance of gradation values for each color channel;
Means for determining a color channel on which rewriting of the least significant bit should be prohibited, based on the appearance frequency of the gradation value for each counted color channel;
The image compression apparatus according to claim 6, further comprising: means for prohibiting rewriting of the least significant bit in the gradation value of the determined color channel.
カラーチャンネル毎の階調値の出現頻度を計数する手段と、
計数したカラーチャンネル毎の階調値の出現頻度に基づいて、前記最下位ビットより高位側のビットを0又は1の共通の値に書き換えるカラーチャンネルを決定する手段と、
決定したカラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換える手段と
を更に備えることを特徴とする請求項6又は請求項7に記載の画像圧縮装置。
Means for counting the frequency of appearance of gradation values for each color channel;
Means for determining a color channel for rewriting a bit higher than the least significant bit to a common value of 0 or 1 based on the appearance frequency of the gradation value for each color channel counted;
8. The image compression according to claim 6, further comprising means for rewriting a bit higher than the least significant bit in the gradation value of the determined color channel to a common value of 0 or 1. apparatus.
アルファチャンネルにより指定される透明度が閾値以上であるか否かを画素データ毎に判断する手段と、
前記透明度が閾値以上であると判断した画素データについて、カラーチャンネルの階調値における前記最下位ビットより高位側のビットを0又は1の共通の値に書き換える手段と
を更に備えることを特徴とする請求項7に記載の画像圧縮装置。
Means for determining for each pixel data whether or not the transparency specified by the alpha channel is greater than or equal to a threshold;
Means for rewriting a bit higher than the least significant bit in the color channel gradation value to a common value of 0 or 1 for the pixel data for which the transparency is determined to be equal to or greater than a threshold value. The image compression apparatus according to claim 7.
JP2013175808A 2013-08-27 2013-08-27 Image compression method and image compression device Pending JP2015046701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013175808A JP2015046701A (en) 2013-08-27 2013-08-27 Image compression method and image compression device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013175808A JP2015046701A (en) 2013-08-27 2013-08-27 Image compression method and image compression device

Publications (1)

Publication Number Publication Date
JP2015046701A true JP2015046701A (en) 2015-03-12

Family

ID=52671907

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013175808A Pending JP2015046701A (en) 2013-08-27 2013-08-27 Image compression method and image compression device

Country Status (1)

Country Link
JP (1) JP2015046701A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05114240A (en) * 1991-10-23 1993-05-07 Matsushita Electric Ind Co Ltd Image compression and coding apparatus
JP2011180896A (en) * 2010-03-02 2011-09-15 Canon Inc Apparatus for generating raster image, raster image generating method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05114240A (en) * 1991-10-23 1993-05-07 Matsushita Electric Ind Co Ltd Image compression and coding apparatus
JP2011180896A (en) * 2010-03-02 2011-09-15 Canon Inc Apparatus for generating raster image, raster image generating method, and program

Similar Documents

Publication Publication Date Title
JP2004343747A (en) Photographing method for mobile communication terminal with camera
JP5870639B2 (en) Image processing system, image processing apparatus, and image processing program
JP5515464B2 (en) Image processing apparatus, photographing / editing apparatus, image processing method, image processing program, and recording medium storing the program
JP2009151698A (en) Image converter, image providing system, photographing editing device, image conversion method, image conversion program, and recording medium recorded with program
US20110285739A1 (en) Image display apparatus, image display method, and program storage medium
JP2017034354A (en) Photograph taking game apparatus, photograph seal production apparatus, control method for photograph taking game apparatus, and control program for photograph taking game apparatus
JP2007081741A (en) Imaging apparatus and its control method
TWI240568B (en) Image composite device, electronic camera and image composite method
JP2015046701A (en) Image compression method and image compression device
JP5854333B2 (en) Image output device
JP4851985B2 (en) Image display method, image display apparatus, image output apparatus, and computer program
JP2010009255A (en) Photographing game system, and photographing game machine and server used for the same
JP2008040988A (en) Photography game machine
JP2013115447A (en) Photography playing apparatus, image data providing apparatus, image data providing system, image data generation method, and image data generation program
JP5019566B2 (en) Imaging apparatus, control method therefor, computer program, and storage medium
JP4427784B2 (en) Image processing apparatus and mobile phone equipped with image processing apparatus
JP5776031B2 (en) Image processing apparatus, image processing method, and computer program
JP2004254294A (en) Active digital image capturing device
JP5218687B2 (en) Image conversion apparatus, image providing system, photographing / editing apparatus, image conversion method, image conversion program, and recording medium recording the program
JP5273282B2 (en) Image editing apparatus, image editing method, image printing apparatus, and computer program
KR101337383B1 (en) Mobile terminal and method for editing image thereof
KR101167665B1 (en) Method and apparatus for sorting photo in portable terminal
JP4757828B2 (en) Image composition apparatus, photographing apparatus, image composition method, and image composition program
JP2009081481A (en) Automatic photo creation device and automatic photo creation method
JP5444966B2 (en) Game shooting device, game shooting method, game information providing program, and game information providing system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151208

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160405