JP5296765B2 - JPEG compression device - Google Patents

JPEG compression device Download PDF

Info

Publication number
JP5296765B2
JP5296765B2 JP2010265327A JP2010265327A JP5296765B2 JP 5296765 B2 JP5296765 B2 JP 5296765B2 JP 2010265327 A JP2010265327 A JP 2010265327A JP 2010265327 A JP2010265327 A JP 2010265327A JP 5296765 B2 JP5296765 B2 JP 5296765B2
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.)
Active
Application number
JP2010265327A
Other languages
Japanese (ja)
Other versions
JP2012119764A (en
Inventor
明 森重
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.)
Aiphone Co Ltd
Original Assignee
Aiphone 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 Aiphone Co Ltd filed Critical Aiphone Co Ltd
Priority to JP2010265327A priority Critical patent/JP5296765B2/en
Publication of JP2012119764A publication Critical patent/JP2012119764A/en
Application granted granted Critical
Publication of JP5296765B2 publication Critical patent/JP5296765B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To solve a problem in which: a JPEG data size does not easily exceed a transmission band even when video images suddenly vary and an image data size increases. <P>SOLUTION: A JPEG compression device includes: a moving average calculation part 42 for calculating the moving average of M pieces of continuous frames of the past; a moving object identification part 43 for comparing the JPEG data sizes of the (N-1)th frame and Nth frame of moving images and determining that a moving object is present when the extreme reduction of the JPEG data size occurs; a compressibility setting part 45 for setting compressibility on the basis of the JPEG data size of the (N-1)th frame and information of the moving average calculation part 42 and the moving object identification part 43; a quantization table generation part 46 for generating a quantization table by the set compressibility; and a JPEG encoding part 41 for executing JPEG compression of the (N+1)th frame of the frames on the basis of the generated quantization table. When the moving object identification part 43 determines that the moving object is present, the compressibility determination part 45 sets the compressibility at the maximum value. <P>COPYRIGHT: (C)2012,JPO&amp;INPIT

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).

特開2007−60498号公報Japanese Patent Laid-Open No. 2007-60498

上記特許文献1に記載されたJPEG圧縮装置は、直前の画像フレームと現在の画像フレームの画像のデータサイズがほとんど変わらないという前提に基づき、伝送するデータ量が一定になるよう制御している、そのため、直前の画像フレームでJPEGデータサイズが減少した場合は、次の画像フレームでは量子化テーブルを高画質なものに切り替えてデータ量を増加させる制御が行われた。   The JPEG compression device described in Patent Document 1 controls the amount of data to be transmitted based on the premise that the data size of the image of the immediately preceding image frame and that of the current image frame hardly change. For this reason, when the JPEG data size has decreased in the immediately preceding image frame, control is performed to increase the data amount by switching the quantization table to a high-quality image in the next image frame.

しかしながら、インターホンの玄関子機カメラや監視カメラ等に多く採用されている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 claim 1 is a JPEG compression apparatus that converts video data into moving image data composed of JPEG data and outputs the video data, and includes M consecutive M (M is an integer) in the past. A moving average calculating unit that calculates a moving average of JPEG data sizes in an image frame, and comparing the JPEG data sizes of the N−1th (N is an integer) image frame and the Nth image frame of a moving image, Information on a moving object identification unit that determines that a moving object exists when a decrease in size exceeding a predetermined change amount occurs, and information on the JPEG data size, moving average calculation unit, and moving object identification unit of the (N−1) -th image frame Based on the compression rate setting unit for setting the compression rate of the (N + 1) th image frame, and the amount used for JPEG compression of the (N + 1) th image frame from the set compression rate A quantization table generating unit that generates a quantization table, a JPEG encoding unit that performs JPEG compression of an image frame and JPEG encodes video data based on the quantization table generated by the quantization table generating 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 the compression rate setting unit is configured to identify the moving object If the unit determines that there is a moving object, the compression rate is set to a set maximum value, and the JPEG data output by the JPEG encoding unit is shifted to a low image quality.
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.

JPEG圧縮装置を備えたインターホン装置の構成図である。It is a block diagram of the intercom apparatus provided with the JPEG compression apparatus. 本発明に係るJPEG圧縮装置の一例を示すブロック図である。It is a block diagram which shows an example of the JPEG compression apparatus which concerns on this invention. 映像データの流れを示すフローチャートである。It is a flowchart which shows the flow of video data. 移動物体による映像状態変移図である。It is an image state transition diagram by a moving object. 移動物体による映像状態変移図である。It is an image state transition diagram by a moving object. 図4の映像状態変移におけるJPEGデータサイズの遷移図である。FIG. 5 is a transition diagram of JPEG data size in the video state transition of FIG. 4. 図5の映像状態変移におけるJPEGデータサイズの遷移図である。FIG. 6 is a transition diagram of JPEG data size in the video state transition of FIG. 5. 1フレームの画像データ構成である。It is an image data configuration of one frame.

以下、本発明を具体化した実施の形態を、図面に基づいて詳細に説明する。図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, reference numeral 1 denotes an entrance slave set installed at the entrance, and reference numeral 2 denotes a living room set installed in the living room, and both are connected by a transmission line L <b> 1. The front door 1 includes a call button 11 for a visitor to call a resident, a camera 12 for capturing an image of the visitor, a microphone 13 and a speaker 14 for calling. The room master unit 2 includes a call button 21 for responding to a call, a microphone 22 and a speaker 23 for making a call, and a monitor 24 for displaying an image.

図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 camera 12 is displayed on the monitor 24. The block diagram of the front door 1 is a block diagram of the JPEG compression device 4. As shown in FIG. 2, the JPEG compression device 4 includes a JPEG encoding unit 41 that encodes (compresses) video data that is captured and output by the camera 12, a moving average calculation unit 42 that calculates a moving average, The data size is monitored in a moving object identification unit 43 that identifies a moving object based on a count value (data size) of JPEG compressed data and individual image blocks that form an image frame (hereinafter simply referred to as “frame”). A block determination unit 44; a compression rate determination unit 45 that determines a compression rate in the JPEG encoding unit 41; a quantization table generation unit 46 that generates a quantization table according to the determined compression rate; 2 is provided with a data transmission unit 47 for transmitting video data to 2.
The living room master unit 2 also includes a data transmission unit 50 that receives the transmitted video data and a JPEG decoding unit that decodes the JPEG data, and the video is displayed on the monitor 24 by the decoded moving image data.

JPEG符号化部41では、量子化テーブル生成部46から送出された量子化テーブルを使用し、カメラ12から出力された動画像データを符号化して出力する。具体的に、カメラ12から出力された映像データは連続する画像データから成る動画像データであり、図8に示すように多数の画像ブロックに分割されてJPEG符号化が行われる。
図8は1フレーム分の画像データの構成を示しており、この図8に示すようにフレームはMCU(例えば8×8ピクセル)単位のブロックで分割されて符号化される。
そして、MCU単位でJPEGデータのカウント値を順次出力し、1フレームのJPEG符号化が終了したら、圧縮した映像データであるフレームデータをデータ伝送部47へ出力する。
The JPEG encoding unit 41 uses the quantization table sent from the quantization table generation unit 46 to encode and output moving image data output from the camera 12. Specifically, the video data output from the camera 12 is moving image data composed of continuous image data, and is divided into a large number of image blocks and subjected to JPEG encoding as shown in FIG.
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 data transmission unit 47.

移動平均演算部42は、JPEG符号化部41からカウント値を入手し、予め決められたM個(例えば4個)毎にフレームのJPEGデータサイズの平均値を計算し、その結果を圧縮率判定部45へ送る。   The moving average calculation unit 42 obtains the count value from the JPEG encoding unit 41, calculates the average value of the JPEG data size of the frame every predetermined M (for example, 4), and determines the compression rate as the result. Send to part 45.

移動物体識別部43は、JPEG符号化部41からカウント値を入手し、直前(N−1番目)のフレームと現在(N番目)のフレームのJPEGデータサイズを比較する。比較した結果、一定値以上のデータサイズの減少があった場合は映像に何らかの移動物体が撮像されていると判定し、圧縮率判定部45に対してその旨信号を出力する。これは、上記図5や図6に示したような移動物体が撮像された後に発生する急激なJPEGデータサイズの増加に対処するために行われる。   The moving object identification unit 43 obtains the count value from the JPEG encoding unit 41 and compares the JPEG data sizes of the immediately previous (N−1) th frame and the current (Nth) frame. As a result of the comparison, if the data size has decreased by a certain value or more, it is determined that some moving object is captured in the video, and a signal to that effect is output to the compression rate determination unit 45. This is performed to cope with a sudden increase in JPEG data size that occurs after the moving object as shown in FIGS. 5 and 6 is imaged.

ブロック判定部44は、JPEG符号化部41においてJPEG符号化の際に出力されるブロック単位のカウント値を受けてデータサイズを判定する。具体的に、入手したカウント値からJPEGデータサイズをあらかじめ決められた閾値と比較し、設定された閾値以上であれば圧縮率判定部45に対して、現在のJPEG圧縮処理が終わるのを待って1段階画質を下げる量子化テーブルをJPEG符号化部41へ送るよう指示を出す。これは、フレーム全体のJPEGデータサイズでは伝送帯域内に入っていて伝送に問題無くても、映像がフレーム内において局所的に複雑になり瞬間的に伝送帯域を超える場合を防ぐことを目的としている。   The block determination unit 44 receives the count value in units of blocks output when the JPEG encoding unit 41 performs JPEG encoding, and determines the data size. Specifically, the JPEG data size is compared with a predetermined threshold value from the obtained count value, and if it is equal to or larger than the set threshold value, the compression rate determination unit 45 waits for the current JPEG compression process to end. An instruction is sent to the JPEG encoding unit 41 to send a quantization table for reducing the one-step image quality. The purpose of this is to prevent the case where the video is locally complicated in the frame and instantaneously exceeds the transmission band even if the JPEG data size of the entire frame is within the transmission band and there is no problem in transmission. .

圧縮率判定部45は、JPEG符号化部41が出力する直前(N−1番目)のフレームのカウント値を受けて、閾値以上であったら画質を1段階下げた量子化テーブルを生成するよう量子化テーブル46へ信号を出す。また、移動平均演算部42が計算した平均値をあらかじめ決められた閾値と比較し、閾値以上であれば1段階画質を下げた量子化テーブルをJPEG符号化部41へ送る。尚、移動平均演算部42は、演算した平均値が閾値に満たない場合は画質を変更する信号は出力しない。
また、移動物体識別部43において移動体の存在が識別されたら、最も画質を下げた(圧縮率を最大にした)量子化テーブルを生成する指令を量子化テーブル生成部46へ出す。
更に、ブロック判定部44が出力する信号を受けて量子化テーブル生成部46に対して画質を1段階下げる信号を出す。
The compression rate determination unit 45 receives the count value of the (N−1) th frame immediately before being output by the JPEG encoding unit 41, and generates a quantization table in which the image quality is reduced by one step if the count value is equal to or greater than the threshold value. A signal is output to the conversion table 46. Also, the average value calculated by the moving average calculation unit 42 is compared with a predetermined threshold value, and if it is equal to or greater than the threshold value, a quantization table with a reduced one-step image quality is sent to the JPEG encoding unit 41. The moving average calculation unit 42 does not output a signal for changing the image quality when the calculated average value is less than the threshold value.
When the moving object identification unit 43 identifies the presence of a moving object, it issues a command to the quantization table generation unit 46 to generate a quantization table with the lowest image quality (maximum compression rate).
Further, in response to a signal output from the block determination unit 44, a signal for lowering the image quality by one level is output to the quantization table generation unit 46.

データ伝送部47は、JPEG符号化部41から伝送されたフレームのデータサイズが予め設定した閾値以下であれば、伝送路L1を介して居室親機2へ伝送する。閾値を超えていたらフレームデータを破棄する。   If the data size of the frame transmitted from the JPEG encoding unit 41 is equal to or less than a preset threshold, the data transmission unit 47 transmits the frame to the room master unit 2 via the transmission line L1. If the threshold is exceeded, the frame data is discarded.

このように構成されたJPEG圧縮装置4は以下のように映像データを処理する。図3はカメラが撮像してから居室親機2へ伝送するまでのフローを示し、この図3に基づいて説明する。カメラ12が撮像した映像データ(動画像データ)はJPEG符号化部41に出力される(S1)。映像データが入力されたJPEG符号化部41は、初回の圧縮においては量子化テーブル生成部46から初期設定で決められた最も低い画質の量子化テーブルデータを受領してJPEG圧縮処理を行う(S2)。   The JPEG compression apparatus 4 configured in this way processes video data as follows. FIG. 3 shows a flow from when the camera takes an image to transmission to the room master unit 2, and will be described based on FIG. Video data (moving image data) captured by the camera 12 is output to the JPEG encoding unit 41 (S1). The JPEG encoding unit 41 to which the video data is input receives the quantization table data having the lowest image quality determined by the initial setting from the quantization table generation unit 46 in the first compression, and performs JPEG compression processing (S2). ).

圧縮はブロック単位で行われ、圧縮した結果である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 average calculation unit 42, the moving object identification unit 43, the block determination unit 44, and the compression rate determination unit 45. In the second and subsequent compression processing, the JPEG compression processing is performed using the quantization table generated based on the previous JPEG data from the quantization table generation unit 46.
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 data transmission unit 47 is determined by the data transmission unit 47 whether the data amount of the image frame is equal to or less than a predetermined threshold (S5). (S6). If it exceeds, the frame data is discarded (S7). The room master 2 receives the JPEG data at the data transmission unit 50, is decoded into video data at the JPEG decoding unit 51, and is displayed on the monitor 24.

一方、移動平均演算部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 average calculation unit 42 calculates the average value of the JPEG data sizes of the frames so far, and sends the result to the compression rate determination unit 45. The compression rate determination unit 45 compares the predetermined threshold value with the average value.
As a result of this comparison, a signal is output to the quantization table generation unit 46 so as to generate a quantization table that increases the image quality by one level if it is equal to or less than the threshold value. In this way, compression is performed with the quantization table from the next (N + 1) th frame. Note that once the quantization table is switched, no determination is made in the direction of increasing the image quality until a moving average of the determined number of frames is calculated again. By this process, the quantization table can be optimized in accordance with the current image quality, and by first compressing with the lowest image quality, the JPEG size that exceeds the transmission band by the first compression is prevented. If the threshold value is exceeded, the quantization table change instruction is not issued.

また、圧縮率判定部45は、JPEG符号化部41からカウント値を受け取ると、そのデータサイズが予め決められた所定値より大きければ画質を1段階下げる指示を出す。具体的に、直前(N−1番目)のフレームのJPEGデータサイズと閾値とを比較し、直前のデータサイズが閾値以上であれば1段階画質を下げた量子化テーブルを生成するよう量子化テーブル生成部46へ信号を出す。JPEG符号化部41は量子化テーブル生成部46から受け取った量子化テーブルを使用して次の(N+1番目)のフレームからはその量子化テーブルで圧縮を実施する。尚、直前のデータサイズが閾値に満たない場合は、量子化テーブルを変更しない。このJPEGデータサイズを減らす(画質を下げる)方向の操作は、1フレームの圧縮が終わる度に判定して実施される。   When the compression rate determination unit 45 receives the count value from the JPEG encoding unit 41, the compression rate determination unit 45 issues an instruction to lower the image quality by one step if the data size is larger than a predetermined value. Specifically, the JPEG data size of the immediately preceding (N−1) th frame is compared with a threshold value, and if the immediately preceding data size is greater than or equal to the threshold value, the quantization table is generated so as to reduce the one-step image quality. A signal is output to the generation unit 46. The JPEG encoding unit 41 uses the quantization table received from the quantization table generating unit 46 to perform compression using the quantization table from the next (N + 1) th frame. If the previous data size is less than the threshold value, the quantization table is not changed. This operation in the direction of decreasing the JPEG data size (decreasing the image quality) is performed by determining each time one frame is compressed.

移動物体識別部43では、JPEG符号化部41から送信されるカウント値を基に、直前(N−1番目)のフレームと現在(N番目)のフレームのJPEGデータサイズの比較を行い、一定以上大きいサイズの減少があった場合は映像に何らかの移動物体が存在すると判断し、移動物体が存在すると判断したら圧縮率判定部45に通知する。
この通知を受けた圧縮率判定部45は、設定されている量子化テーブルの中で最も画質を下げた量子化テーブルを量子化テーブル生成部46に生成させる。JPEG符号化部41は量子化テーブル生成部46から生成された量子化テーブルを使用して次の(N+1番目の)フレームからはその量子化テーブルで符号化する。
The moving object identification unit 43 compares the JPEG data sizes of the immediately preceding (N−1) th frame and the current (Nth) frame based on the count value transmitted from the JPEG encoding unit 41, and exceeds a certain level. If there is a large decrease in size, it is determined that there is some moving object in the video, and if it is determined that there is a moving object, the compression ratio determination unit 45 is notified.
Receiving this notification, the compression rate determination unit 45 causes the quantization table generation unit 46 to generate a quantization table with the lowest image quality among the set quantization tables. The JPEG encoding unit 41 uses the quantization table generated from the quantization table generating unit 46 and encodes the next (N + 1) th frame with the quantization table.

ブロック判定部44では、JPEG符号化部41が出力する直前(N−1番目)のフレームの中のカウント値を受けたらデータサイズを判断し、閾値を超えるブロックが存在する場合は、画質を下げるよう圧縮率判定部45に指示を出す。上述したように、MCU単位でデータサイズが判断され、閾値以上であれば圧縮率判定部45に対して、N番目(現在)のJPEG圧縮処理が終わるのを待ち、次(N+1番目)のフレームから1段階画質を下げる量子化テーブルをJPEG符号化部41へ送るよう指示を出す。
こうしてJPEG符号化部41は、次のN+1番目のフレームの符号化処理を実施する。
The block determination unit 44 determines the data size when receiving the count value in the (N−1) th frame immediately before the output from the JPEG encoding unit 41. If there is a block exceeding the threshold, the image quality is lowered. An instruction is issued to the compression rate determination unit 45. As described above, the data size is determined in MCU units, and if it is equal to or greater than the threshold value, the compression rate determination unit 45 waits for the Nth (current) JPEG compression process to end and waits for the next (N + 1) th frame. To instruct the JPEG encoding unit 41 to send a quantization table for reducing the one-step image quality.
In this way, the JPEG encoding unit 41 performs encoding processing for the next N + 1th frame.

このように、移動物体が撮像されたら量子化テーブルを最も低画質なものに切り替えて、後に物体が停止するなどして複雑な映像になっても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 JPEG compression device 4 of the present invention transmits a captured image of a camera via a communication path or a transmission path and displays it on a monitor or the like. In this case, it is preferable to display the video without stopping.

1・・玄関子機、2・・居室親機、4・・JPEG圧縮装置、12・・カメラ、41・・JPEG符号化部、42・・移動平均演算部、43・・移動物体識別部、44・・ブロック判定部、45・・圧縮率判定部、46・・量子化テーブル生成部、47・・データ伝送部。   1 .. Entrance child machine 2.. Living room master 4.. JPEG compression device 12.. Camera 41. JPEG encoding unit 42 42 Moving average calculation unit 43 Moving object identification unit 44... Block determination unit, 45... Compression rate determination unit, 46 .. Quantization table generation unit, 47.

Claims (2)

映像データを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圧縮装置。
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データサイズを所定値と比較するブロック判定部を有し、
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:
JP2010265327A 2010-11-29 2010-11-29 JPEG compression device Active JP5296765B2 (en)

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 JP2012119764A (en) 2012-06-21
JP5296765B2 true 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)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3639672B2 (en) * 1996-06-03 2005-04-20 キヤノン株式会社 Imaging apparatus and method
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
JP3846487B2 (en) * 2004-05-10 2006-11-15 セイコーエプソン株式会社 Image data compression apparatus, encoder, electronic device, 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
JP2012119764A (en) 2012-06-21

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
JP2005073218A (en) Image processing apparatus
JP7334470B2 (en) VIDEO PROCESSING DEVICE, VIDEO CONFERENCE SYSTEM, VIDEO PROCESSING METHOD, AND PROGRAM
JP2933132B2 (en) Multipoint video conference control device and screen synthesis encoding method
US20130301700A1 (en) Video encoding device and encoding method thereof
US9948903B2 (en) Method for configuration of video stream output from a digital video camera
JP2007028598A (en) Compression coding apparatus and compression coding method
JP5296765B2 (en) JPEG compression device
JP2009038604A (en) Video signal processor
KR20080069318A (en) Apparatus of processing regional image and method thereof
JP4341078B2 (en) Encoding device for moving picture information
JP2010268307A (en) Moving image-processing apparatus, moving image-processing program, and moving image-processing method
KR102312681B1 (en) System and Method of processing image
WO2021248349A1 (en) Combining high-quality foreground with enhanced low-quality background
EP3547684B1 (en) Method, device and system for encoding a sequence of frames in a video stream
JP2008124626A (en) Apparatus and method for controlling record of image
JP2504266B2 (en) Adaptive coding control method for video signals
JP2008259074A (en) Image transmission system
JP2007060498A (en) Jpeg compression equipment
JPH0884329A (en) Image communication terminal equipment
JP5275786B2 (en) Intercom device
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