JP2012119764A - Jpeg compression device - Google Patents
Jpeg compression device Download PDFInfo
- Publication number
- JP2012119764A JP2012119764A JP2010265327A JP2010265327A JP2012119764A JP 2012119764 A JP2012119764 A JP 2012119764A JP 2010265327 A JP2010265327 A JP 2010265327A JP 2010265327 A JP2010265327 A JP 2010265327A JP 2012119764 A JP2012119764 A JP 2012119764A
- Authority
- JP
- Japan
- Prior art keywords
- jpeg
- unit
- data
- data size
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000007906 compression Methods 0.000 title claims abstract description 74
- 230000006835 compression Effects 0.000 title claims abstract description 72
- 238000013139 quantization Methods 0.000 claims abstract description 55
- 230000005540 biological transmission Effects 0.000 claims abstract description 33
- 238000004364 calculation method Methods 0.000 claims abstract description 11
- 238000013144 data compression Methods 0.000 claims description 2
- 230000007704 transition Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 9
- 230000007423 decrease Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 230000003247 decreasing effect Effects 0.000 description 4
- 238000007796 conventional method Methods 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000010561 standard procedure Methods 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明はJPEGデータを圧縮するJPEG圧縮装置に係り、特にJPEG規格で画像圧縮した動画像を一定のビットレートに収まるようにして、規定のフレームレートで送信することができるJPEG圧縮装置に関する。 The present invention relates to a JPEG compression apparatus that compresses JPEG data, and more particularly to a JPEG compression apparatus that can transmit a moving image compressed according to the JPEG standard at a predetermined frame rate so as to be within a constant bit rate.
カラー静止画像を圧縮伸張する標準方式としてJPEG(Joint Picture Expert Group)があり、動画像を構成する連続する複数の画像フレームにおいて、直前の画像フレームのデータサイズから現在の画像フレームの圧縮率を決定して圧縮した動画像のビットレートが一定の値に収まるよう構成されたJPEG圧縮装置が知られている(例えば、特許文献1参照)。 JPEG (Joint Picture Expert Group) is a standard method for compressing and expanding color still images, and the compression rate of the current image frame is determined from the data size of the previous image frame in multiple consecutive image frames that make up a moving image. There is known a JPEG compression apparatus configured so that the bit rate of a compressed moving image falls within a certain value (see, for example, Patent Document 1).
上記特許文献1に記載されたJPEG圧縮装置は、直前の画像フレームと現在の画像フレームの画像のデータサイズがほとんど変わらないという前提に基づき、伝送するデータ量が一定になるよう制御している、そのため、直前の画像フレームでJPEGデータサイズが減少した場合は、次の画像フレームでは量子化テーブルを高画質なものに切り替えてデータ量を増加させる制御が行われた。
The JPEG compression device described in
しかしながら、インターホンの玄関子機カメラや監視カメラ等に多く採用されている30フレーム/秒程度のフレームレートの場合、訪問者や不審者がカメラにフレームインしたりフレームアウトすると、映像が大幅に変わってJPEGデータサイズが大きく変化する状況が発生する。 However, in the case of a frame rate of about 30 frames / second, which is often used for intercom entrance cameras and surveillance cameras, the video changes drastically when a visitor or suspicious person enters or leaves the camera. As a result, the JPEG data size changes greatly.
この状況を図面を参照して具体的に説明すると、図4は画面内で移動物体が停止した場合の映像状態の変移を示し、図4(a)は移動物体が画面に入る前の画像、図4(b)は移動物体は画面中央付近で移動中の画像、図4(c)は移動物体が撮画面内で停止した画像を示している。また図6は、この図4の変移におけるJPEGデータサイズの遷移を示している。
この様に人物などの物体が横からカメラにフレームインし、移動して来てカメラの正面付近で停止するような状況が発生した場合、移動物体が画面に入る前は図6のM1に示すようなデータサイズであったものが、移動物体のフレームインにより移動中は映像がブレて単調な映像になるために図6のM2に示すデータサイズまで大幅に減少する。よって、データサイズを大きくする制御するため量子化テーブルは高画質に切り替わる。
This situation will be specifically described with reference to the drawings. FIG. 4 shows the transition of the video state when the moving object stops on the screen, and FIG. 4A shows an image before the moving object enters the screen. FIG. 4B shows an image in which the moving object is moving near the center of the screen, and FIG. 4C shows an image in which the moving object is stopped in the imaging screen. FIG. 6 shows the transition of the JPEG data size in the transition of FIG.
In this way, when a situation occurs in which an object such as a person enters the camera from the side, moves and stops near the front of the camera, before the moving object enters the screen, it is indicated by M1 in FIG. Although the data size is such that the image is blurred and monotonous while moving due to the frame-in of the moving object, the data size is significantly reduced to M2 in FIG. Therefore, the quantization table is switched to high image quality in order to control to increase the data size.
その後、停止した場合は映像のブレが無くなり映像が複雑になるため、図6のM3に示すデータサイズまで大幅に増大する。このとき量子化テーブルは高画質に切り替わっているためデータサイズが伝送帯域を大幅に超えてしまう。
こうして、移動物体がフレームインして停止すると、映像が間引きされて人物の移動中の映像で一瞬停止する状態がモニタに表示されるといった結果になる。
After that, when the operation is stopped, there is no blurring of the image and the image becomes complicated, so that the data size is greatly increased to M3 in FIG. At this time, since the quantization table is switched to a high image quality, the data size greatly exceeds the transmission band.
In this way, when the moving object stops in the frame, the video is thinned out, and a state where the moving image is stopped for a moment is displayed on the monitor.
また、図5は比較的複雑な背景の前で移動物体が画面内を横切った場合の映像状態の変移を示し、図5(a)は移動物体が画面に入ってきた直後の画像、図5(b)は移動物体が画面内で移動中の画像、図5(c)は移動物体が停止せず画面から外れていった直後の画像を示している。また図7は、この図5の変移におけるJPEGデータサイズの遷移を示している。
この様にカメラの前を人物等の移動物体が横切ってフレームアウトするような状況でも、最初は図7のM4に示すJPEGデータサイズが、物体が横切りブレた映像が画面全体に撮像される状態では図7のM5に示すようにJPEGデータサイズは大幅に減少する。その後、物体が画面から全て外れると元の複雑な背景が表示される為、図7のM6に示すように一気にJPEGデータサイズが増大する。この結果、上記移動物体が停止する場合と同様に、JPEGデータサイズが伝送帯域を超えてしまう状況が発生する。
どちらの状態も発生頻度が高く、この問題を従来方式で解決しようとすると、量子化テーブル全体を画質が低下する方向に移行させるしかなかった。
FIG. 5 shows the transition of the video state when a moving object crosses the screen in the front of a relatively complex background, and FIG. 5A shows an image immediately after the moving object enters the screen. FIG. 5B shows an image in which the moving object is moving on the screen, and FIG. 5C shows an image immediately after the moving object has left the screen without stopping. FIG. 7 shows the transition of the JPEG data size in the transition of FIG.
Even when a moving object such as a person crosses the frame in front of the camera in this way, the JPEG data size indicated by M4 in FIG. Then, as indicated by M5 in FIG. 7, the JPEG data size is greatly reduced. After that, when all the objects are removed from the screen, the original complicated background is displayed, so that the JPEG data size increases at a stretch as indicated by M6 in FIG. As a result, as in the case where the moving object stops, a situation occurs in which the JPEG data size exceeds the transmission band.
In both states, the frequency of occurrence is high, and when trying to solve this problem using the conventional method, the entire quantization table has to be shifted in a direction in which the image quality decreases.
また、上記従来方式では画像フレーム全体のJPEGデータサイズから判断している為、映像の一部分が変動することによる部分的なJPEGデータサイズの増大が発生しても、フレーム全体としてのJPEGデータサイズの変動が少なければ量子化テーブルを切り替えなかった。しかし、フレーム全体でJPEGデータサイズが伝送帯域を超えていなくても、映像の複雑な部分の圧縮の際に瞬間的に伝送帯域を超えることは頻繁に発生するため、やはり映像の乱れが発生していた。これに対応するには、JPEG圧縮側にJPEGデータをフレーム単位で格納するフレームバッファを設けなければならなかった。 In the conventional method, since the determination is based on the JPEG data size of the entire image frame, even if a partial increase in the JPEG data size due to a part of the video fluctuates, the JPEG data size of the entire frame is not affected. If there was little fluctuation, the quantization table was not switched. However, even if the JPEG data size of the entire frame does not exceed the transmission band, it often occurs that the transmission band is instantaneously exceeded when compressing complex parts of the video, so that the video is disturbed. It was. In order to cope with this, a frame buffer for storing JPEG data in units of frames had to be provided on the JPEG compression side.
そこで、本発明はこのような問題点に鑑み、映像が変動して画像データサイズが急激に増大してもJPEGデータサイズは伝送帯域を超え難く、映像の間引きによる瞬間的な停止の頻度を減少させることができるJPEG圧縮装置を提供すること、更に画像フレームを分割したブロック単位でJPEGデータサイズの変動を判断することで、JPEG圧縮側にフレームバッファを持たなくても、瞬間的なJPEGデータの増加により伝送帯域を超える事を防止できるJPEG圧縮装置を提供することを目的としている。 Therefore, in view of such problems, the present invention makes it difficult for the JPEG data size to exceed the transmission band even if the image data fluctuates and the image data size suddenly increases, and the frequency of instantaneous stop due to image thinning is reduced. JPEG compression apparatus that can be used, and by determining fluctuations in JPEG data size in units of blocks obtained by dividing an image frame, even if there is no frame buffer on the JPEG compression side, instantaneous JPEG data An object of the present invention is to provide a JPEG compression apparatus capable of preventing the transmission band from being exceeded due to an increase.
上記課題を解決する為に、請求項1の発明は、映像データをJPEGデータから成る動画像データに変換して出力するJPEG圧縮装置であって、過去の連続するM個(Mは整数)の画像フレームにおけるJPEGデータサイズの移動平均を演算する移動平均演算部と、動画像のN−1番目(Nは整数)の画像フレームとN番目の画像フレームのJPEGデータサイズを比較して、JPEGデータサイズが所定の変化量を超えた減少が発生したら移動物体が存在すると判断する移動物体識別部と、N−1番目の画像フレームのJPEGデータサイズ、移動平均演算部、移動物体識別部の情報を基に、N+1番目の画像フレームの圧縮率を設定する圧縮率設定部と、設定された圧縮率からN+1番目の画像フレームのJPEG圧縮に使用する量子化テーブルを生成する量子化テーブル生成部と、量子化テーブル生成部で生成された量子化テーブルを基に、画像フレームのJPEG圧縮を実施して映像データをJPEG符号化するJPEG符号化部と、JPEG符号化部が出力するJPEGデータのデータサイズが所定のサイズを超えたら、その画像フレームを消去して間引いたフレームを送出するデータ伝送部とを有し、圧縮率設定部は、移動物体識別部が移動物体が存在すると判断したら、圧縮率を設定された最大値に設定し、JPEG符号化部が出力するJPEGデータを低画質に移行させることを特徴とする。
この発明は、物体の移動を撮像した時の映像のブレによりJPEGデータが大幅に減少する事を利用しており、物体の移動時にはJPEGデータサイズが減少するため従来は量子化テーブルを高画質側に切り替えたが、この発明では反対に最も低画質なテーブルに切り替えて、後に物体が停止するなどして複雑な映像になってもJPEGデータサイズが伝送帯域を超えないように移行させて準備動作する。
この結果、一時的に画質は低下するが、物体が移動してブレた映像が表示している状況では映像の詳細はあまり識別できない為、画質低下の影響はほとんどないし、急激に映像が変動して画像フレームのデータサイズが増大しても、JPEGデータサイズは伝送帯域を超え難く、映像の間引きによる瞬間的な停止の頻度が減少する。そしてデータサイズの大きな変動のない平常時は、データサイズに適した画質のJPEGデータに符号化されて伝送される。
In order to solve the above-mentioned problems, the invention of
This invention uses the fact that JPEG data is greatly reduced due to image blurring when the movement of an object is imaged, and the JPEG data size is reduced when the object is moved. However, in the present invention, on the contrary, the table is switched to the table with the lowest image quality, and the JPEG data size is shifted so that the JPEG data size does not exceed the transmission band even if the object stops later, and the preparation operation is performed. To do.
As a result, the image quality temporarily decreases, but the details of the image cannot be identified much when the object is moving and the blurred image is displayed, so there is almost no effect of the image quality deterioration, and the image changes rapidly. Even if the data size of the image frame increases, the JPEG data size does not easily exceed the transmission band, and the frequency of instantaneous stop due to video thinning decreases. Then, during normal times without large fluctuations in the data size, JPEG data having an image quality suitable for the data size is encoded and transmitted.
請求項2の発明は、請求項1に記載の構成において、JPEG符号化部は、入力された画像フレームを所定の画素数のブロック単位で順次符号化すると共に、符号化したブロック毎にJPEGデータサイズをカウントして出力する一方、JPEGデータサイズを所定値と比較するブロック判定部を有し、JPEGデータサイズが所定値を超えるブロックがあった場合、ブロック判定部は圧縮率設定部に圧縮率を上げる指示を出し、JPEG符号化部でのデータ圧縮を1段階上げて低画質に移行させることを特徴とする。
この構成によれば、符号化するブロック毎にJPEGデータサイズをカウントし、ブロック毎に量子化テーブルの切替判定をする。よって、画像フレーム全体でのJPEGデータサイズに変動がほとんど無くても、画像フレームの一部分でJPEGデータの急激な増大があったらそれを検出して量子化テーブルを速やかに低画質側に切り替える。この結果、JPEGデータが瞬間的に伝送帯域を超える事を防ぐことができ、JPEG圧縮側にフレームバッファを持たなくても良好に映像を伝送することが可能となる。
According to a second aspect of the present invention, in the configuration of the first aspect, the JPEG encoding unit sequentially encodes the input image frame in units of a predetermined number of pixels, and JPEG data for each encoded block. When the block determination unit has a block determination unit that compares the JPEG data size with a predetermined value and outputs the block while the JPEG data size exceeds the predetermined value, the block determination unit sends a compression rate to the compression rate setting unit. In this case, the data compression in the JPEG encoding unit is increased by one step to shift to low image quality.
According to this configuration, the JPEG data size is counted for each block to be encoded, and the quantization table switching determination is performed for each block. Therefore, even if there is almost no change in the JPEG data size in the entire image frame, if there is a sudden increase in JPEG data in a part of the image frame, it is detected and the quantization table is quickly switched to the low image quality side. As a result, it is possible to prevent the JPEG data from instantaneously exceeding the transmission band, and it is possible to transmit an image satisfactorily without having a frame buffer on the JPEG compression side.
本発明によれば、急激に映像が変動してJPEGデータサイズが増大しても伝送帯域を超え難くでき、映像の間引きによる瞬間的な停止の頻度を減少させることができる。同時にJPEG圧縮による画質の低下も最小限に抑制できる。
また、画像フレームを複数に分割したブロック単位でも判断することで、JPEGデータサイズ全体で大きな変動が無くても、瞬間的なJPEGデータが伝送帯域の容量を超えてデータ送り先で映像が乱れる事態を防止することができ、JPEG圧縮側にフレームバッファを持たなくても良好に映像を伝送できる。
According to the present invention, it is difficult to exceed the transmission band even if the video changes rapidly and the JPEG data size increases, and the frequency of instantaneous stop due to video thinning can be reduced. At the same time, deterioration of image quality due to JPEG compression can be minimized.
In addition, by judging even the block unit that divides the image frame into multiple, even if there is no large fluctuation in the entire JPEG data size, the situation where the instantaneous JPEG data exceeds the capacity of the transmission band and the video is disturbed at the data destination. The video can be transmitted satisfactorily without having a frame buffer on the JPEG compression side.
以下、本発明を具体化した実施の形態を、図面に基づいて詳細に説明する。図1はインターホン装置を示し、図2はこの要部ブロック図を示している。本発明に係るJPEG圧縮装置は、一例としてインターホン装置の玄関子機に組み込まれている。
図1において、1は玄関に設置される玄関子機、2は居室に設置される居室親機であり、伝送路L1により両者は接続されている。玄関子機1は来訪者が居住者を呼び出すための呼出ボタン11と、来訪者を撮像するためのカメラ12と、通話するためのマイク13及びスピーカ14とを備えている。居室親機2は、呼び出しに応答するための通話ボタン21と、通話するためのマイク22及びスピーカ23と、映像を表示するモニタ24とを備えている。
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, embodiments of the invention will be described in detail with reference to the drawings. FIG. 1 shows an intercom apparatus, and FIG. 2 shows a block diagram of the main part. As an example, the JPEG compression apparatus according to the present invention is incorporated in an entrance unit of an intercom apparatus.
In FIG. 1,
図2は、カメラ12が撮像した映像をモニタ24に表示するまでの映像データ処理に関わるブロックを表している。玄関子機1のブロック図はJPEG圧縮装置4のブロック図となっている。この図2に示すように、JPEG圧縮装置4は、カメラ12が撮像して出力する映像データを符号化(圧縮)するJPEG符号化部41と、移動平均を演算する移動平均演算部42と、JPEG圧縮データのカウント値(データサイズ)を基に移動物体を識別する移動物体識別部43と、画像フレーム(以下、単に「フレーム」と称する)を構成する個々の画像ブロックにおいてデータサイズを監視するブロック判定部44と、JPEG符号化部41での圧縮率を決定する圧縮率判定部45と、決定された圧縮率に応じた量子化テーブルを生成する量子化テーブル生成部46と、居室親機2へ映像データを送信するデータ伝送部47とを備えている。
また居室親機2は、伝送されてきた映像データを受信するデータ伝送部50と、JPEGデータをデコードするJPEG復号部とを有し、復号した動画像データによりモニタ24に映像が表示される。
FIG. 2 shows blocks related to video data processing until the video captured by the
The living
JPEG符号化部41では、量子化テーブル生成部46から送出された量子化テーブルを使用し、カメラ12から出力された動画像データを符号化して出力する。具体的に、カメラ12から出力された映像データは連続する画像データから成る動画像データであり、図8に示すように多数の画像ブロックに分割されてJPEG符号化が行われる。
図8は1フレーム分の画像データの構成を示しており、この図8に示すようにフレームはMCU(例えば8×8ピクセル)単位のブロックで分割されて符号化される。
そして、MCU単位でJPEGデータのカウント値を順次出力し、1フレームのJPEG符号化が終了したら、圧縮した映像データであるフレームデータをデータ伝送部47へ出力する。
The
FIG. 8 shows the structure of image data for one frame. As shown in FIG. 8, the frame is divided into blocks of MCU (for example, 8 × 8 pixels) and encoded.
Then, the count value of the JPEG data is sequentially output in units of MCU, and when the JPEG encoding of one frame is completed, the frame data that is the compressed video data is output to the
移動平均演算部42は、JPEG符号化部41からカウント値を入手し、予め決められたM個(例えば4個)毎にフレームのJPEGデータサイズの平均値を計算し、その結果を圧縮率判定部45へ送る。
The moving
移動物体識別部43は、JPEG符号化部41からカウント値を入手し、直前(N−1番目)のフレームと現在(N番目)のフレームのJPEGデータサイズを比較する。比較した結果、一定値以上のデータサイズの減少があった場合は映像に何らかの移動物体が撮像されていると判定し、圧縮率判定部45に対してその旨信号を出力する。これは、上記図5や図6に示したような移動物体が撮像された後に発生する急激なJPEGデータサイズの増加に対処するために行われる。
The moving
ブロック判定部44は、JPEG符号化部41においてJPEG符号化の際に出力されるブロック単位のカウント値を受けてデータサイズを判定する。具体的に、入手したカウント値からJPEGデータサイズをあらかじめ決められた閾値と比較し、設定された閾値以上であれば圧縮率判定部45に対して、現在のJPEG圧縮処理が終わるのを待って1段階画質を下げる量子化テーブルをJPEG符号化部41へ送るよう指示を出す。これは、フレーム全体のJPEGデータサイズでは伝送帯域内に入っていて伝送に問題無くても、映像がフレーム内において局所的に複雑になり瞬間的に伝送帯域を超える場合を防ぐことを目的としている。
The
圧縮率判定部45は、JPEG符号化部41が出力する直前(N−1番目)のフレームのカウント値を受けて、閾値以上であったら画質を1段階下げた量子化テーブルを生成するよう量子化テーブル46へ信号を出す。また、移動平均演算部42が計算した平均値をあらかじめ決められた閾値と比較し、閾値以上であれば1段階画質を下げた量子化テーブルをJPEG符号化部41へ送る。尚、移動平均演算部42は、演算した平均値が閾値に満たない場合は画質を変更する信号は出力しない。
また、移動物体識別部43において移動体の存在が識別されたら、最も画質を下げた(圧縮率を最大にした)量子化テーブルを生成する指令を量子化テーブル生成部46へ出す。
更に、ブロック判定部44が出力する信号を受けて量子化テーブル生成部46に対して画質を1段階下げる信号を出す。
The compression
When the moving
Further, in response to a signal output from the
データ伝送部47は、JPEG符号化部41から伝送されたフレームのデータサイズが予め設定した閾値以下であれば、伝送路L1を介して居室親機2へ伝送する。閾値を超えていたらフレームデータを破棄する。
If the data size of the frame transmitted from the
このように構成されたJPEG圧縮装置4は以下のように映像データを処理する。図3はカメラが撮像してから居室親機2へ伝送するまでのフローを示し、この図3に基づいて説明する。カメラ12が撮像した映像データ(動画像データ)はJPEG符号化部41に出力される(S1)。映像データが入力されたJPEG符号化部41は、初回の圧縮においては量子化テーブル生成部46から初期設定で決められた最も低い画質の量子化テーブルデータを受領してJPEG圧縮処理を行う(S2)。
The
圧縮はブロック単位で行われ、圧縮した結果であるJPEGデータのカウント値がその都度出力される(S3)。このJPEGデータのカウント値は、移動平均演算部42、移動物体識別部43、ブロック判定部44、圧縮率判定部45へ同時に送られる。そして、2回目以降の圧縮処理に際しては、量子化テーブル生成部46から直前のJPEGデータを基に生成された量子化テーブルを使用してJPEG圧縮処理を実施する。
こうして1フレームの画像データを圧縮して得たJPEGデータは、データ伝送部47へ出力される(S4)。
The compression is performed in units of blocks, and the count value of JPEG data, which is the result of compression, is output each time (S3). The count value of the JPEG data is simultaneously sent to the moving
The JPEG data obtained by compressing the image data of one frame in this way is output to the data transmission unit 47 (S4).
データ伝送部47へ出力されたJPEGデータは、データ伝送部47において画像フレームのデータ量が所定の閾値以下であるか判断され(S5)、以下であれば伝送路L1を介して居室親機2へ伝送する(S6)。超えている場合はフレームデータを破棄する(S7)。居室親機2はデータ伝送部50でJPEGデータを受け取り、JPEG復号部51にて映像データに復号化されてモニター24に表示される。
The JPEG data output to the
一方、移動平均演算部42では、入手したカウント値が決められたフレーム数に達すると、それまでのフレームのJPEGデータサイズの平均値が計算され、その結果が圧縮率判定部45へ送られ、圧縮率判定部45において予め決められた閾値と平均値が比較される。
この比較により、閾値以下であれば1段階画質を上げる量子化テーブルを生成するよう量子化テーブル生成部46へ信号が出される。こうして次のN+1番目のフレームからはその量子化テーブルで圧縮が行われる。尚、一度量子化テーブルを切り替えたなら、画質を上げる方向へはもう一度決められたフレーム数の移動平均が計算されるまで判定をしない。この処理によって現在の画質に合わせて量子化テーブルを最適化でき、最初に最低画質で圧縮する事で最初の圧縮で伝送帯域をオーバーするJPEGサイズになる事を防いでいる。また、閾値を超えていたら量子化テーブルの変更指示は出さない。
On the other hand, when the obtained count value reaches the determined number of frames, the moving
As a result of this comparison, a signal is output to the quantization
また、圧縮率判定部45は、JPEG符号化部41からカウント値を受け取ると、そのデータサイズが予め決められた所定値より大きければ画質を1段階下げる指示を出す。具体的に、直前(N−1番目)のフレームのJPEGデータサイズと閾値とを比較し、直前のデータサイズが閾値以上であれば1段階画質を下げた量子化テーブルを生成するよう量子化テーブル生成部46へ信号を出す。JPEG符号化部41は量子化テーブル生成部46から受け取った量子化テーブルを使用して次の(N+1番目)のフレームからはその量子化テーブルで圧縮を実施する。尚、直前のデータサイズが閾値に満たない場合は、量子化テーブルを変更しない。このJPEGデータサイズを減らす(画質を下げる)方向の操作は、1フレームの圧縮が終わる度に判定して実施される。
When the compression
移動物体識別部43では、JPEG符号化部41から送信されるカウント値を基に、直前(N−1番目)のフレームと現在(N番目)のフレームのJPEGデータサイズの比較を行い、一定以上大きいサイズの減少があった場合は映像に何らかの移動物体が存在すると判断し、移動物体が存在すると判断したら圧縮率判定部45に通知する。
この通知を受けた圧縮率判定部45は、設定されている量子化テーブルの中で最も画質を下げた量子化テーブルを量子化テーブル生成部46に生成させる。JPEG符号化部41は量子化テーブル生成部46から生成された量子化テーブルを使用して次の(N+1番目の)フレームからはその量子化テーブルで符号化する。
The moving
Receiving this notification, the compression
ブロック判定部44では、JPEG符号化部41が出力する直前(N−1番目)のフレームの中のカウント値を受けたらデータサイズを判断し、閾値を超えるブロックが存在する場合は、画質を下げるよう圧縮率判定部45に指示を出す。上述したように、MCU単位でデータサイズが判断され、閾値以上であれば圧縮率判定部45に対して、N番目(現在)のJPEG圧縮処理が終わるのを待ち、次(N+1番目)のフレームから1段階画質を下げる量子化テーブルをJPEG符号化部41へ送るよう指示を出す。
こうしてJPEG符号化部41は、次のN+1番目のフレームの符号化処理を実施する。
The
In this way, the
このように、移動物体が撮像されたら量子化テーブルを最も低画質なものに切り替えて、後に物体が停止するなどして複雑な映像になってもJPEGデータサイズが伝送帯域を超えないよう準備動作するため、急激に映像が変動してフレームのデータサイズが増大しても、JPEGデータサイズは伝送帯域を超え難く、映像の間引きによる瞬間的な停止の頻度を減少させることができる。また、量子化テーブルを最も低画質なものに変更することで一時的に画質は低下するが、物体が移動してブレた映像が表示されている状況では映像の詳細はあまり識別できない為、画質低下の影響はほとんどない。
また、符号化するブロック毎にJPEGデータサイズをカウントし、ブロック毎に量子化テーブルの切替判定をするので、画像フレーム全体でのJPEGデータサイズに変動がほとんど無くても、画像フレームの一部分でJPEGデータの急激な増大があった場合を検出して量子化テーブルを速やかに低画質側に切り替える。この結果、JPEGデータが瞬間的に伝送帯域を超える事を防ぐことができ、JPEGエンコード側にフレームバッファを持たなくても良好に映像を伝送することが可能となる。
In this way, when a moving object is imaged, the quantization table is switched to the one with the lowest image quality, and the JPEG data size does not exceed the transmission bandwidth even if the object stops later and the image becomes complicated. Therefore, even if the video changes suddenly and the data size of the frame increases, the JPEG data size does not easily exceed the transmission band, and the frequency of instantaneous stop due to video thinning can be reduced. In addition, changing the quantization table to the one with the lowest image quality temporarily decreases the image quality, but the details of the image cannot be identified much when the object is moving and the blurred image is displayed. There is almost no impact of the decline.
Also, since the JPEG data size is counted for each block to be encoded and the quantization table switching determination is made for each block, even if there is almost no change in the JPEG data size in the entire image frame, the JPEG data is partially recorded in the image frame. The case where there is a sudden increase in data is detected and the quantization table is quickly switched to the low image quality side. As a result, it is possible to prevent the JPEG data from instantaneously exceeding the transmission band, and it is possible to transmit an image satisfactorily without having a frame buffer on the JPEG encoding side.
尚、上記実施形態では、8×8ピクセルの単位でブロックが構成されているが、フレームを構成する個々のブロックの大きさはこの画素数に限定するものでなく、例えばこのブロックの倍数のピクセル数で構成しても良い。 In the above embodiment, the block is configured in units of 8 × 8 pixels. However, the size of each block configuring the frame is not limited to this number of pixels. For example, the number of pixels is a multiple of this block. It may consist of numbers.
上記実施形態ではインターホン装置に適用した構成を説明したが、本発明のJPEG圧縮装置4は、カメラの撮像映像を通信路或いは伝送路を介して伝送し、モニタ等に表示させる構成の映像関連装置において、映像を停止させることなく表示させるのに好適である。
In the above embodiment, the configuration applied to the interphone device has been described. However, the
1・・玄関子機、2・・居室親機、4・・JPEG圧縮装置、12・・カメラ、41・・JPEG符号化部、42・・移動平均演算部、43・・移動物体識別部、44・・ブロック判定部、45・・圧縮率判定部、46・・量子化テーブル生成部、47・・データ伝送部。
1 ..
Claims (2)
過去の連続するM個(Mは整数)の画像フレームにおけるJPEGデータサイズの移動平均を演算する移動平均演算部と、
動画像のN−1番目(Nは整数)の画像フレームとN番目の画像フレームのJPEGデータサイズを比較して、JPEGデータサイズが所定の変化量を超えた減少が発生したら移動物体が存在すると判断する移動物体識別部と、
前記N−1番目の画像フレームのJPEGデータサイズ、前記移動平均演算部、前記移動物体識別部の情報を基に、N+1番目の画像フレームの圧縮率を設定する圧縮率設定部と、
設定された圧縮率からN+1番目の画像フレームのJPEG圧縮に使用する量子化テーブルを生成する量子化テーブル生成部と、
前記量子化テーブル生成部で生成された量子化テーブルを基に、画像フレームのJPEG圧縮を実施して前記映像データをJPEG符号化するJPEG符号化部と、
前記JPEG符号化部が出力するJPEGデータのデータサイズが所定のサイズを超えたら、その画像フレームを消去して間引いたフレームを送出するデータ伝送部と、を有し、
前記圧縮率設定部は、前記移動物体識別部が移動物体が存在すると判断したら、圧縮率を設定された最大値に設定し、前記JPEG符号化部が出力するJPEGデータを低画質に移行させることを特徴とするJPEG圧縮装置。 A JPEG compression device that converts video data into moving image data composed of JPEG data and outputs the video data,
A moving average calculating unit for calculating a moving average of JPEG data sizes in past M image frames (M is an integer);
When the JPEG data size of the N-1th image frame (N is an integer) and the Nth image frame of the moving image are compared, and the JPEG data size exceeds a predetermined change amount, a moving object is present. A moving object identification unit to determine;
A compression rate setting unit that sets a compression rate of the (N + 1) th image frame based on the information of the JPEG data size of the (N-1) th image frame, the moving average calculation unit, and the moving object identification unit;
A quantization table generating unit that generates a quantization table used for JPEG compression of the (N + 1) th image frame from the set compression rate;
A JPEG encoding unit that performs JPEG compression of an image frame and JPEG encodes the video data based on the quantization table generated by the quantization table generation unit;
A data transmission unit that deletes the image frame and sends a thinned frame when the data size of the JPEG data output by the JPEG encoding unit exceeds a predetermined size, and
When the moving object identification unit determines that a moving object exists, the compression rate setting unit sets the compression rate to a set maximum value, and shifts the JPEG data output from the JPEG encoding unit to low image quality. JPEG compression apparatus characterized by this.
前記JPEGデータサイズを所定値と比較するブロック判定部を有し、
JPEGデータサイズが所定値を超えるブロックがあった場合、前記ブロック判定部は前記圧縮率設定部に圧縮率を上げる指示を出し、JPEG符号化部でのデータ圧縮を1段階上げて低画質に移行させることを特徴とする請求項1記載のJPEG圧縮装置。 The JPEG encoding unit sequentially encodes the input image frame in units of a predetermined number of pixels, and counts and outputs the JPEG data size for each encoded block,
A block determination unit that compares the JPEG data size with a predetermined value;
When there is a block whose JPEG data size exceeds a predetermined value, the block determination unit issues an instruction to increase the compression rate to the compression rate setting unit, and the data compression in the JPEG encoding unit is increased by one step to shift to low image quality. The JPEG compression apparatus according to claim 1, wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010265327A JP5296765B2 (en) | 2010-11-29 | 2010-11-29 | JPEG compression device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010265327A JP5296765B2 (en) | 2010-11-29 | 2010-11-29 | JPEG compression device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012119764A true JP2012119764A (en) | 2012-06-21 |
JP5296765B2 JP5296765B2 (en) | 2013-09-25 |
Family
ID=46502166
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010265327A Active JP5296765B2 (en) | 2010-11-29 | 2010-11-29 | JPEG compression device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5296765B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09326955A (en) * | 1996-06-03 | 1997-12-16 | Canon Inc | Image pickup device |
JPH1118073A (en) * | 1997-06-24 | 1999-01-22 | Sanyo Electric Co Ltd | Supervisory equipment |
JP2003304489A (en) * | 2002-04-10 | 2003-10-24 | Olympus Optical Co Ltd | Camera |
JP2005323166A (en) * | 2004-05-10 | 2005-11-17 | Seiko Epson Corp | Image data compression apparatus, encoder, electronic apparatus, and image data compression method |
JP2007060498A (en) * | 2005-08-26 | 2007-03-08 | Aiphone Co Ltd | Jpeg compression equipment |
-
2010
- 2010-11-29 JP JP2010265327A patent/JP5296765B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09326955A (en) * | 1996-06-03 | 1997-12-16 | Canon Inc | Image pickup device |
JPH1118073A (en) * | 1997-06-24 | 1999-01-22 | Sanyo Electric Co Ltd | Supervisory equipment |
JP2003304489A (en) * | 2002-04-10 | 2003-10-24 | Olympus Optical Co Ltd | Camera |
JP2005323166A (en) * | 2004-05-10 | 2005-11-17 | Seiko Epson Corp | Image data compression apparatus, encoder, electronic apparatus, and image data compression method |
JP2007060498A (en) * | 2005-08-26 | 2007-03-08 | Aiphone Co Ltd | Jpeg compression equipment |
Also Published As
Publication number | Publication date |
---|---|
JP5296765B2 (en) | 2013-09-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3280211B2 (en) | Video encoder control system | |
US10070098B2 (en) | Method and system of adjusting video quality based on viewer distance to a display | |
CN107040781A (en) | The Real-Time Video Encoder speed control switched using dynamic resolution | |
JP2008048243A (en) | Image processor, image processing method, and monitor camera | |
JP2933132B2 (en) | Multipoint video conference control device and screen synthesis encoding method | |
JP2005073218A (en) | Image processing apparatus | |
JP7334470B2 (en) | VIDEO PROCESSING DEVICE, VIDEO CONFERENCE SYSTEM, VIDEO PROCESSING METHOD, AND PROGRAM | |
US20120281756A1 (en) | Complexity change detection for video transmission system | |
US20130301700A1 (en) | Video encoding device and encoding method thereof | |
EP2963929B1 (en) | A method for configuration of video stream output from a digital video camera | |
JP2007028598A (en) | Compression coding apparatus and compression coding method | |
JP2009038604A (en) | Video signal processor | |
JP5296765B2 (en) | JPEG compression device | |
JP4341078B2 (en) | Encoding device for moving picture information | |
EP3547684B1 (en) | Method, device and system for encoding a sequence of frames in a video stream | |
EP4133730A1 (en) | Combining high-quality foreground with enhanced low-quality background | |
KR20160111662A (en) | System and Method of processing image | |
JP4508029B2 (en) | Encoding device for moving picture information | |
JPH07298231A (en) | Multi-point moving image communication system and its controller and moving communication terminal equipment | |
JP2504266B2 (en) | Adaptive coding control method for video signals | |
JPH0884329A (en) | Image communication terminal equipment | |
JP2007060498A (en) | Jpeg compression equipment | |
JP5275786B2 (en) | Intercom device | |
JP2008259074A (en) | Image transmission system | |
JP4196085B2 (en) | Video signal encoding apparatus and video conference system using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120925 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130501 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130514 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130613 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5296765 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |