CN102986221B - Picture coding device and integrated circuit thereof and method for encoding images - Google Patents

Picture coding device and integrated circuit thereof and method for encoding images Download PDF

Info

Publication number
CN102986221B
CN102986221B CN201280001281.1A CN201280001281A CN102986221B CN 102986221 B CN102986221 B CN 102986221B CN 201280001281 A CN201280001281 A CN 201280001281A CN 102986221 B CN102986221 B CN 102986221B
Authority
CN
China
Prior art keywords
image
unit
blur
block size
parallax
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.)
Expired - Fee Related
Application number
CN201280001281.1A
Other languages
Chinese (zh)
Other versions
CN102986221A (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.)
Panasonic Intellectual Property Corp of America
Original Assignee
Panasonic Intellectual Property Corp of America
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 Panasonic Intellectual Property Corp of America filed Critical Panasonic Intellectual Property Corp of America
Priority claimed from PCT/JP2012/002448 external-priority patent/WO2013011608A1/en
Publication of CN102986221A publication Critical patent/CN102986221A/en
Application granted granted Critical
Publication of CN102986221B publication Critical patent/CN102986221B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

在将图像编码时,能够根据被摄体的距离对图像施加模糊,并且适当地决定作为编码的单位的块大小。使用输入的图像的每个像素单位的视差信息或每个像素单位的距离信息、以及任意的模糊条件,对该图像附加模糊,并且根据每个单位区域的模糊量决定编码对象区域的块大小,按照所决定的块大小将图像分割为编码对象区域并进行编码。通过使模糊量较大的图像区域的块大小较大,能够减少参照块的搜索处理量,实现处理的高速化及处理量的削减。

When encoding an image, blurring can be applied to the image according to the distance of the subject, and a block size as a unit of encoding can be appropriately determined. Blurring is applied to the image using disparity information per pixel unit or distance information per pixel unit of the input image, and an arbitrary blurring condition, and the block size of the encoding target area is determined according to the blurring amount of each unit area, The image is divided into encoding target areas according to the determined block size and encoded. By increasing the block size of an image region with a large amount of blur, it is possible to reduce the amount of search processing for a reference block, thereby speeding up processing and reducing the amount of processing.

Description

图像编码装置及其集成电路、以及图像编码方法Image encoding device, integrated circuit thereof, and image encoding method

技术领域technical field

本发明涉及对图像附加模糊而进行编码的图像编码技术。The present invention relates to an image encoding technique for encoding an image by adding blur.

背景技术Background technique

作为用于表现出使主要被摄体显眼的立体感的加工,进行将焦点仅对准于图像的一部分的被摄体、有意使其以外的前景、背景模糊的处理。此外,在用于立体视的立体影像信号中,当观看者的注意向着远景时,会发生观看者感觉较强的疲劳、或者立体视破坏的问题(例如,参照非专利文献1)。为了防止该问题,进行使立体影像信号的远景模糊、以免观看者的注意向着远景的处理。As processing for expressing a three-dimensional effect that makes the main subject stand out, a process of focusing only on a part of the subject of the image and intentionally blurring the other foreground and background is performed. In addition, in a stereoscopic video signal for stereoscopic viewing, when the viewer's attention is directed to the distant view, the viewer feels strong fatigue or the problem of stereoscopic damage occurs (see, for example, Non-Patent Document 1). In order to prevent this problem, a process of blurring the background of the stereoscopic video signal so that the viewer's attention is not drawn to the background is performed.

另一方面,在图像编码中,为了去除集合性的冗余度而提高压缩编码效率,将许多像素集中进行块分割。因而,在利用该块间的相关来提高压缩率的预测编码中,如果对复杂的图像以较小的块单位进行帧间预测和帧内预测、对平坦的图像以较大的块单位进行帧间预测和帧内预测,则复杂的图像及平坦的图像都能够高效率地预测。On the other hand, in image coding, in order to remove collective redundancy and improve compression coding efficiency, a large number of pixels are collectively divided into blocks. Therefore, in the predictive coding that utilizes the inter-block correlation to increase the compression rate, if inter-frame prediction and intra-frame prediction are performed on a complex image in small block units, and frame prediction is performed on a flat image in large block units, Both complex images and flat images can be efficiently predicted by inter-prediction and intra-frame prediction.

作为根据编码对象区域的特征来变更块大小的编码装置的以往例,公开了专利文献1。一般而言,在超声波诊断装置中,越接近于焦点位置则图像的析像度越高,越远离焦点位置则析像度越低。因此,使用距离信息和焦点位置信息来决定块大小,由此同时实现了析像度较高的区域的高画质化和析像度较低的区域的高压缩化。Patent Document 1 is disclosed as a conventional example of an encoding device that changes a block size according to the characteristics of an encoding target region. In general, in an ultrasonic diagnostic apparatus, the closer to the focus position, the higher the image resolution, and the farther away from the focus position, the lower the image resolution. Therefore, by determining the block size using the distance information and the focus position information, both high-quality image quality in a high-resolution area and high compression in a low-resolution area are achieved.

此外,作为另一以往例,公开了专利文献2。在专利文献2的技术中,着眼于平坦度较高的静止区域容易闪烁的情况而增大预测块大小,从而生成抑制了闪烁的压缩图像。In addition, Patent Document 2 is disclosed as another conventional example. In the technique of Patent Document 2, the predicted block size is increased to generate a compressed image in which flicker is suppressed, focusing on the fact that a static region with a high flatness is likely to flicker.

现有技术文献prior art literature

专利文献patent documents

专利文献1:特开2007-289556号公报Patent Document 1: JP-A-2007-289556

专利文献2:特开2007-67469号公报Patent Document 2: JP-A-2007-67469

非专利文献non-patent literature

非专利文献1:本田捷夫修“立体影像技术―空间表现媒体的最新动向―”CMC出版,2008年7月31日(P61-P62)Non-Patent Document 1: Tesho Honda "Stereoscopic Image Technology—The Latest Trend of Spatial Expression Media—" CMC Publishing, July 31, 2008 (P61-P62)

发明概要Summary of the invention

发明要解决的问题The problem to be solved by the invention

在专利文献1的技术中,根据距离信息和焦点位置信息决定编码的块大小。但是,对于各种模糊处理而言,仅根据焦点位置信息和距离信息决定的块大小并不一定是适合于模糊处理后的图像的块大小。In the technique of Patent Document 1, the block size for encoding is determined based on distance information and focus position information. However, for various blurring processes, the block size determined only based on the focus position information and the distance information is not necessarily a block size suitable for the blurred image.

另一方面,在专利文献2的技术中,根据图像区域的平坦程度决定块大小。但是,仅通过是否平坦的判断决定的块大小并不一定是适合于模糊处理后的图像的块大小。On the other hand, in the technique of Patent Document 2, the block size is determined according to the flatness of the image area. However, the block size determined only by the determination of flatness is not necessarily a block size suitable for the blurred image.

发明内容Contents of the invention

本发明是鉴于上述问题而做出的,目的是提供一种在根据视差信息或距离信息施加各种模糊处理后选择适当的块大小来进行编码的图像编码装置及图像编码方法。The present invention has been made in view of the above problems, and an object of the present invention is to provide an image encoding device and an image encoding method for encoding by selecting an appropriate block size after applying various blurring processes based on disparity information or distance information.

用于解决问题的手段means of solving problems

为了解决上述以往的问题,本发明的图像编码装置的特征在于,包括:图像取得部,取得图像;视差取得部,取得上述图像的每个像素单位的视差或每个照像素单位的距离信息中的至少一方;模糊量决定部,根据每个上述像素单位的视差或每个上述像素单位的距离信息,决定上述图像的每个像素单位的模糊量;模糊处理部,按照上述模糊量,对上述图像实施模糊处理;块大小决定部,根据上述模糊量,从多个块大小之中决定用来从实施上述模糊处理后的各图像切出编码对象区域的块大小;以及编码部,按照上述决定的块大小,将实施上述模糊处理后的图像以块单位进行编码。In order to solve the above-mentioned conventional problems, the image encoding device of the present invention is characterized in that it includes: an image acquisition unit that acquires an image; at least one of the above; the blur amount determination unit determines the blur amount of each pixel unit of the above-mentioned image according to the parallax of each pixel unit or the distance information of each pixel unit; the blur processing unit determines the above-mentioned The image is subjected to blurring processing; the block size determination unit determines, based on the amount of blurring, a block size for cutting out the encoding target area from each image after the blurring process is performed from among a plurality of block sizes; and the encoding unit determines according to the above-mentioned The block size of , the image after the above-mentioned blurring process is encoded in block units.

发明效果Invention effect

根据该结构,在将图像编码时使用模糊量决定块大小,从而能够对模糊处理使用与模糊量相应的适当的块大小。According to this configuration, when encoding an image, the block size is determined using the amount of blur, so that an appropriate block size according to the amount of blur can be used for blur processing.

附图说明Description of drawings

图1是本发明的实施方式1的图像编码装置的模块图。FIG. 1 is a block diagram of an image encoding device according to Embodiment 1 of the present invention.

图2是表示本发明的实施方式1的摄影光学系统和模糊量的图。FIG. 2 is a diagram showing an imaging optical system and a blur amount according to Embodiment 1 of the present invention.

图3是表示本发明的实施方式1的模糊矩阵的例子的图。FIG. 3 is a diagram showing an example of a fuzzy matrix according to Embodiment 1 of the present invention.

图4是表示本发明的实施方式1的图像编码装置的动作的流程图。4 is a flowchart showing the operation of the image coding device according to Embodiment 1 of the present invention.

图5是表示本发明的实施方式1的图像编码装置的编码对象信号的生成的动作的流程图。5 is a flowchart showing the operation of generating an encoding target signal in the image encoding device according to Embodiment 1 of the present invention.

图6是本发明的实施方式1的图像编码装置的帧内预测中的块大小决定的动作的流程图。6 is a flowchart of an operation of block size determination in intra prediction in the image coding device according to Embodiment 1 of the present invention.

图7是表示本发明的实施方式1的图像编码装置的运动补偿预测中的块大小决定的动作的流程图。7 is a flowchart showing the operation of block size determination in motion compensation prediction in the image coding device according to Embodiment 1 of the present invention.

图8是本发明的实施方式1的图像编码装置的视差补偿预测中的块大小决定的动作的流程图。8 is a flowchart of an operation of block size determination in parallax compensation prediction in the image coding device according to Embodiment 1 of the present invention.

图9是本发明的实施方式1的变形例1的图像编码装置的模块图。FIG. 9 is a block diagram of an image encoding device according to Modification 1 of Embodiment 1 of the present invention.

图10是本发明的实施方式2的图像编码装置的模块图。Fig. 10 is a block diagram of an image encoding device according to Embodiment 2 of the present invention.

图11是表示本发明的实施方式2的图像编码装置的动作的流程图。11 is a flowchart showing the operation of the image encoding device according to Embodiment 2 of the present invention.

图12是表示本发明的实施方式2的图像编码装置的块大小决定的动作的流程图。FIG. 12 is a flowchart showing the block size determination operation of the image coding device according to Embodiment 2 of the present invention.

图13是本发明的实施方式3的图像编码装置的模块图。FIG. 13 is a block diagram of an image encoding device according to Embodiment 3 of the present invention.

图14是表示本发明的实施方式3的图像编码装置的动作的流程图。FIG. 14 is a flowchart showing the operation of the image encoding device according to Embodiment 3 of the present invention.

图15是本发明的实施方式4的图像编码装置的模块图。Fig. 15 is a block diagram of an image encoding device according to Embodiment 4 of the present invention.

图16是表示本发明的实施方式4的被摄体与焦点、摄像元件的位置关系的图。16 is a diagram showing a positional relationship between a subject, a focal point, and an imaging element according to Embodiment 4 of the present invention.

图17是本发明的实施方式5的图像编码系统的模块图。Fig. 17 is a block diagram of an image coding system according to Embodiment 5 of the present invention.

图18是作为本发明的实施方式1的集成电路的图像编码装置的模块图。FIG. 18 is a block diagram of an image encoding device as an integrated circuit according to Embodiment 1 of the present invention.

图19是具备以往的编码单元的超声波诊断装置的模块图。FIG. 19 is a block diagram of an ultrasonic diagnostic apparatus including a conventional encoding unit.

图20是表示示出以往的编码控制方法的流程图。Fig. 20 is a flowchart illustrating a conventional coding control method.

具体实施方式detailed description

<完成发明的过程><The process of completing the invention>

作为图像处理之一,基于被摄体的距离的模糊的处理是重要的技术。例如,作为用于使主要被摄体显眼而表现出立体感的加工,进行仅将焦点对准于图像的一部分的被摄体、有意使其以外的前景及背景模糊的处理。在这样的模糊处理中,有将使用被摄体深度较浅的光学系统摄影的情况下发生的“散景(bokeh)”再现而使前景及背景模糊的情况。此外,其以外还有各种处理,例如:在针对背景的模糊和针对前景的模糊之间使模糊强度变化、或将焦点对准于距离不同的多个人物并使处于最近侧的人物的前景和处于最里侧的人物的背景模糊、或者将焦点对准于人物和其后方的建筑物双方来使人物和建筑物双方显眼、而使其以外的被摄体模糊等。As one of image processing, processing of blurring based on the distance of the subject is an important technique. For example, as processing for making the main subject stand out and expressing a three-dimensional effect, only a part of the subject of the image is brought into focus, and the other foreground and background are intentionally blurred. In such blurring processing, the foreground and background may be blurred by reproducing “bokeh” that occurs when shooting with an optical system with a shallow subject depth. In addition, there are various processes such as changing the blur strength between blurring for the background and blurring for the foreground, or focusing on multiple people at different distances and making the foreground of the closest person Blur the background of the person and the person in the innermost side, or focus on both the person and the building behind it to make both the person and the building stand out, and blur the other subjects.

此外,在用于立体视的立体影像信号中,如非专利文献1所记载,当观看者的注意向着远景时,如果引起视差信息所表示的距离与焦点距离的不一致,则有观看者感觉较强的疲劳、或立体视破坏等的问题。特别是,在将以放映到较小的屏幕上的前提制作的立体影像信号放大放映到较大的屏幕上的情况下,立体影像信号所设想的右眼与左眼的间隔也会被放大。因此,对于一个被摄体,在右眼用图像内的被摄体像与左眼用图像内的被摄体像的距离变得比右眼与左眼的间隔大的情况下(后方发散),成为该被摄体的视差不可能成为看到单一的物体的情况下的视差的状态,所以立体视破坏。为了防止该问题,进行使立体影像信号的远景模糊以使观看者的注意不向着远景的处理。In addition, in the stereoscopic video signal for stereoscopic viewing, as described in Non-Patent Document 1, when the viewer's attention is directed to the distant view, if the distance indicated by the parallax information does not match the focal distance, the viewer will feel that the Strong fatigue, or problems such as loss of stereoscopic vision. In particular, when a stereoscopic video signal produced on the premise of being projected on a small screen is enlarged and projected on a larger screen, the distance between the right eye and the left eye assumed by the stereoscopic video signal is also enlarged. Therefore, for one subject, when the distance between the subject image in the image for the right eye and the image of the subject in the image for the left eye becomes larger than the distance between the right eye and the left eye (backward divergence) , the parallax of the subject cannot be the parallax state when seeing a single object, so the stereoscopic vision is broken. In order to prevent this problem, a process of blurring the background of the stereoscopic video signal so that the viewer's attention is not drawn to the background is performed.

另一方面,在将图像编码时,为了将集合性的冗余度去除而提高压缩编码效率,将许多像素集中进行块分割。因而,在利用该块间的相关来提高压缩率的预测编码中,如果对复杂的图像以较小的块单位进行帧间预测和帧内预测、对平坦的图像以较大的块单位进行帧间预测和帧内预测,则复杂的图像及平坦的图像都能够高效率地预测。On the other hand, when encoding an image, many pixels are collectively divided into blocks in order to remove collective redundancy and improve compression encoding efficiency. Therefore, in the predictive coding that utilizes the inter-block correlation to increase the compression rate, if inter-frame prediction and intra-frame prediction are performed on a complex image in small block units, and frame prediction is performed on a flat image in large block units, Both complex images and flat images can be efficiently predicted by inter-prediction and intra-frame prediction.

这里,发明者们着眼于施加了较强的模糊的区域是适合较大的块大小的、没有复杂的图案而平坦的区域。并且,得到以下构思:如果不用解析模糊处理后的图像就能够取得作为较强的模糊的对象的区域,则在将模糊处理后的图像编码时的块大小选择中不需要进行该区域的块大小选择,能够削减用于编码的运算量。这是因为,如果这样,则不需要进行根据模糊处理后的图像再次重新检测作为较强的模糊的对象的区域这样的块大小选择处理。Here, the inventors paid attention to the fact that the region to which strong blur is applied is a flat region without a complicated pattern, which is suitable for a large block size. In addition, the following idea was obtained: if an area subject to strong blurring can be obtained without analyzing the blurred image, it is not necessary to select the block size of the area when encoding the blurred image. selection, it is possible to reduce the computational load for encoding. This is because, in this way, it is not necessary to perform a block size selection process of re-detecting an area subject to strong blurring from a blurred image.

相对于此,在以往的块大小选择技术中,将编码对象图像本身作为解析对象。因而,在对模糊处理前的图像采用以往的块大小选择技术的情况下,存在所选择的块大小并不一定适合于模糊处理后的图像的编码的问题。On the other hand, in the conventional block size selection technology, the image to be coded itself is analyzed. Therefore, when the conventional block size selection technique is applied to an image before blurring processing, there is a problem that the selected block size is not always suitable for encoding of the image after blurring processing.

专利文献1是使用距离信息和焦点信息选择块大小的超声波诊断装置,图19是专利文献1的超声波诊断装置的模块图。该超声波诊断装置将作为深度信息的反射信号作为输入图像数据进行编码。由于超声波诊断装置的图像析像度由距焦点位置的距离决定,所以使用距离信息和焦点位置信息决定块大小,由此同时实现了析像度较高的区域的高画质化和析像度较低的区域的高压缩化。Patent Document 1 is an ultrasonic diagnostic apparatus for selecting a block size using distance information and focus information, and FIG. 19 is a block diagram of the ultrasonic diagnostic apparatus of Patent Document 1. This ultrasonic diagnostic apparatus encodes a reflected signal as depth information as input image data. Since the image resolution of an ultrasonic diagnostic device is determined by the distance from the focus position, the block size is determined using the distance information and the focus position information, thereby achieving both high image quality and resolution in areas with high resolution. High compression of lower areas.

但是,即使距离和焦点位置已决定,但只要模糊处理的内容未决定,则模糊的强度就不会被唯一地决定出。即,在对同一个图像的、不处于焦点位置的同一个被摄体进行模糊处理的情况下,在仅对焦点位置的前景进行模糊处理的情况和仅对焦点位置的背景进行模糊处理的情况中,模糊处理后的图像中的该被摄体的区域在前者的情况和后者的情况中当然不同。即,即使模糊处理前的图像相同,但只要模糊处理的内容不同,则适合于模糊处理后的图像的编码的适当的块大小并不一定相同。因而,在对于各种模糊处理仅根据距离和焦点位置选择块大小的专利文献1的方法中,并不一定能够得到适合于模糊后的图像的块大小。However, even if the distance and focus position are determined, as long as the contents of the blurring process are not determined, the intensity of blurring will not be uniquely determined. That is, in the case of blurring the same subject that is not in focus in the same image, in the case of blurring only the foreground at the focus position, and in the case of blurring only the background at the focus position Of course, the area of the subject in the blurred image is different between the former case and the latter case. That is, even if the image before the blurring process is the same, the appropriate block size for coding the blurred image is not necessarily the same as long as the content of the blurring process is different. Therefore, in the method of Patent Document 1 in which the block size is selected only based on the distance and the focus position for various blurring processes, it is not always possible to obtain a block size suitable for the blurred image.

此外,专利文献2是基于图像的平坦度抑制闪烁的编码控制方法,图20是表示专利文献2的编码控制方法的流程图。在专利文献2的技术中,进行是否是静止区域的判断,接着,对判断为静止区域的区域,根据像素值的分散等计算该区域的平坦程度。并且,基于该计算出的平坦程度和量化步长大小,判断闪烁程度,使闪烁度较高的区域的块大小增大,从而生成抑制了闪烁的压缩图像。Furthermore, Patent Document 2 is an encoding control method for suppressing flicker based on the flatness of an image, and FIG. 20 is a flowchart showing the encoding control method of Patent Document 2. In the technique of Patent Document 2, it is determined whether or not it is a still area, and then, for an area determined to be a still area, the degree of flatness of the area is calculated from the dispersion of pixel values or the like. Then, based on the calculated flatness and quantization step size, the degree of flicker is judged, and the block size of a region with a high degree of flicker is increased to generate a compressed image with suppressed flicker.

但是,如上述那样,复杂的图像即使是平坦的区域也会适合较小的块大小。进行了较强的模糊的区域虽然适合较大的块大小,但由于在不模糊的区域中有可能存在具有复杂的图案的平坦的区域,所以在仅根据是否是平坦的区域来决定块大小的专利文献2的技术中不能选择适当的块大小。此外,在专利文献2的技术中,不能从模糊处理前的图像检测出在模糊处理后发生的、适合较大的块大小的进行了较强的模糊的区域。However, as mentioned above, even flat areas of complex images will fit into smaller block sizes. A larger block size is suitable for areas that have been blurred strongly, but since there may be flat areas with complex patterns in areas that are not blurred, the block size is determined only by whether the area is flat or not. In the technique of Patent Document 2, an appropriate block size cannot be selected. Furthermore, in the technique of Patent Document 2, it is not possible to detect a strongly blurred region that occurs after the blurring process and is suitable for a large block size from the image before the blurring process.

所以,发明者们完成了本发明,其特征为在进行模糊处理时保持好每个像素单位的模糊的强度,使用所保持的模糊的强度决定块大小。由此,在附加了模糊后的编码时,对于施加了较强的模糊的区域能够选择适当的块大小,此外,在执行进行画面预测的编码的情况下,不再需要进行使用较小的块大小的画面预测,所以不用对模糊处理后的图像进行解析就能够削减编码的运算量。Therefore, the inventors completed the present invention, which is characterized in that the intensity of blurring per pixel unit is maintained during blurring processing, and the block size is determined using the maintained intensity of blurring. As a result, an appropriate block size can be selected for an area to which strong blur is applied during encoding after adding blur, and it is no longer necessary to use a smaller block when performing encoding that performs picture prediction. The size of the picture is predicted, so the computational load of encoding can be reduced without analyzing the blurred image.

<实施方式><implementation mode>

以下,参照附图对本发明的实施方式进行说明。Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(实施方式1)(implementation mode 1)

图1是本发明的实施方式1的图像编码装置的模块图。FIG. 1 is a block diagram of an image encoding device according to Embodiment 1 of the present invention.

在图1中,立体摄影编码系统以能够立体视的方式摄影被摄体,并将通过摄影生成的立体影像信号编码。这样的立体摄影编码系统具备摄影有视差的主图像及副图像的照相机100a及100b、图像编码装置200、模糊参数输入部300和存储部400。In FIG. 1 , the stereoscopic photography encoding system photographs a subject so that stereoscopic viewing is possible, and encodes a stereoscopic video signal generated by photography. Such a stereoscopic imaging coding system includes cameras 100 a and 100 b that capture a main image and a sub image with parallax, an image coding device 200 , a blur parameter input unit 300 , and a storage unit 400 .

<照相机100><Camera 100>

照相机100a及100b分别相互离开作为人的两眼的平均间隔的6.5cm的距离而配置。照相机100a及100b分别摄影被摄体,将通过摄影得到的影像信号向图像编码装置200输出。The cameras 100 a and 100 b are arranged at a distance of 6.5 cm, which is the average distance between human eyes, from each other. The cameras 100 a and 100 b each photograph a subject, and output video signals obtained by the photography to the image encoding device 200 .

以下,为了简略化,将从照相机100a及100b分别输出的影像信号统称为立体影像信号。此外,将由从照相机100a输出的影像信号表示的图像称作主图像,将由从照相机100b输出的影像信号表示的图像称作副图像。Hereinafter, for simplicity, the video signals respectively output from the cameras 100 a and 100 b are collectively referred to as stereoscopic video signals. In addition, the image represented by the video signal output from the camera 100a is called a main image, and the image represented by the video signal output from the camera 100b is called a sub image.

通过该主图像及副图像将被摄体的像进行立体视。照相机100a及100b分别在相同的定时(时刻)生成图片并输出。The image of the subject is stereoscopically viewed through the main image and the sub image. The cameras 100a and 100b generate and output pictures at the same timing (time) respectively.

<模糊参数输入部300><Fuzzy parameter input part 300>

模糊参数输入部300是进行用于对主图像和副图像的立体影像信号附加与由照相机100a和照相机100b的实际的摄影透镜带来的散景不同的散景(ぼけ)的模糊参数的输入的用户接口,由触摸面板和十字键构成。The blur parameter input unit 300 is for inputting a blur parameter for adding a bokeh different from the bokeh caused by the actual imaging lens of the camera 100a and the camera 100b to the stereoscopic video signal of the main image and the sub image. The user interface consists of a touch panel and cross keys.

作为输入的模糊参数,输入被摄体前方或后方的位置处的模糊的调整量(Sn,Sf)和被摄体前方与后方的各权重系数(Wn,Wf)、被摄体的焦点位置信息(P)、照相机100a与100b间的基线长(l)、像素大小(m)、焦点距离fp、与实际的摄影透镜的信息不同的透镜信息、即假想的焦点距离fv和光圈值(F值)。As input blur parameters, input the blur adjustment amount (S n , S f ) at the position in front of or behind the subject, each weight coefficient (W n , W f ) in front of the subject and behind the subject, and the subject The focal position information (P), the baseline length (l) between the cameras 100a and 100b, the pixel size (m), the focal length fp, the lens information different from the information of the actual photographic lens, that is, the imaginary focal length fv and the aperture value (F value).

对被摄体的前方和后方的模糊调整量(Sn,Sf)和权重系数(Wn,Wf)而言,在进行立体视的情况下,在想要抑制前方的跃出状况而表现有进深的远近感时,通过增大前方的模糊调整量Sn或权重系数Wn、或者减小后方的模糊调整量Sf或权重系数Wf,来增大被摄体前方的模糊量。相反,在通过强调前方的被摄体、有意使背景模糊来表现使前方的被摄体显眼的立体感时,通过增大后方的模糊调整量Sf或权重系数Wf、或者减小前方的模糊调整量Sn或权重系数Wn,来增大被摄体后方的模糊量。For the blur adjustment amounts (S n , S f ) and weighting coefficients (W n , W f ) of the front and back of the subject, in the case of stereoscopic viewing, it is necessary to suppress the jumping out of the front. When expressing a sense of depth and perspective, increase the amount of blur in front of the subject by increasing the blur adjustment amount S n or weight coefficient W n in the front, or decreasing the blur adjustment amount S f or weight coefficient W f in the rear . Conversely, when expressing a three-dimensional effect that makes the front subject stand out by emphasizing the front subject and intentionally blurring the background, increase the rear blur adjustment amount S f or the weight coefficient W f , or decrease the front blur adjustment amount S f or the weight coefficient W f The blur adjustment amount S n or the weight coefficient W n increases the amount of blur behind the subject.

另外,如果增大模糊调整量(Sn,Sf),则能够与被摄体距离无关地对焦点位置的前方或后方一律地施加模糊处理。另一方面,如果增大权重系数(Wn,Wf),则被摄体越远离焦点位置则模糊越强,能够进行依存于被摄体距离的模糊处理。In addition, if the blur adjustment amount (S n , S f ) is increased, it is possible to uniformly apply blur processing to the front or back of the focus position regardless of the subject distance. On the other hand, if the weight coefficients (W n , W f ) are increased, the blur becomes stronger as the subject moves away from the focus position, and blur processing depending on the subject distance can be performed.

透镜信息和权重系数的输入通过从触摸面板和十字键调用设定项目菜单并设定各项目来进行。焦点位置通过对显示在触摸面板上的照相机100a的主图像中的被摄体的位置进行指定的操作来输入。The input of the lens information and the weighting coefficient is performed by calling the setting item menu from the touch panel and the cross key and setting each item. The focus position is input by specifying the position of the subject in the main image of the camera 100a displayed on the touch panel.

模糊参数输入部300接受这些模糊参数的设定,向图像编码装置200输出。由此,在模糊处理部202中能够进行将通过虚拟的摄影透镜或实际的透镜不能生成的任意的散景状况都能够表现的模糊处理。The blur parameter input unit 300 receives the settings of these blur parameters and outputs them to the image coding device 200 . In this way, the blurring processing unit 202 can perform blurring processing that can express any bokeh situation that cannot be generated by a virtual imaging lens or an actual lens.

<存储部400><storage unit 400>

存储部400是用来保存从图像编码装置200输出的图像数据(后述的局部解码图像信号)的记录介质。The storage unit 400 is a recording medium for storing image data output from the image encoding device 200 (locally decoded image signal described later).

<图像编码装置200><Image Coding Device 200 >

图像编码装置200通过将从照相机100a及100b输出的立体影像信号编码,生成编码影像信号并输出。这里,在本实施方式中,假设图像编码装置200对立体影像信号的主图像和副图像双方进行模糊处理,并将立体影像信号编码。此外,图像编码装置200在将包含在立体影像信号中的两个影像信号编码时,按照构成图片的每个区域将这些影像信号编码。图像编码装置200为将对从照相机100a输出的影像信号施加了模糊的图像信号以H.264MVC(Multi View Coding)形式编码的装置,将包含在影像信号中的各图片分别作为I图片、P图片及B图片编码。The image encoding device 200 encodes the stereoscopic video signals output from the cameras 100 a and 100 b to generate and output encoded video signals. Here, in this embodiment, it is assumed that the image encoding device 200 performs blur processing on both the main image and the sub image of the stereoscopic video signal, and encodes the stereoscopic video signal. Also, when encoding two video signals included in a stereoscopic video signal, the image coding device 200 codes these video signals for each region constituting a picture. The image coding device 200 is a device that encodes a blurred image signal output from the camera 100a in the H.264MVC (Multi View Coding) format, and uses each picture included in the video signal as an I picture and a P picture, respectively. and B picture coding.

另外,在将I图片及P图片编码时,图像编码装置200进行帧内预测编码。In addition, when encoding an I picture and a P picture, the image encoding device 200 performs intra-frame predictive encoding.

另外,在将P图片及B图片编码时,图像编码装置200进行帧间预测编码(运动补偿预测编码)。In addition, when encoding P pictures and B pictures, the image encoding device 200 performs inter-frame predictive encoding (motion compensation predictive encoding).

另一方面,图像编码装置200在编码对从照相机100b输出的影像信号施加了模糊的图像信号时,进行视差补偿预测编码,将包含在影像信号中的各图片分别作为P图片编码。On the other hand, the image coding device 200 performs parallax-compensated predictive coding when coding a blurred video signal output from the camera 100b, and codes each picture included in the video signal as a P picture.

即,图像编码装置200根据主图像的图片预测在与该图片相同的定时生成的副图像的图片,基于该预测结果将副图像的图片编码。That is, the image encoding device 200 predicts a picture of the sub-image generated at the same timing as the picture from the picture of the main image, and encodes the picture of the sub-image based on the prediction result.

这样的图像编码装置200具备图像取得部206、视差取得部207、模糊处理部202、选择器203、开关204a、204b及204c、减法器205、块大小决定部210a及210b、块分割部212a及212b、帧内预测部213、检测部214、补偿部215、变换部216、量化部217、可变长编码部218、逆量化部219、逆变换部220及加法器221。Such an image encoding device 200 includes an image acquisition unit 206, a parallax acquisition unit 207, a blur processing unit 202, a selector 203, switches 204a, 204b, and 204c, a subtractor 205, block size determination units 210a and 210b, a block division unit 212a and 212b, an intra prediction unit 213, a detection unit 214, a compensation unit 215, a transformation unit 216, a quantization unit 217, a variable length coding unit 218, an inverse quantization unit 219, an inverse transformation unit 220, and an adder 221.

<图像取得部206><Image Acquisition Unit 206>

图像取得部206取得从照相机100a和100b输出的图像信号,向模糊处理部202输出。The image acquisition unit 206 acquires the image signals output from the cameras 100 a and 100 b and outputs them to the blur processing unit 202 .

<视差取得部207><parallax acquisition unit 207>

视差取得部207取得图像取得部206受理的图像信号上的各要素单位的、被摄体与照相机100之间的视差的值或距离的值,将视差的值或距离的值向模糊处理部202输出。在本实施方式中,视差取得部207包括视差检测部201,视差检测部201生成视差的值。The parallax acquisition unit 207 acquires the parallax value or the distance value between the subject and the camera 100 for each element unit on the image signal received by the image acquisition unit 206, and sends the parallax value or the distance value to the blur processing unit 202. output. In the present embodiment, the parallax acquisition unit 207 includes a parallax detection unit 201 , and the parallax detection unit 201 generates a parallax value.

<视差检测部201><Parallax detection unit 201>

视差检测部201检测从照相机100a、100b输入的主图像与副图像数据间的视差。视差的检测通过求出主图像与副图像间的对应位置、将一方图像的单位区域与另一方图像的对应的区域的水平方向的位置的偏差作为像素数检测来进行。视差检测部201将检测到的视差信息d向模糊处理部202输出。The parallax detection unit 201 detects parallax between main image and sub image data input from the cameras 100a and 100b. The detection of parallax is performed by finding the corresponding position between the main image and the sub image, and detecting the deviation in the horizontal direction between the unit area of one image and the corresponding area of the other image as the number of pixels. The parallax detection unit 201 outputs the detected parallax information d to the blur processing unit 202 .

在本实施方式中,视差的检测通过使用块匹配法来进行。在块匹配法中,首先从比较源的图像切出16×16像素的单位区域。接着,从比较目标的检索区域切出多个相同的16×16大小的区域,针对切出的各个区域,求出与比较源的区域的亮度差的绝对值的总和(SAD;Sum of AbsoluteDifference)。并且,通过找出SAD最小的切出位置,以区域单位求出对应于比较源图像的位置。In this embodiment, detection of parallax is performed using a block matching method. In the block matching method, a unit area of 16×16 pixels is first cut out from the comparison source image. Next, a plurality of identical 16×16 areas are cut out from the comparison target search area, and for each cut out area, the sum of the absolute values of brightness differences (SAD; Sum of Absolute Difference) from the comparison source area is obtained . Then, by finding the cutout position with the minimum SAD, the position corresponding to the comparison source image is obtained in units of regions.

<模糊处理部202><blurring unit 202>

模糊处理部202使用从模糊参数输入部300输入的模糊参数、和从视差取得部207输入的视差信息或距离信息,决定对从图像取得部206输入的主图像和副图像的各像素单位附加的模糊矩阵。在本实施方式中,模糊处理部202使用从视差取得部207输入的视差信息。模糊处理部202将根据模糊矩阵计算出的、每个像素单位的模糊量向块大小决定部210a及210b输出。The blur processing unit 202 uses the blur parameter input from the blur parameter input unit 300 and the disparity information or distance information input from the disparity acquisition unit 207 to determine the pixel unit to be added to the main image and the sub image input from the image acquisition unit 206. fuzzy matrix. In this embodiment, the blur processing unit 202 uses the parallax information input from the parallax acquisition unit 207 . The blur processing unit 202 outputs, to the block size determination units 210 a and 210 b , the blur amount for each pixel unit calculated from the blur matrix.

此外,模糊处理部202基于模糊矩阵进行对主图像或副图像数据附加的模糊处理,将处理结果的主图像和副图像的各模糊图像数据向选择器203输出。Also, the blur processing unit 202 performs blur processing on the main image or sub image data based on the blur matrix, and outputs each blurred image data of the main image and sub image resulting from the processing to the selector 203 .

另外,在本实施方式中,像素单位由一个像素构成。In addition, in the present embodiment, a pixel unit is constituted by one pixel.

模糊处理的流程如下。模糊处理部202使用视差信息d求出从照相机到被摄体的距离分布,根据来自模糊参数输入部300的参数和被摄体的距离生成模糊矩阵,通过对主图像或副图像数据的各像素区域叠加模糊矩阵来附加模糊。同时,模糊处理部202根据模糊矩阵计算模糊量,向块大小决定部210a及210b输出。The flow of obfuscation is as follows. The blur processing unit 202 obtains the distance distribution from the camera to the subject using the disparity information d, generates a blur matrix based on the parameters from the blur parameter input unit 300 and the distance of the subject, and passes each pixel of the main image or sub-image data Area overlay blur matrix to add blur. At the same time, the blur processing unit 202 calculates the blur amount from the blur matrix, and outputs it to the block size determination units 210a and 210b.

使用图2进行说明。首先,根据各像素单位的视差信息d求出从照相机到被摄体的距离分布。如图2(a)所示,如果设视差信息为d、在摄影中使用的摄像元件的1像素的水平方向上的长度为m,则被摄体与照相机的距离D如下:It demonstrates using FIG. 2. First, the distance distribution from the camera to the subject is obtained from the parallax information d of each pixel unit. As shown in Fig. 2(a), if d is the parallax information and m is the length in the horizontal direction of one pixel of the image sensor used in photography, the distance D between the subject and the camera is as follows:

[数式1][Equation 1]

DD. == ff pp &CenterDot;&CenterDot; 11 mm &CenterDot;&Center Dot; dd

另外,如上所述,fp是透镜的焦点距离,l是照相机100a与100b间的基线长。In addition, as described above, fp is the focal length of the lens, and l is the base line length between the cameras 100a and 100b.

通过将这样的计算对全部的像素单位进行,求出拍摄在主图像或副图像中的被摄体的距离分布。By performing such calculations for all pixel units, the distance distribution of the subject captured in the main image or the sub image is obtained.

将与照相机的距离相对于焦点位置P偏离的位置的点的成像即散景的圆称作弥散圆,但在本实施方式中,使用假想的弥散圆直径σ来决定模糊矩阵的大小。The image of a point at a position deviated from the focal point P by the distance from the camera, that is, a bokeh circle is called a circle of confusion, but in this embodiment, the size of the blur matrix is determined using a virtual circle of confusion diameter σ.

焦点位置P与照相机的距离L通过在上述D的计算式中将焦点位置P处的视差信息代入到d中而求出为D的值。同样,任意的被摄体与照相机的距离X通过在上述D的计算式中将该被摄体的视差信息代入到d中而求出为D的值。The distance L between the focus position P and the camera is obtained as a value of D by substituting the parallax information at the focus position P into d in the calculation formula of D above. Similarly, the distance X between an arbitrary subject and the camera is obtained as a value of D by substituting the parallax information of the subject into d in the calculation formula of D above.

相对于照相机位于距离X处的弥散圆直径使用作为光学系统的特性值的焦点距离fv、F值F、焦点位置与照相机的距离L、照相机与被摄体的距离X如以下这样计算。The diameter of the circle of confusion at a distance X from the camera is calculated as follows using the focal distance fv, the F value F, the distance L between the focal position and the camera, and the distance X between the camera and the subject, which are characteristic values of the optical system.

在本实施方式中,F值F使用从模糊参数输入部300输入的假想值。此外,使用从模糊参数输入部300输入的模糊调整量Sf、Sn、权重系数Wf、Wn,对比焦点位置靠后方及前方的弥散圆直径σ进行加权。模糊调整量Sf、Sn和权重系数Wf、Wn如上述那样,如果为Sf>Sn或Wf>Wn,则后方的模糊较强,前方的模糊较弱,如果为Sf<Sn或Wf<Wn,则前方的模糊较强,后方的模糊较弱。此外,如果模糊调整量Sf、Sn都为0,则变为没有调整量,成为由虚拟光学系统产生的散景,值越大则越能对焦点位置的前方或后方一律地施加模糊。此外,权重系数Wf、Wn如果都为1,则变为没有加权,成为由虚拟光学系统产生的散景本身,值越大则产生越强地依存于被摄体距离的模糊,如果都为0,则对前方或后方的模糊不再依存于被摄体距离。In the present embodiment, a virtual value input from the fuzzy parameter input unit 300 is used for the F value F. In addition, using the blur adjustment amounts S f , S n , and weight coefficients W f , W n input from the blur parameter input unit 300 , the diameters σ of the circle of confusion behind and in front of the comparison focus position are weighted. Blur adjustment amounts S f , S n and weight coefficients W f , W n are as described above. If S f >S n or W f >W n , the rear blur is stronger and the front blur is weaker. If S If f <S n or W f <W n , the front blur is stronger and the rear blur is weaker. Also, if the blur adjustment amounts S f and S n are both 0, there is no adjustment amount, and bokeh by the virtual optical system is formed, and the larger the value, the more uniform the blur can be applied to the front or rear of the focus position. In addition, if the weight coefficients W f and W n are both 1, there will be no weighting, and the bokeh itself generated by the virtual optical system will become larger. The larger the value, the stronger the blur that depends on the subject distance will be generated. If both If it is 0, the blur to the front or back no longer depends on the subject distance.

如果在将弥散圆径的计算式近似后加上调整量并进行加权,则比焦点位置靠后方的假想弥散圆直径σ如下:If the calculation formula of the circle of confusion is approximated and the adjustment amount is added and weighted, the diameter σ of the imaginary circle of confusion behind the focus position is as follows:

[数式2][Formula 2]

&sigma;&sigma; == WW ff &CenterDot;&CenterDot; ff vv 22 &CenterDot;&CenterDot; (( Xx -- LL )) FLXFLX ++ SS ff

比焦点位置靠前方的假想弥散圆直径σ如下:The diameter σ of the imaginary circle of confusion ahead of the focus position is as follows:

[数式3][Formula 3]

&sigma;&sigma; == WW nno &CenterDot;&Center Dot; ff vv 22 &CenterDot;&CenterDot; (( LL -- Xx )) FLXFLX ++ SS nno

如果按照主图像及副图像上的每个像素单位向上述D的计算式输入视差信息d而求出距离X,并对该假想弥散圆直径σ的计算式输入距离X,则能够求出模糊矩阵的大小。在图2(b)中表示基于数式2、数3的假想弥散圆直径σ与距离的关系。接着,如图3(a)所示,制作将以模糊矩阵的大小即假想弥散圆直径σ为直径的圆的内部设为滤波系数1、将外侧设为滤波系数0的模糊矩阵。The blur matrix can be obtained by inputting the disparity information d into the formula of D above for each pixel unit on the main image and the sub-image to obtain the distance X, and inputting the distance X into the formula for the diameter σ of the imaginary circle of confusion. the size of. In FIG. 2( b ), the relationship between the diameter σ of the imaginary circle of confusion and the distance based on Equation 2 and Equation 3 is shown. Next, as shown in FIG. 3( a ), a fuzzy matrix is created in which the inside of a circle whose diameter is the virtual confusion circle diameter σ, which is the size of the fuzzy matrix, is set to filter coefficient 1, and the outside is set to filter coefficient 0.

接着,通过将所生成的模糊矩阵与主图像或副图像数据的各像素区域叠加而附加模糊。此时,首先计算模糊矩阵内的全部滤波系数的和,进行用该值除矩阵内全部滤波系数的除法,生成内部的全部滤波系数之和是1的叠加矩阵。使用该叠加矩阵进行叠加。Next, blurring is added by superimposing the generated blur matrix on each pixel area of the main image or sub image data. At this time, the sum of all the filter coefficients in the fuzzy matrix is first calculated, and the value is used to divide all the filter coefficients in the matrix to generate a superposition matrix in which the sum of all the filter coefficients inside is 1. Use this overlay matrix for the overlay.

此外,根据在上述中求出的每个像素单位的模糊矩阵,计算每个像素单位的模糊量。模糊量是指示模糊矩阵中的滤波系数为阈值以上的范围的值。对指示范围的值而言,例如如果是圆形则为直径,如果是正方形则为对角线的长度。Also, based on the blur matrix for each pixel unit obtained above, the blur amount for each pixel unit is calculated. The blur amount is a value indicating that the filter coefficients in the blur matrix are in the range above the threshold. For values indicating a range, eg the diameter in the case of a circle, the length of the diagonal in the case of a square.

在本实施方式中,模糊矩阵是将以假想弥散圆直径σ为直径的圆的内部设为滤波系数1、将外侧设为滤波系数0的矩阵,所以设阈值为1,作为指示直径σ的圆的值,将模糊量设为σ。In this embodiment, the fuzzy matrix is a matrix in which the inside of a circle with the diameter σ of the imaginary circle of confusion is set as a filter coefficient 1, and the outside is set as a filter coefficient 0. Therefore, a threshold value of 1 is set as a circle with an indicated diameter σ. The value of , set the amount of blurring to σ.

模糊处理部202将如上述那样求出的每个像素单位的模糊量向块大小决定部210a及210b输出。The blur processing unit 202 outputs the blur amount per pixel obtained as described above to the block size determination units 210 a and 210 b.

<选择器203><selector 203>

选择器203取得从照相机100a及100b分别输出的影像信号,将这些影像信号交替地切换而向开关204a、减法器205、块分割部212a或212b输出。The selector 203 acquires video signals output from the cameras 100a and 100b, alternately switches these video signals, and outputs them to the switch 204a, the subtractor 205, and the block dividing unit 212a or 212b.

在本实施方式中,选择器203以图片单位进行切换。即,选择器203如果将模糊处理后的主图像和副图像分别以相同的定时从模糊处理部202取得,则首先输出模糊处理后的主图像,接着输出模糊处理后的副图像。In this embodiment, the selector 203 performs switching in units of pictures. That is, when the selector 203 obtains the blurred main image and the sub image from the blur processing unit 202 at the same timing, first outputs the blurred main image, and then outputs the blurred sub image.

<减法部205><Subtraction Department 205>

减法器205按照每个块计算从选择器203输出的影像信号所表示的编码对象图像、与从开关204b输出的预测信号所表示的预测图像的差。减法器205将表示该差的预测误差信号向开关204a输出。The subtractor 205 calculates, for each block, the difference between the encoding target image indicated by the video signal output from the selector 203 and the predicted image indicated by the predicted signal output from the switch 204b. The subtractor 205 outputs a prediction error signal indicating the difference to the switch 204a.

这里,减法器205在编码对象图像为I图片、P图片或B图片的图像(块)的各图片中,计算上述差而输出预测误差信号。Here, the subtracter 205 calculates the above-mentioned difference in each picture in which the encoding target image is an I picture, a P picture, or a B picture (block), and outputs a prediction error signal.

<开关204a><switch 204a>

开关204a在编码对象图像是I图片的主图像、不进行帧内预测的情况下,将选择器203连接到变换部216,将表示该编码对象图像的影像信号从选择器203向变换部216传递。The switch 204a connects the selector 203 to the conversion unit 216 when the encoding target image is the main image of an I picture and intra prediction is not performed, and transmits the video signal representing the encoding target image from the selector 203 to the conversion unit 216. .

此外,开关204a在编码对象图像是I图片的主图像、进行帧内预测的情况下、或者在编码对象图像是P图片或B图片的图像(主图像或副图像)的情况下,将减法器205连接到变换部216,将I图片、P图片或B图片的各预测误差信号从减法器205向变换部216传递。In addition, the switch 204a switches the subtractor to the substractor when the encoding target image is a main image of an I picture and intra-frame prediction is performed, or when the encoding target image is an image (main image or sub image) of a P picture or a B picture. 205 is connected to the conversion unit 216 , and transmits each prediction error signal of an I picture, a P picture, or a B picture from the subtractor 205 to the conversion unit 216 .

<变换部216><conversion unit 216>

变换部216按照每个块经由开关204a取得影像信号或预测误差信号作为图像信号,对该图像信号进行作为正交变换的离散余弦变换(DCT;Discrete Cosine Transform)。由此,变换部216将图像信号变换为作为频率系数的DCT系数,即,将该图像信号的区域从空间区域变换为频率区域,将该频率系数向量化部217输出。The transform unit 216 acquires a video signal or a prediction error signal as an image signal for each block via the switch 204 a, and performs discrete cosine transform (DCT; Discrete Cosine Transform) as an orthogonal transform on the image signal. Thus, the conversion unit 216 converts the image signal into DCT coefficients that are frequency coefficients, that is, converts the domain of the image signal from the spatial domain to the frequency domain, and outputs the frequency coefficients to the quantization unit 217 .

<量化部217><quantization part 217>

量化部217从变换部216取得频率系数,对该频率系数进行量化。即,量化部217通过将频率系数除以量化步长而生成量化值。这里,量化部217按照图像编码标准,在本实施方式中按照H.264,使用决定的量化步长将该编码对象块量化。The quantization unit 217 acquires frequency coefficients from the conversion unit 216 and quantizes the frequency coefficients. That is, the quantization unit 217 generates a quantization value by dividing the frequency coefficient by the quantization step size. Here, the quantization unit 217 quantizes the coding target block using a determined quantization width in accordance with the image coding standard, H.264 in this embodiment.

<可变长编码部218><variable length coding unit 218>

可变长编码部218通过将由量化部217生成的量化值和从检测部214输出的运动矢量或视差矢量进行可变长编码,生成编码立体影像信号并输出。另外,该可变长编码是可逆的编码。The variable length coding unit 218 performs variable length coding on the quantization value generated by the quantization unit 217 and the motion vector or disparity vector output from the detection unit 214 to generate and output an encoded stereoscopic video signal. In addition, this variable length coding is reversible coding.

<逆量化部219><Inverse Quantization Unit 219>

逆量化部219通过对由量化部217生成的量化值进行逆量化而生成逆量化频率系数。即,逆量化部219通过对在量化部217中使用的量化步长乘以量化值,生成逆量化频率系数。The inverse quantization unit 219 generates inverse quantization frequency coefficients by inverse quantizing the quantization value generated by the quantization unit 217 . That is, the inverse quantization unit 219 generates an inverse quantization frequency coefficient by multiplying the quantization width used in the quantization unit 217 by the quantization value.

另外,此时生成的逆量化频率系数与由变换部216生成的频率系数不同,包含量化误差。In addition, the dequantized frequency coefficients generated at this time are different from the frequency coefficients generated by the conversion unit 216 and include quantization errors.

<逆变换部220><Inverse conversion unit 220>

逆变换部220对由逆量化部219生成的逆量化频率系数进行作为变换部216进行的正交变换的逆运算的逆正交变换,在本实施方式中进行逆离散余弦变换(iDCT;inverseDiscrete Cosine Transform)。由此,逆变换部220将逆量化频率系数变换为图像信号,即,将该逆量化频率系数的区域从频率区域变换为空间区域,将该图像信号向加法器221输出。The inverse transform unit 220 performs an inverse orthogonal transform, which is an inverse operation of the orthogonal transform performed by the transform unit 216, on the inverse quantized frequency coefficients generated by the inverse quantization unit 219, and performs an inverse discrete cosine transform (iDCT; inverse Discrete Cosine Transform) in this embodiment. Transform). Accordingly, the inverse transform unit 220 transforms the inverse quantized frequency coefficients into an image signal, that is, transforms the region of the inverse quantized frequency coefficients from the frequency domain to the spatial domain, and outputs the image signal to the adder 221 .

<加法器221><Adder 221>

加法器221在编码对象图像是I图片的主图像、不进行帧内预测的情况下,将从逆变换部220输出的图像信号作为局部解码图像信号向存储部400保存。The adder 221 stores the image signal output from the inverse transform unit 220 as a locally decoded image signal in the storage unit 400 when the encoding target image is a main image of an I picture and intra prediction is not performed.

此外,加法器221在编码对象图像是I图片的主图像、进行帧内预测的情况下,或者在编码对象图像是P图片或B图片的图像(既可以是主图像也可以是副图像)的情况下,将从逆变换部220输出的图像信号与从开关204c输出的预测信号相加,将其相加结果作为局部解码图像信号向帧内预测部213输出。同时,将相加结果向存储部400保存。In addition, the adder 221 performs intra prediction when the encoding target image is a main image of an I picture, or when the encoding target image is a P picture or a B picture (either a main image or a sub image). In this case, the image signal output from the inverse transform unit 220 is added to the prediction signal output from the switch 204c, and the addition result is output to the intra prediction unit 213 as a locally decoded image signal. At the same time, the addition result is stored in the storage unit 400 .

<块大小决定部210a><block size determination unit 210a>

块大小决定部210a在编码对象图像为I图片、P图片或B图片的各图像中进行帧内预测的情况下,从模糊处理部202取得编码对象图像区域的模糊量,与阈值比较。The block size determination unit 210a obtains the blurring amount of the coding target image area from the blurring processing unit 202 and compares it with a threshold when the coding target picture is an I picture, a P picture, or a B picture and performs intra prediction.

在本实施方式中,如上述那样作为编码方式而使用H.264,所以在帧内预测中,可以使用16×16、4×4的块大小。这里,设阈值为4像素,模糊量比4像素大的区域不使用4×4的块大小。In the present embodiment, H.264 is used as the encoding method as described above, so in intra prediction, block sizes of 16×16 and 4×4 can be used. Here, the threshold is set to 4 pixels, and the block size of 4×4 is not used for the area whose blurring amount is larger than 4 pixels.

在模糊量比阈值大的情况下,向块分割部212a输出将由帧内预测部213预测的块单位限制为16×16的较大的块大小的块大小信息。When the amount of blur is greater than the threshold, block size information that limits the block unit predicted by the intra prediction unit 213 to a larger block size of 16×16 is output to the block dividing unit 212 a.

相反,在模糊量比阈值小的情况下,向块分割部212a输出除了16×16以外还包括4×4的较小的块大小在内的块大小信息。Conversely, when the amount of blur is smaller than the threshold, block size information including a smaller block size of 4×4 in addition to 16×16 is output to the block division unit 212 a.

<块分割部212a><block division unit 212a>

块分割部212a基于从块大小决定部210a输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小分割。The block division unit 212a divides the encoding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determination unit 210a.

例如,在块大小信息被限制为16×16的情况下,仅以16×16的大小将编码对象图像分割,将分割图像向帧内预测部213输出。For example, when the block size information is limited to 16×16, the encoding target image is divided into only 16×16, and the divided image is output to the intra prediction unit 213 .

另一方面,在块大小信息由16×16和4×4的两种构成的情况下,准备将编码对象图像以16×16的块大小分割的图像、和将相同的编码对象图像以4×4的块大小分割的图像这两种,将所准备的两种分割图像分别向帧内预测部213输出。On the other hand, when the block size information is composed of two types of 16×16 and 4×4, an image obtained by dividing an encoding target image into a 16×16 block size, and an image obtained by dividing the same encoding target image into a 4×4 block size are prepared. The prepared two types of divided images are output to the intra prediction unit 213 respectively.

<帧内预测部213><Intra Prediction Unit 213>

帧内预测部213针对从加法器221输出的相同的图片中的局部解码图像信号,对从编码对象图像的位置观察时为左、上、右上、左上的共计4个位置,以从块分割部212a输出的分割块大小的单位进行帧内预测。For the locally decoded image signal in the same picture output from the adder 221, the intra prediction unit 213 calculates a total of four positions, which are left, upper, upper right, and upper left when viewed from the position of the encoding target image, to obtain the following information from the block division unit. Intra-frame prediction is performed in units of the divided block size output by 212a.

例如,在从块分割部212a接受到被限制为16×16的块大小的块信息的情况下,对4个位置,以16×16的块大小进行相同或类似的块的搜索。For example, when block information limited to a block size of 16×16 is received from the block dividing unit 212 a, a search for the same or similar block is performed with a block size of 16×16 for four positions.

另一方面,在接受到16×16和4×4这两种块大小信息的情况下,对4个位置,以16×16和4×4的两种块大小进行相同或类似的块的搜索。On the other hand, in the case of receiving two types of block size information of 16×16 and 4×4, a search for the same or similar block is performed with two block sizes of 16×16 and 4×4 for 4 positions .

然后,将通过搜索得到的最类似的预测信号向开关204b和204c输出。Then, the most similar prediction signal obtained by searching is output to switches 204b and 204c.

<块大小决定部210b><block size determination unit 210b>

块大小决定部210b在编码对象图像是P图片或B图片的主图像的情况、和P图片的副图像的情况下,从模糊处理部202取得编码对象图像区域的模糊量,与阈值比较。The block size determination unit 210b obtains the blurring amount of the encoding target image region from the blur processing unit 202 when the encoding target image is a main image of a P picture or a B picture, or a sub image of a P picture, and compares it with a threshold.

在本实施方式中,如上述那样,作为编码方式而使用H.264,所以在帧间预测中可以使用16×16、8×8的块大小。这里,设阈值为8像素,模糊量比8像素大的像素不使用8×8的块大小。另外,在H.264的标准上也可以使用16×8、8×16的块大小,但在本实施方式中不使用。In the present embodiment, as described above, H.264 is used as an encoding method, so block sizes of 16×16 and 8×8 can be used for inter prediction. Here, the threshold is set to be 8 pixels, and the block size of 8×8 is not used for pixels whose blurring amount is larger than 8 pixels. In addition, block sizes of 16×8 and 8×16 can also be used in the H.264 standard, but they are not used in this embodiment.

在模糊量比阈值大的情况下,向块分割部212b输出将由检测部214搜索运动矢量或视差矢量的块单位限制为16×16的较大的块大小的块大小信息。这里,作为阈值而使用8像素。When the amount of blur is greater than the threshold, block size information that limits the block unit for searching for a motion vector or a disparity vector by the detection unit 214 to a large block size of 16×16 is output to the block division unit 212b. Here, 8 pixels are used as the threshold.

相反,在模糊量比阈值小的情况下,向块分割部212b输出除了16×16以外还包括8×8的较小的块大小在内的块大小信息。Conversely, when the amount of blur is smaller than the threshold, block size information including a smaller block size of 8×8 in addition to 16×16 is output to the block division unit 212 b.

<块分割部212b><block division unit 212b>

块分割部212b基于从块大小决定部210b输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小分割。The block division unit 212b divides the encoding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determination unit 210b.

例如,在限制为16×16的块大小信息的情况下,仅以16×16的大小将编码对象图像分割,将分割图像向检测部214输出。For example, when the block size information is limited to 16×16, the encoding target image is divided into only 16×16, and the divided image is output to the detection unit 214 .

另一方面,在接受到16×16和8×8的两种块大小信息的情况下,准备将编码对象图像以16×16的块大小分割的图像、和使用相同的编码对象图像以8×8的块大小分割的图像这两种,将两分割图像向检测部214输出。On the other hand, when two kinds of block size information of 16×16 and 8×8 are received, an image obtained by dividing an encoding target image into a block size of 16×16, and an image divided into 8×8 using the same encoding target image are prepared. There are two types of divided images with a block size of 8, and the two divided images are output to the detection unit 214 .

<检测部214><detection part 214>

检测部214在由块分割部212b块分割后的编码对象图像是P图片或B图片的主图像的情况下,对于该编码对象图像按照每个块检测运动矢量。The detection unit 214 detects a motion vector for each block of the encoding target image when the encoding target image block-divided by the block dividing unit 212 b is a main image of a P picture or a B picture.

即,检测部214将保存在存储部400中的表示已被编码并解码的其他主图像(I图片或P图片)的局部解码图像信号作为参照图像参照。That is, the detection unit 214 refers to the local decoded image signal representing another encoded and decoded main image (I picture or P picture) stored in the storage unit 400 as a reference image.

并且,检测部214通过从该参照图像中搜索与编码对象图像(编码对象块)相同或类似的块,将该编码对象图像的运动作为运动矢量来检测。Then, the detection unit 214 detects the motion of the encoding target image as a motion vector by searching for a block identical to or similar to the encoding target image (encoding target block) from the reference image.

并且,检测部214将该运动矢量向补偿部215及可变长编码部218输出。Then, the detection unit 214 outputs the motion vector to the compensation unit 215 and the variable length coding unit 218 .

另一方面,检测部214在由块分割部212b块分割后的编码对象图像是P图片的副图像的情况下,对该编码对象图像按照每个块检测视差矢量。On the other hand, when the encoding target image block-divided by the block dividing unit 212 b is a sub-picture of a P picture, the detection unit 214 detects a disparity vector for each block of the encoding target image.

即,检测部214将保存在存储部400中的表示已经被编码、表示解码后的主图像(I图片、P图片或B图片)的局部解码图像信号作为参照图像参照。That is, the detection unit 214 refers to the local decoded image signal representing the coded and decoded main image (I picture, P picture, or B picture) stored in the storage unit 400 as a reference image.

并且,检测部214通过从该参照图像中搜索与编码对象图像(编码对象块)相同或类似的块,检测该编码对象块与相同或类似的块之间的位置关系作为视差矢量(视差)。Then, the detection unit 214 detects the positional relationship between the encoding target block and the same or similar block as a disparity vector (disparity) by searching the reference image for the same or similar block as the encoding target image (coding target block).

另外,包括编码对象块的副图像的图片、和作为主图像的参照图像(参照图片)分别是由照相机100a及100b在相同的定时生成的图片。并且,检测部214将该视差矢量向补偿部215及可变长编码部218输出。Also, a picture including a sub-picture of a block to be coded and a reference picture (reference picture) that is a main picture are pictures generated at the same timing by the cameras 100a and 100b, respectively. Then, the detection unit 214 outputs the disparity vector to the compensation unit 215 and the variable length coding unit 218 .

另外,视差矢量将上述块间的位置关系表示为左右方向的位置的偏差。In addition, the disparity vector expresses the above-mentioned positional relationship between blocks as a positional deviation in the left-right direction.

此外,在运动矢量和视差矢量双方的情况下,在从块分割部212b接受到被限制为16×16的块大小的块信息的情况下,对于编码对象图像的周围32×32的区域,仅以16×16的块大小进行相同或类似的块的搜索。Also, in the case of both motion vectors and disparity vectors, when block information limited to a block size of 16×16 is received from the block dividing unit 212b, only The search for the same or similar blocks is performed with a block size of 16×16.

另一方面,在接受到16×16和8×8这两种块大小信息的情况下,对于编码对象图像的周围32×32的区域,以16×16和8×8的两种块大小进行相同或类似的块的搜索。On the other hand, when two block size information of 16×16 and 8×8 is received, for the surrounding 32×32 area of the encoding target image, two kinds of block sizes of 16×16 and 8×8 are used. Search for identical or similar blocks.

然后,将最类似的运动矢量或视差矢量向补偿部215输出。Then, the most similar motion vector or disparity vector is output to the compensation unit 215 .

<补偿部215><Compensation Department 215>

补偿部215在从检测部214取得了运动矢量时,使用该运动矢量和参照图像进行运动补偿,由此生成预测信号,将该预测信号输出。即,将包含在参照图像中的上述相同或类似的块根据上述运动矢量在空间上移位。When the compensation unit 215 acquires a motion vector from the detection unit 214 , it performs motion compensation using the motion vector and a reference image to generate a prediction signal, and outputs the prediction signal. That is, the aforementioned same or similar blocks included in the reference picture are spatially shifted according to the aforementioned motion vector.

另一方面,补偿部215在从检测部214取得了视差矢量时,使用该视差矢量和参照图像进行视差补偿,由此生成预测信号,将该预测信号输出。On the other hand, when the compensation unit 215 acquires the disparity vector from the detection unit 214 , it performs disparity compensation using the disparity vector and the reference image, thereby generating a prediction signal, and outputs the prediction signal.

即,将包含在参照图像中的上述相同或类似的块根据上述视差矢量在空间上移位。That is, the above-mentioned identical or similar blocks included in the reference image are spatially shifted according to the above-mentioned disparity vector.

<开关204c><Switch 204c>

开关204c在编码对象图像是I图片的主图像、不进行帧内预测的情况下,开放帧内预测部213与加法器221之间、以及开放补偿部215与加法器221之间。The switch 204c opens between the intra prediction unit 213 and the adder 221 and between the compensation unit 215 and the adder 221 when the encoding target image is the main image of an I picture and intra prediction is not performed.

此外,开关204c在编码对象图像是I图片、P图片或B图片的图像(主图像或副图像)的情况下进行帧内预测时,将帧内预测部213连接到加法器221,将预测信号从帧内预测部213向加法器221传递。In addition, the switch 204c connects the intra prediction unit 213 to the adder 221 when the encoding target image is an I-picture, P-picture, or B-picture image (main image or sub-image) to perform intra prediction, and the prediction signal The data is passed from the intra prediction unit 213 to the adder 221 .

另一方面,开关204c在编码对象图像是P图片或B图片的图像(主图像或副图像)的情况下,将补偿部215连接到加法器221,将预测信号从补偿部215向加法器221传递。On the other hand, the switch 204c connects the compensation unit 215 to the adder 221 when the coding target picture is a P picture or a B picture (main picture or sub picture), and sends the prediction signal from the compensation unit 215 to the adder 221. transfer.

<开关204b><switch 204b>

开关204b在编码对象图像是I图片、P图片或B图片的图像(主图像或副图像)的情况下进行帧内预测时,将帧内预测部213连接到减法器205,将预测信号从帧内预测部213向减法器205传递。The switch 204b connects the intra prediction unit 213 to the subtractor 205 when performing intra prediction when the encoding target image is an image of an I picture, a P picture, or a B picture (main image or sub image). The intra prediction unit 213 passes the information to the subtractor 205 .

另一方面,开关204b在编码对象图像是P图片或B图片的图像(主图像或副图像)的情况下,将补偿部215连接到减法器205,将预测信号从补偿部215向减法器205传递。On the other hand, the switch 204b connects the compensation unit 215 to the subtractor 205 when the coding target picture is a P picture or a B picture (main picture or sub picture), and sends the predicted signal from the compensation unit 215 to the subtracter 205. transfer.

此外,在编码对象图像是P图片或B图片的图像(主图像或副图像)、有帧内预测部213和补偿部215双方的预测信号的情况下,将帧内预测部213的预测信号和补偿部215的预测信号中的某个更类似的预测信号向减法器205传递。Also, when the encoding target image is a P picture or a B picture (main image or sub image) and there are prediction signals from both the intra prediction unit 213 and the compensation unit 215, the prediction signal from the intra prediction unit 213 and the A more similar prediction signal among the prediction signals of the compensation unit 215 is passed to the subtractor 205 .

<动作><action>

图4、图5、图6、图7及图8是表示本实施方式的图像编码装置200的动作的流程图。4 , 5 , 6 , 7 , and 8 are flowcharts showing operations of the image coding device 200 according to this embodiment.

图像编码装置200将包含在有视差的立体影像信号中的图片依次编码。The image coding device 200 sequentially codes the pictures included in the stereoscopic video signal with parallax.

图像编码装置200在编码时,首先,为了使主要被摄体显眼而呈现出立体感,设定用来进行使主要被摄体以外的区域模糊的透镜信息等任意的用于进行模糊的模糊参数(S10)。At the time of encoding, the image encoding device 200 first sets arbitrary blurring parameters for blurring, such as lens information for blurring areas other than the main subject, in order to make the main subject stand out and give a three-dimensional effect. (S10).

图像编码装置200在模糊参数的设定完成后,进行图像信号的取得(S20),视差检测部201进行所取得的两个图像间的视差的检测(S30)。The image coding device 200 acquires an image signal after the setting of the blur parameter is completed ( S20 ), and the parallax detection unit 201 detects the parallax between the two acquired images ( S30 ).

图像编码装置200选择作为编码的对象的图像(S40)。在本实施方式中,由于对主图像和副图像双方附加模糊而编码,所以选择主图像和副图像双方。The image encoding device 200 selects an image to be encoded ( S40 ). In this embodiment, both the main image and the sub image are selected for coding by adding blur to both the main image and the sub image.

模糊处理部202根据由步骤S10取得的模糊参数和在S30中取得的视差信息,计算要对立体影像信号附加的模糊量,进行对立体影像信号附加计算出的模糊量的模糊处理(S50)。The blurring processing unit 202 calculates a blurring amount to be added to the stereoscopic video signal based on the blurring parameter acquired in step S10 and the parallax information acquired in S30 , and performs blurring processing of adding the calculated blurring amount to the stereoscopic video signal ( S50 ).

图像编码装置200为了对由这些追加了模糊量的模糊图像构成的立体影像信号进行编码,生成编码对象信号(S60)。The image coding device 200 generates a signal to be coded in order to code a stereoscopic video signal composed of blurred images to which blur amounts have been added ( S60 ).

这里,说明生成编码对象信号的S60的一系列的动作。首先,判别编码对象图像是否是主图像(S61)。这里,由图像编码装置200中具备的控制部判别。Here, a series of operations in S60 for generating an encoding target signal will be described. First, it is determined whether or not the image to be encoded is a main image ( S61 ). Here, it is determined by the control unit included in the image encoding device 200 .

这里,如果判别编码对象图像是主图像(S61中是),则上述控制部进一步判别是否应对该编码对象图像进行运动补偿预测编码(S62)。例如,图像编码装置200在将编码对象图像作为P图片或B图片的块进行编码时,判别为应进行运动补偿预测编码(S62中是),在将编码对象图像作为I图片的块进行编码时,判别为不应进行运动补偿预测编码(S62中否)。Here, if it is determined that the encoding target image is the main image (YES in S61 ), the control unit further determines whether motion compensation predictive encoding should be performed on the encoding target image ( S62 ). For example, when the image encoding device 200 encodes the encoding target image as a block of a P picture or a B picture, it determines that motion compensation predictive encoding should be performed (Yes in S62), and when encoding the encoding target image as a block of an I picture, , it is determined that motion compensation predictive coding should not be performed (No in S62).

控制部如果判别为应进行运动补偿预测编码(S62中是),则对开关204a进行控制而将减法器205连接到变换部216,对开关204b进行控制而将补偿部215连接到减法器205,对开关204c进行控制而将补偿部215与加法器221之间连接。If the control unit determines that motion compensation predictive coding should be performed (Yes in S62), it controls the switch 204a to connect the subtractor 205 to the conversion unit 216, controls the switch 204b to connect the compensation unit 215 to the subtractor 205, The switch 204c is controlled to connect the compensation unit 215 and the adder 221 .

接着,块大小决定部210b根据该编码对象图像的模糊量,决定进行运动检测时的块大小(S64b)。首先,从模糊处理部202取得编码对象图像区域的模糊量,与阈值比较(S211)。如果判断为比阈值大,则向块分割部212b输出将由检测部214搜索运动矢量的块单位限制为16×16的较大的块大小的块大小信息(S212)。相反,如果判断为比阈值小,则向块分割部212b输出除了16×16以外还包括8×8的较小的块大小在内的块大小信息(S213)。Next, the block size determination unit 210 b determines a block size for motion detection based on the blur amount of the encoding target image ( S64 b ). First, the blurring amount of the encoding target image region is acquired from the blurring processing unit 202 and compared with a threshold value ( S211 ). If it is judged to be larger than the threshold value, the block size information that limits the block unit in which the motion vector is searched by the detection unit 214 to a large block size of 16×16 is output to the block division unit 212 b ( S212 ). Conversely, if it is judged to be smaller than the threshold, block size information including a smaller block size of 8×8 in addition to 16×16 is output to the block division unit 212 b ( S213 ).

块分割部212b基于从块大小决定部210b输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小进行分割(S65b)。The block division unit 212b divides the coding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determination unit 210b (S65b).

接着,检测部214对于该编码对象图像,以从块分割部212b接受的块大小搜索相同或类似的块,检测运动矢量。此时,输出最类似的运动矢量(S661)。Next, the detection unit 214 searches for the same or similar block with the block size received from the block division unit 212b in the encoding target image, and detects a motion vector. At this time, the most similar motion vector is output ( S661 ).

在运动矢量中,在从块分割部212b接受到被限制为16×16的块大小的块信息的情况下,对于编码对象图像的周围32×32的区域,仅以16×16的块大小进行相同或类似的块的搜索。In the motion vector, when the block information limited to the block size of 16×16 is received from the block division unit 212b, only the block size of 16×16 is performed for the area of 32×32 around the encoding target image. Search for identical or similar blocks.

另一方面,在接受到16×16和8×8的两种块大小信息的情况下,对于编码对象图像的周围32×32的区域,以16×16和8×8的两种块大小进行相同或类似的块的搜索。然后,将最类似的运动矢量向补偿部215输出。On the other hand, when two types of block size information of 16×16 and 8×8 are received, for the surrounding 32×32 area of the encoding target image, two kinds of block sizes of 16×16 and 8×8 are performed. Search for identical or similar blocks. Then, the most similar motion vector is output to the compensation unit 215 .

进而,补偿部215使用该检测到的运动矢量进行运动补偿,生成针对编码对象图像的块的预测信号(S662)。Furthermore, the compensation unit 215 performs motion compensation using the detected motion vector, and generates a prediction signal for a block of the encoding target image ( S662 ).

此外,减法器205通过从编码对象图像减去预测信号所表示的图像而生成预测误差信号(S67b)。Furthermore, the subtracter 205 generates a prediction error signal by subtracting the image indicated by the prediction signal from the encoding target image ( S67 b ).

另一方面,控制部在编码对象图像是I图片、在S406中判别为不应进行运动补偿预测编码、并且判别为应进行帧内预测编码时,或者在编码对象图像是P图片或B图片、判别为应进行帧内预测编码时(S63中是),对开关204a进行控制而将减法器205连接到变换部216,对开关204b控制而将帧内编码部213连接到减法器205,对开关204c进行控制而将帧内编码部213与加法器221之间连接。On the other hand, when the encoding target image is an I picture and it is determined in S406 that motion compensation predictive encoding should not be performed and intra-frame predictive encoding should be performed, or when the encoding target image is a P picture or a B picture, When it is determined that intra-frame predictive coding should be performed (Yes in S63), the switch 204a is controlled to connect the subtractor 205 to the conversion unit 216, the switch 204b is controlled to connect the intra-frame coding unit 213 to the subtractor 205, and the switch 204c performs control to connect between the intra coding unit 213 and the adder 221 .

接着,块大小决定部210a根据该编码对象图像的模糊量,决定进行帧内预测时的块大小(S64a)。首先,从模糊处理部202取得编码对象图像区域的模糊量,判断是否比阈值大(S201)。如果判断为比阈值大,则向块分割部212a输出将由帧内预测部213进行块搜索的块单位限制为16×16的较大的块大小的块大小信息(S202)。相反,如果判断为比阈值小,则向块分割部212a输出除了16×16以外还包括4×4的较小的块大小在内的块大小信息(S203)。Next, the block size determination unit 210 a determines a block size for performing intra prediction based on the blur amount of the encoding target image ( S64 a ). First, the blurring amount of the encoding target image region is acquired from the blurring processing unit 202 , and it is judged whether or not it is larger than a threshold value ( S201 ). If it is judged to be larger than the threshold, the block size information is output to the block division unit 212 a , which limits the block unit of the block search performed by the intra prediction unit 213 to a large block size of 16×16 ( S202 ). Conversely, if it is judged to be smaller than the threshold, block size information including a smaller block size of 4×4 in addition to 16×16 is output to the block division unit 212 a ( S203 ).

块分割部212a基于从块大小决定部210a输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小进行分割(S65a)。The block dividing unit 212 a divides the coding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determining unit 210 a ( S65 a ).

在帧内预测中,在从块分割部212a接受到被限制为16×16的块大小的块信息的情况下,对于从编码对象图像的位置观察时为左、上、右上、左上的共计4个位置,仅以16×16的块大小进行相同或类似的块的搜索。In intra prediction, when block information limited to a block size of 16×16 is received from the block division unit 212a, a total of 4 blocks are left, top, top right, and top left when viewed from the position of the encoding target image. positions, the search for the same or similar blocks is performed only with a block size of 16×16.

另一方面,在接受到16×16和4×4的两种块大小信息的情况下,对于4个位置,以16×16和4×4的两种块大小进行相同或类似的块的搜索。On the other hand, in the case where two kinds of block size information of 16×16 and 4×4 are received, the search for the same or similar block is performed with two kinds of block sizes of 16×16 and 4×4 for 4 positions .

然后,将最类似的预测信号向开关204b和204c输出(S66)。Then, the most similar prediction signal is output to the switches 204b and 204c (S66).

此外,减法器205通过从编码对象图像减去预测信号所表示的图像,生成预测误差信号(S67a)。Furthermore, the subtracter 205 generates a prediction error signal by subtracting the image indicated by the prediction signal from the encoding target image ( S67 a ).

另一方面,控制部如果判别为编码对象图像是副图像(S61中否),则对开关204a进行控制将减法器205连接到变换部216,对开关204b进行控制而将补偿部215与减法器205连接,对开关204c进行控制饿将补偿部215与加法器221之间连接。On the other hand, if the control unit determines that the coding target picture is a sub picture (No in S61), it controls the switch 204a to connect the subtractor 205 to the conversion unit 216, controls the switch 204b to connect the compensation unit 215 and the subtractor 205 is connected, and the switch 204c is controlled to connect the compensating part 215 and the adder 221.

接着,块大小决定部210b根据该编码对象图像的模糊量,决定进行视差检测时的块大小(S64c)。首先,从模糊处理部202取得编码对象图像区域的模糊量,判断是否比阈值大(S221)。如果判断为比阈值大,则向块分割部212b输出将由检测部214搜索视差矢量的块单位限制为16×16的较大的块大小的块大小信息(S222)。Next, the block size determination unit 210 b determines a block size for performing parallax detection based on the blur amount of the encoding target image ( S64 c ). First, the blurring amount of the encoding target image region is acquired from the blurring processing unit 202 , and it is judged whether it is larger than a threshold ( S221 ). If it is judged to be larger than the threshold, block size information that limits the block unit for searching for a disparity vector by the detection unit 214 to a larger block size of 16×16 is output to the block division unit 212 b ( S222 ).

相反,如果判断为比阈值小,则向块分割部212b输出除了16×16以外还包括8×8的较小的块大小在内的块大小信息(S223)。Conversely, if it is judged to be smaller than the threshold, block size information including a smaller block size of 8×8 in addition to 16×16 is output to the block division unit 212 b ( S223 ).

块分割部212b基于从块大小决定部210b输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小进行分割(S65c)。The block division unit 212b divides the encoding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determination unit 210b (S65c).

接着,检测部214针对该编码对象图像以从块分割部212b接受的块大小搜索相同或类似的块,检测视差矢量。此时,输出最类似的视差矢量(S663)。Next, the detection unit 214 searches for the same or similar block with the block size received from the block division unit 212b in the encoding target image, and detects a disparity vector. At this time, the most similar disparity vector is output ( S663 ).

在视差矢量中,在从块分割部212b接受到被限制为16×16的块大小的块信息的情况下,对于编码对象图像的周围32×32的区域,仅以16×16的块大小进行相同或类似的块的搜索。In the disparity vector, when the block information limited to the block size of 16×16 is received from the block division unit 212b, only the block size of 16×16 is performed for the area of 32×32 around the encoding target image. Search for identical or similar blocks.

另一方面,在接受到16×16和8×8的两种块大小信息的情况下,对于编码对象图像的周围32×32的区域,以16×16和8×8的两种块大小进行相同或类似的块的搜索。然后,将最类似的视差矢量向补偿部215输出。On the other hand, when two types of block size information of 16×16 and 8×8 are received, for the surrounding 32×32 area of the encoding target image, two kinds of block sizes of 16×16 and 8×8 are performed. Search for identical or similar blocks. Then, the most similar disparity vector is output to the compensation unit 215 .

进而,补偿部215使用该检测到的视差矢量进行视差补偿,由此生成针对编码对象图像的块的预测信号(S664)。Furthermore, the compensation unit 215 performs parallax compensation using the detected parallax vector, thereby generating a prediction signal for a block of the encoding target image ( S664 ).

此外,减法器205通过从编码对象图像减去预测信号所表示的图像,生成预测误差信号(S67c)。Also, the subtracter 205 generates a prediction error signal by subtracting the image indicated by the prediction signal from the encoding target image ( S67 c ).

接着,开关204a将所生成的预测残差信号向变换部216输出(S70)。Next, the switch 204 a outputs the generated prediction residual signal to the conversion unit 216 ( S70 ).

这里,有时生成多个预测残差信号。例如,在编码对象图像是副图像、且为P图片的情况下,由于是副图像,所以生成基于视差补偿的预测残差信号(S67c),由于是P图片,所以生成基于运动补偿的预测残差信号(S67b),由于能够进行帧内编码,所以生成基于帧内编码的预测残差信号(S67a),结果,共计生成3个预测残差信号。在此情况下,将生成的多个预测残差信号之中最小的预测残差信号向变换部216传递。Here, a plurality of prediction residual signals may be generated. For example, when the encoding target image is a sub-picture and is a P picture, since it is a sub-picture, a prediction residual signal based on parallax compensation is generated (S67c), and since it is a P picture, a prediction residual signal based on motion compensation is generated. Since the difference signal ( S67 b ) can be intra-coded, a prediction residual signal by intra coding is generated ( S67 a ), and as a result, a total of three prediction residual signals are generated. In this case, the smallest prediction residual signal among the plurality of generated prediction residual signals is passed to the conversion unit 216 .

相反,有时完全不生成预测残差信号。例如,在编码对象图像是主图像的I图片的情况下,由于帧内预测、运动补偿预测、视差补偿预测的任何一种都不进行,所以一个预测残差信号也不生成。在此情况下,不进行预测残差信号选择,开关204a将从选择器203输出的主图像数据的编码对象图像向变换部216输出。In contrast, sometimes no prediction residual signal is generated at all. For example, when the encoding target image is an I picture of the main image, none of intra prediction, motion compensation prediction, and parallax compensation prediction is performed, and therefore no prediction residual signal is generated. In this case, the switch 204 a outputs the encoding target image of the main image data output from the selector 203 to the conversion unit 216 without performing selection of the prediction residual signal.

然后,变换部216通过对开关204a所输出的编码对象图像或预测残差信号进行正交变换而生成频率系数(S80)。Next, the transformation unit 216 generates frequency coefficients by performing orthogonal transformation on the encoding target image or the prediction residual signal output from the switch 204 a ( S80 ).

量化部217通过将该频率系数量化而生成量化值(S90),可变长编码部218将该量化值进行可变长编码(S100)。The quantization unit 217 quantizes the frequency coefficient to generate a quantized value ( S90 ), and the variable-length coding unit 218 performs variable-length coding on the quantized value ( S100 ).

<总结><Summary>

这样,在本实施方式中,在编码时的块大小决定中,不仅使用基于视差信息的距离信息及焦点信息,而且使用通过还利用了任意的模糊参数的模糊处理附加的模糊信息,来对任意的模糊状况都能够进行块大小的决定。In this way, in this embodiment, in determining the block size at the time of encoding, not only distance information and focus information based on disparity information but also blur information added by blur processing using arbitrary blur parameters are used to determine any The ambiguity situation can make the block size decision.

由此,在能够从多个候选中决定块大小的编码中,模糊量越大的区域限制为越大的块大小,所以能够提高信息量较少的模糊量较大的区域的压缩率。Thus, in encoding capable of determining a block size from a plurality of candidates, a region with a larger amount of blur is limited to a larger block size, so that the compression ratio of a region with a small amount of information and a large amount of blur can be improved.

此外,在本实施方式中,能够对任意的模糊状况进行可变块大小的决定后进行使用了帧内预测的编码。In addition, in this embodiment, it is possible to perform encoding using intra prediction after determining a variable block size for any blurring situation.

由此,在利用同一画面内的块间的相关来提高压缩率的基于帧内预测的编码中,在模糊量被设定得较大的区域中,判断为通过较强的模糊处理而高频成分降低的平坦的图像,并限制为较大的预测块大小来进行预测,从而减少帧内预测中的预测残差较小的参照块的搜索处理量,能够进行处理的高速化及节电化。此外,相反,模糊量较小或不模糊的区域中,利用将较小的块也包括在内的块进行预测,以便即使存在复杂的图像也没有问题。这样,平坦的图像及复杂的图像都能够高效率地预测。Thus, in encoding based on intra prediction that improves the compression rate by utilizing the correlation between blocks in the same screen, it is determined that the high-frequency Flat images with reduced components, and limited to a large prediction block size for prediction, thereby reducing the amount of search processing for reference blocks with small prediction residuals in intra prediction, enabling faster processing and power saving . Also, conversely, in areas where the amount of blur is small or not blurred, prediction is performed using blocks including smaller blocks, so that there is no problem even if there is a complex image. In this way, both flat images and complex images can be efficiently predicted.

进而,在本实施方式中,能够对任意的模糊状况进行可变块大小的决定后,进行使用了基于运动补偿预测或视差补偿预测的帧间预测的编码。Furthermore, in the present embodiment, it is possible to perform encoding using inter-frame prediction based on motion compensation prediction or parallax compensation prediction after determining a variable block size for an arbitrary blur state.

由此,在利用多个帧间的块间的相关来提高压缩率的基于帧间预测的编码中,在模糊量被设定得较大的区域中判断为通过较强的模糊处理而高频成分降低的平坦的图像,并以较大的块单位进行预测,从而减少帧间预测中的预测残差较小的参照块的搜索处理量,能够进行处理的高速化及节电化。相反,模糊量较小或不模糊的区域中,利用将较小的块也包括在内的块进行预测,以便即使存在复杂的图像也没有问题。这样,平坦的图像及复杂的图像都能够高效率地预测。进而,在帧间预测中的参照块的搜索处理中,将多个画面存储到存储器中并对其进行参照,所以通过限制为较大的块单位的预测,能够减少数据访问次数或数据转送量,能够进行存储器带宽节省化。As a result, in inter-frame prediction-based encoding that improves the compression rate by utilizing inter-block correlations between multiple frames, it is determined that high-frequency A flat image with reduced components is predicted in units of larger blocks, thereby reducing the amount of search processing for reference blocks with small prediction residuals in inter prediction, and enabling faster processing and power saving. Conversely, in an area where the amount of blur is small or not blurred, prediction is performed using blocks including small blocks, so that there is no problem even if there is a complex image. In this way, both flat images and complex images can be efficiently predicted. Furthermore, in the search process of the reference block in the inter prediction, a plurality of pictures are stored in the memory and referred to, so the number of times of data access and the amount of data transfer can be reduced by limiting the prediction to a larger block unit. , it is possible to save memory bandwidth.

(变形例1)(Modification 1)

在上述实施方式中,图像编码装置200根据主图像和副图像生成视差信息,对主图像和副图像分别附加模糊并进行了编码,但也可以取得单一的图像、和该图像的每个像素单位的距离信息,附加模糊并进行编码。In the above-mentioned embodiment, the image encoding device 200 generates parallax information from the main image and the sub-image, adds blurring to the main image and the sub-image respectively, and encodes them. The distance information of , append blur and encode it.

在图9中表示本变形例的图像编码装置500。在图9中,对于与图1相同的构成要素使用相同的符号,省略说明。FIG. 9 shows an image coding device 500 according to this modification. In FIG. 9 , the same reference numerals are used for the same constituent elements as those in FIG. 1 , and description thereof will be omitted.

在图9中,摄影图像编码系统在将被摄体摄影的同时取得被摄体与系统的距离信息,将使用距离信息赋予了模糊的图像信号编码。这样的摄影图像编码系统具备本变形例的图像编码装置500、照相机100、距离取得单元110和模糊参数输入部300。In FIG. 9 , the photographed image encoding system acquires distance information between the subject and the system while photographing the subject, and encodes an image signal blurred using the distance information. Such a captured image coding system includes the image coding device 500 of this modified example, the camera 100 , the distance acquiring unit 110 , and the blur parameter input unit 300 .

<距离取得单元110><Distance acquisition unit 110>

距离取得单元110测定从照相机100输入的图像上的各像素的照相机与被摄体的距离。距离的检测通过送出超声波或毫米波等、测定来自被摄体的反射波到达为止的时间及相位差等来进行。The distance acquiring section 110 measures the distance between the camera and the subject for each pixel on the image input from the camera 100 . The detection of the distance is performed by sending out ultrasonic waves or millimeter waves, etc., and measuring the time and phase difference until the reflection wave from the object arrives.

<图像编码装置500><Image encoding device 500>

图像编码装置500使用从距离取得单元110输出的距离信息对从照相机100输出的图像信号赋予模糊而编码,由此生成编码图像信号并输出。The image encoding device 500 uses the distance information output from the distance obtaining section 110 to blur and encode the image signal output from the camera 100 , thereby generating and outputting an encoded image signal.

这样的图像编码装置500具备图像取得部206、视差取得部501、模糊处理部202、选择器203、开关204a、204b及204c、减法器205、块大小决定部210a及210b、块分割部212a及212b、帧内预测部213、检测部214、补偿部215、变换部216、量化部217、可变长编码部218、逆量化部219、逆变换部220、及加法器221。Such an image encoding device 500 includes an image acquisition unit 206, a parallax acquisition unit 501, a blur processing unit 202, a selector 203, switches 204a, 204b, and 204c, a subtractor 205, block size determination units 210a and 210b, a block division unit 212a and 212b, intra prediction unit 213, detection unit 214, compensation unit 215, transformation unit 216, quantization unit 217, variable length coding unit 218, inverse quantization unit 219, inverse transformation unit 220, and adder 221.

<视差取得部501><parallax acquisition unit 501>

视差取得部501不包括视差检测部201,从距离取得单元110取得视差或距离信息,向模糊处理部202输出视差或距离信息。在本实施方式中,视差取得部501从距离取得单元110取得从照相机100输入的图像上的各像素的照相机与被摄体的距离。The parallax acquisition unit 501 does not include the parallax detection unit 201 , acquires parallax or distance information from the distance acquisition unit 110 , and outputs the parallax or distance information to the blur processing unit 202 . In the present embodiment, the parallax acquisition unit 501 acquires the distance between the camera and the subject for each pixel on the image input from the camera 100 from the distance acquisition section 110 .

<动作><action>

图像编码装置500的动作除了不进行视差的检测而使用输入的距离信息进行模糊量的计算、以及模糊和编码的对象是单一的图像以外,与上述实施方式是同样的,所以原样使用图4的流程图,仅对不同点进行说明。The operation of the image encoding device 500 is the same as that of the above-mentioned embodiment, except that the blur amount is calculated using the input distance information instead of detecting the parallax, and the object of blurring and encoding is a single image, so the operation in FIG. 4 is used as it is. Flowchart, only the differences are explained.

图像取得部206从照相机100取得图像信号(S20)。受理的图像信号是单一视点的影像信号。The image acquisition unit 206 acquires an image signal from the camera 100 ( S20 ). The accepted video signal is a video signal of a single viewpoint.

视差取得部501从距离取得单元110取得图像信号的每个像素单位的距离信息,向模糊处理部202输出(S30)。The parallax acquisition unit 501 acquires distance information per pixel of the image signal from the distance acquisition unit 110 , and outputs it to the blur processing unit 202 ( S30 ).

图像编码装置500选择图像取得部206受理的图像信号作为编码对象图像(S40)。The image encoding device 500 selects the image signal received by the image acquisition unit 206 as an encoding target image ( S40 ).

模糊处理部202使用图像信号的每个像素单位的距离信息进行模糊量的计算,对编码对象图像附加模糊的附加(S50)。此时,由于模糊处理部202从视差取得部501得到了距离信息,所以不进行使用模糊参数根据视差计算距离信息的处理,而从视差取得部501原样使用距离信息计算模糊量。The blur processing unit 202 calculates the amount of blur using the distance information per pixel of the image signal, and adds blur to the encoding target image ( S50 ). At this time, since the blur processing unit 202 has obtained the distance information from the parallax acquisition unit 501 , the blur amount is calculated using the distance information from the parallax acquisition unit 501 without performing a process of calculating the distance information from the parallax using blur parameters.

关于以下的编码的处理,除了将不存在副图像的单一的图像编码以外,与S60~S100的动作是同样的,所以省略说明。The following coding process is the same as the operations in S60 to S100 except that a single picture without sub-pictures is coded, and thus description thereof will be omitted.

这样,在本变形例中,能够对被摄体的距离是已知的单一的图像,使用通过利用任意的模糊参数和距离的模糊处理附加的模糊信息来选择块大小并进行编码。In this manner, in this modified example, it is possible to select a block size and encode a single image whose distance to a subject is known, using blur information added by blur processing using an arbitrary blur parameter and distance.

另外,在本变形例中,视差取得部501从距离取得单元110取得距离信息向模糊处理部202输出,但视差取得部501也可以受理视差图像等视差值本身的输入。在此情况下,视差取得部501既可以将所取得的视差向模糊处理部202输出,也可以使用模糊参数变换为距离信息、将距离信息向模糊处理部202输出。此外,同样,视差取得部501也可以得到距离信息,使用模糊参数将距离信息变换为视差,将视差向模糊处理部202输出。In addition, in this modified example, the parallax acquisition unit 501 acquires distance information from the distance acquisition unit 110 and outputs it to the blur processing unit 202 , but the parallax acquisition unit 501 may accept input of the parallax value itself such as a parallax image. In this case, the parallax acquisition unit 501 may output the acquired parallax to the blur processing unit 202 , or may convert the distance information into distance information using a blur parameter and output the distance information to the blur processing unit 202 . In addition, similarly, the parallax acquisition unit 501 may obtain distance information, convert the distance information into a parallax using a blur parameter, and output the parallax to the blur processing unit 202 .

(变形例2)(Modification 2)

在上述实施方式中,图像编码装置200对由主图像和副图像构成的立体影像信号附加模糊并进行了编码,但也可以仅对主图像或副图像中的一方附加模糊并进行编码。In the above-described embodiment, the image encoding device 200 encoded the stereoscopic video signal composed of the main image and the sub image by adding blur, but it may also add blur and encode only one of the main image or the sub image.

在此情况下,例如在模糊参数中包含表示对主图像和副图像中的哪一个附加模糊来编码的信息,在S40中基于该信息选择作为编码的对象的图像,从而能够仅对作为编码的对象的图像进行模糊处理和编码处理。或者,在仅对主图像附加模糊来编码的情况下,也可以不将照相机100b的图像信号向图像取得部206或模糊处理部202输入,而仅向视差检测部201输入。In this case, for example, the blur parameter includes information indicating which of the main image and the sub image is to be encoded with blurring, and in S40 based on this information, the image to be encoded can be selected, so that only the image to be encoded can be selected. The image of the object is blurred and encoded. Alternatively, when only the main image is blurred and encoded, the image signal from the camera 100 b may be input only to the parallax detection unit 201 without being input to the image acquisition unit 206 or the blur processing unit 202 .

在本变形例中,由于附加模糊来编码的图像是单一的,所以模糊处理部202仅对作为编码的对象的图像进行模糊处理,将单一的模糊图像数据向选择器203输出。模糊处理及编码的动作与上述变形例1是同样的,所以省略说明。In this modified example, since there is a single image to be encoded by adding blur, the blur processing unit 202 performs blur processing only on an image to be encoded, and outputs single blur image data to the selector 203 . The blurring and encoding operations are the same as those in Modification 1 described above, so descriptions thereof are omitted.

(实施方式2)(Embodiment 2)

图10是本发明的实施方式2的图像编码装置600的模块图。在图10中,对于与图1相同的构成要素使用相同的符号,省略说明。FIG. 10 is a block diagram of an image encoding device 600 according to Embodiment 2 of the present invention. In FIG. 10 , the same reference numerals are used for the same constituent elements as those in FIG. 1 , and description thereof will be omitted.

本实施方式的图像编码装置600的特征在于,在对任意的模糊状况进行可变块大小的决定后,进行使用了正交变换的编码,该正交变换进行向频率成分的变换。The image coding device 600 of the present embodiment is characterized in that, after determining a variable block size for an arbitrary blur state, coding is performed using an orthogonal transform for converting to a frequency component.

在图10中,立体摄影编码系统以能够立体视的方式摄影被摄体,将通过摄影生成的立体影像信号编码。这样的立体摄影编码系统具备实施方式2的图像编码装置600、受理有视差的主图像及副图像的输入的照相机100a及100b和模糊参数输入部300。In FIG. 10 , the stereoscopic imaging coding system photographs a subject so that stereoscopic viewing is possible, and encodes a stereoscopic video signal generated by imaging. Such a stereoscopic encoding system includes the image encoding device 600 according to Embodiment 2, cameras 100 a and 100 b that receive input of parallaxed main images and sub images, and a blur parameter input unit 300 .

<图像编码装置600><Image coding device 600>

图像编码装置600使用从视差检测部201输出的视差对从照相机100a及100b输出的立体影像信号附加模糊而编码,从而生成编码影像信号并输出。此外,图像编码装置600在将包含在立体影像信号中的两个影像信号编码时,作为静止图像或运动图像编码。The image encoding device 600 adds blur to the stereoscopic video signals output from the cameras 100 a and 100 b using the parallax output from the parallax detection unit 201 , and encodes them to generate and output encoded video signals. In addition, when the image encoding device 600 encodes two video signals included in the stereoscopic video signal, it encodes them as still images or moving images.

这样的图像编码装置600具备图像取得部206、视差取得部207、模糊处理部202、选择器203、块大小决定部610、块分割部611、变换部216、量化部217及可变长编码部218。Such an image encoding device 600 includes an image acquisition unit 206, a parallax acquisition unit 207, a blur processing unit 202, a selector 203, a block size determination unit 610, a block division unit 611, a conversion unit 216, a quantization unit 217, and a variable length coding unit. 218.

另外,在本实施方式中,作为编码方式,使用采用作为正交变换的离散小波变换的静止图像格式JPEG2000、运动图像格式MotionJPEG2000。In addition, in the present embodiment, the still image format JPEG2000 and the moving image format MotionJPEG2000 using discrete wavelet transform which is an orthogonal transform are used as encoding methods.

<块大小决定部610><block size determination unit 610>

块大小决定部610对于编码对象图像,从模糊处理部202取得编码对象图像区域的模糊量,与阈值比较。The block size determination unit 610 obtains the blurring amount of the encoding target image region from the blur processing unit 202 for the encoding target image, and compares it with a threshold.

在本实施方式中,块大小使用16×16、8×8这两种中的一种,将阈值设为8像素。In this embodiment, one of 16×16 and 8×8 is used as the block size, and the threshold is set to 8 pixels.

在模糊量比阈值大的情况下,向块分割部611输出将由变换部216进行正交变换的块单位限制为16×16的较大的块大小的块大小信息。When the amount of blur is larger than the threshold value, block size information that limits the block unit to be orthogonally transformed by the transformation unit 216 to a larger block size of 16×16 is output to the block division unit 611 .

相反,在比阈值小的情况下,向块分割部611输出限制为8×8的较小的块大小的块大小信息。On the contrary, when it is smaller than the threshold value, block size information limited to a small block size of 8×8 is output to the block division unit 611 .

<块分割部611><block division unit 611>

块分割部611基于从块大小决定部610输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小进行分割。The block dividing unit 611 divides the encoding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determining unit 610 .

在本实施方式中,在限制为16×16的块大小信息的情况下,仅以16×16的大小将编码对象图像分割,将分割图像向变换部216输出。In the present embodiment, when the block size information is limited to 16×16, the encoding target image is divided only in the size of 16×16, and the divided image is output to the conversion unit 216 .

另一方面,在接受到限制为8×8的块大小信息的情况下,仅以8×8的大小将编码对象图像分割,将分割图像向变换部216输出。On the other hand, when the block size information limited to 8×8 is received, the encoding target image is divided into only the size of 8×8, and the divided image is output to the conversion unit 216 .

<动作><action>

图11、图12是表示本实施方式的图像编码装置600的动作的流程图。11 and 12 are flowcharts showing the operation of the image coding device 600 according to this embodiment.

在图11中,对于与图4相同的动作使用相同的符号,省略说明。In FIG. 11 , the same symbols are used for the same operations as those in FIG. 4 , and explanations thereof are omitted.

块大小决定部610根据该编码对象图像的模糊量决定进行正交变换时的块大小的决定(S310)。首先,从模糊处理部202取得编码对象图像区域的模糊量,判断是否比阈值大(S311)。如果判断为比阈值大,则向块大小信息块分割部611输出将由变换部216进行正交变换的块单位限制为16×16的较大的块大小(S312)。The block size determination unit 610 determines a block size for performing orthogonal transformation based on the blur amount of the encoding target image ( S310 ). First, the blurring amount of the encoding target image region is acquired from the blurring processing unit 202 , and it is judged whether it is larger than a threshold ( S311 ). If it is judged to be larger than the threshold value, the block size information block division unit 611 outputs a large block size that limits the block unit to be orthogonally transformed by the transformation unit 216 to 16×16 ( S312 ).

相反,如果判断为比阈值小,则向块分割部611输出限制为8×8的较小的块大小的块大小信息(S313)。On the contrary, if it is judged to be smaller than the threshold, block size information limited to a smaller block size of 8×8 is output to the block dividing unit 611 ( S313 ).

块分割部611基于从块大小决定部610输出的块大小信息,将从选择器203输出的编码对象图像按照块大小信息的大小进行分割(S320)。The block division unit 611 divides the encoding target image output from the selector 203 according to the size of the block size information based on the block size information output from the block size determination unit 610 ( S320 ).

<总结><Summary>

这样,在本实施方式中,在用来进行编码时的正交变换的块大小的决定中,使用通过利用了任意的模糊参数的模糊处理附加的模糊信息。由此,能够对任意的模糊状况进行正交变换的块大小的决定。As described above, in this embodiment, blur information added by blur processing using an arbitrary blur parameter is used to determine a block size for performing orthogonal transform at the time of encoding. Accordingly, it is possible to determine the block size of the orthogonal transform for any blurring situation.

此外,在模糊量较大的区域中,由于通过较强的模糊处理降低了高频成分,所以通过将块大小限制得较大,能够实现高压缩化。In addition, in an area with a large amount of blurring, high-frequency components are reduced by strong blurring, so by limiting the block size to a large size, high compression can be achieved.

另外,对于实施方式2的图像编码装置600,也能够进行与实施方式1的变形例1或变形例2同样的变形。变形例的动作除了在实施方式1的变形例中说明的S10~40的差异、以及模糊和编码的对象为单一的图像信号以外,与实施方式2是同样的。In addition, the same modification as Modification 1 or Modification 2 of Embodiment 1 can also be performed on the image coding device 600 of Embodiment 2. The operation of the modified example is the same as that of the second embodiment except for the differences in S10 to 40 described in the modified example of the first embodiment, and the object of blurring and coding is a single image signal.

(实施方式3)(Embodiment 3)

图13是本发明的实施方式3的图像编码装置700的模块图。在图13中,对于与图1、图9相同的构成要素使用相同的符号并省略说明。FIG. 13 is a block diagram of an image encoding device 700 according to Embodiment 3 of the present invention. In FIG. 13 , the same reference numerals are used for the same components as those in FIGS. 1 and 9 , and explanations thereof are omitted.

本实施方式的图像编码装置700的特征在于,根据一个图像和对应于该图像的被摄体的距离信息,生成能够立体视的两个图像,使用被摄体的距离信息附加任意的模糊而进行编码。The image encoding device 700 of the present embodiment is characterized in that it generates two images that can be viewed stereoscopically based on one image and the distance information of the subject corresponding to the image, and adds an arbitrary blur using the distance information of the subject. coding.

在图13中,立体影像编码系统在摄影被摄体的同时,取得被摄体的距离信息,基于距离信息,从通过摄影生成的图像生成立体影像信号并编码。这样的立体影像编码系统具备实施方式3的图像编码装置700、受理图像的输入的照相机100、距离取得单元110、模糊参数输入部300和存储部400。In FIG. 13 , the stereoscopic video encoding system acquires distance information of the subject while photographing the subject, and generates and encodes a stereoscopic video signal from an image generated by photographing based on the distance information. Such a stereoscopic video coding system includes the image coding device 700 according to Embodiment 3, the camera 100 that accepts image input, the distance acquisition unit 110 , the blur parameter input unit 300 , and the storage unit 400 .

<图像编码装置700><Image coding device 700>

图像编码装置700具备视差取得部501、图像取得部701、模糊处理部202、选择器203、开关204a、204b及204c、减法器205、块大小决定部210a及210b、块分割部212a及212b、帧内预测部213、检测部214、补偿部215、变换部216、量化部217、可变长编码部218、逆量化部219、逆变换部220及加法器221。此外、图像取得部206具备立体图像生成部701。The image encoding device 700 includes a parallax acquisition unit 501, an image acquisition unit 701, a blur processing unit 202, a selector 203, switches 204a, 204b, and 204c, a subtractor 205, block size determination units 210a and 210b, block division units 212a and 212b, An intra prediction unit 213 , a detection unit 214 , a compensation unit 215 , a transformation unit 216 , a quantization unit 217 , a variable length coding unit 218 , an inverse quantization unit 219 , an inverse transformation unit 220 , and an adder 221 . Furthermore, the image acquisition unit 206 includes a stereoscopic image generation unit 701 .

<模糊参数输入部300><Fuzzy parameter input part 300>

模糊参数输入部300是进行立体图像生成参数和模糊参数的输入的用户接口,该立体图像生成参数用于根据由照相机100摄影的图像生成立体图像,该模糊参数用于对所生成的立体影像信号附加。The blur parameter input unit 300 is a user interface for inputting a stereoscopic image generation parameter for generating a stereoscopic image from an image captured by the camera 100 and a blur parameter for controlling the generated stereoscopic video signal. attach.

输入的参数如下所述。作为立体图像生成参数,除了照相机100的像素大小m和焦点距离fp以外,还输入为了拍摄立体图像而设想的两个照相机间的基线长l、视差调整量Sr和权重系数Wr。作为模糊参数,输入被摄体前方或后方的位置处的模糊的调整量Sn、Sf和被摄体前方及后方的各权重系数Wn、Wf、被摄体的焦点位置信息P、与实际的摄影透镜的信息不同的透镜信息、即假想的焦点距离fv和光圈值(F值)。The parameters entered are described below. As stereoscopic image generation parameters, in addition to the pixel size m and focal length fp of the camera 100, the base line length l between the two cameras assumed to capture a stereoscopic image, the parallax adjustment amount Sr, and the weighting coefficient Wr are input . As blur parameters, blur adjustment amounts S n , S f at positions in front of or behind the subject, weight coefficients W n , W f in front of and behind the subject, focus position information P of the subject, Lens information different from the information of the actual imaging lens, that is, a virtual focal length f v and an aperture value (F number).

另外,视差调整量Sr和权重系数Wr是使被摄体整体的距离、和被摄体间的进深距离变化的系数,产生如下效果:值越大则被摄体越接近于照相机并且被摄体间的距照相机的距离的差越小,值越小则被摄体越远离照相机并且被摄体间的距照相机的距离的差越大。此外,在将视差调整量Sr设定为0且将权重系数Wr设定为1的情况下,生成设想为在从照相机100离开了照相机的基线长l的位置摄影的副图像。In addition, the parallax adjustment amount S r and the weight coefficient W r are coefficients that change the distance of the entire subject and the depth distance between the subjects, and produce the following effect: the larger the value, the closer the subject is to the camera and the subject is captured. The smaller the difference in the distance from the camera between the subjects is, the smaller the value is, the farther the subject is from the camera and the larger the difference in the distance from the camera between the subjects. In addition, when the parallax adjustment amount S r is set to 0 and the weight coefficient W r is set to 1, a sub image assumed to be captured at a position separated from the camera 100 by the base line length 1 is generated.

接受这些参数的设定,将立体图像生成参数向立体图像生成部701输出,将模糊参数向模糊处理部202输出。In response to the setting of these parameters, the stereoscopic image generation parameters are output to the stereoscopic image generation unit 701 , and the blurring parameters are output to the blurring processing unit 202 .

<图像取得部701><Image acquisition unit 701>

图像取得部701从照相机100取得图像,生成立体影像信号,向模糊处理部202输出。图像取得部701包括生成立体影像信号的立体图像生成部702。The image acquisition unit 701 acquires an image from the camera 100 , generates a stereoscopic video signal, and outputs it to the blur processing unit 202 . The image acquisition unit 701 includes a stereoscopic image generation unit 702 that generates a stereoscopic video signal.

<立体图像生成部702><Stereoscopic Image Generation Unit 702>

立体图像生成部702基于从照相机100输入的图像和从视差取得部501输入的距离信息,生成由左眼用图像和右眼用图像构成的立体影像信号。The stereoscopic image generation unit 702 generates a stereoscopic video signal including a left-eye image and a right-eye image based on the image input from the camera 100 and the distance information input from the parallax acquisition unit 501 .

对生成立体图像的方法进行说明。如在实施方式1中说明那样,如果设视差信息为d,则被摄体与照相机的距离D的关系为如数式2(图2(a)),所以视差信息d为A method of generating a stereoscopic image will be described. As described in Embodiment 1, if the parallax information is d, the relationship between the distance D between the subject and the camera is as in Equation 2 ( FIG. 2( a )), so the parallax information d is

[数式4][Formula 4]

dd == ff pp &CenterDot;&Center Dot; 11 mm &CenterDot;&Center Dot; DD.

通过对全部的被摄体进行这样的计算,求出立体图像中的每个被摄体的视差的值。By performing such calculations for all the subjects, the parallax value for each subject in the stereoscopic image is obtained.

在本实施方式中,将图像取得部701从照相机100取得的图像原样作为主图像,通过使主图像的各像素偏移利用In this embodiment, the image acquired by the image acquisition unit 701 from the camera 100 is used as the main image as it is, and the pixels of the main image are shifted to use

[数式5][Equation 5]

dr=Wr·d+Sr d r =W r ·d+S r

求出的dr而生成副图像。The obtained d r is used to generate a secondary image.

另外,根据dr的分布,有副图像上的各像素对应于主图像上的多个像素的情况、以及不存在对应的主图像上的像素的情况。在副图像上的像素对应于主图像上的多个像素的情况下,如果与对应的像素之中最接近于照相机的像素对应,则成为自然的图像。相反,关于对应的主图像上的像素不存在的空白的像素,通过将该像素的周边像素的数据复制而将空白填充,由此能够防止输出不自然的副图像。Also, depending on the distribution of d r , each pixel on the sub-image may correspond to a plurality of pixels on the main image, or there may be no corresponding pixel on the main image. When a pixel on the sub-image corresponds to a plurality of pixels on the main image, if it corresponds to a pixel closest to the camera among the corresponding pixels, it becomes a natural image. Conversely, for a blank pixel that does not exist in a pixel on the corresponding main image, by copying the data of the surrounding pixels of the pixel and filling the blank, it is possible to prevent an unnatural secondary image from being output.

立体图像生成部702将所生成的主图像和副图像向模糊处理部202输出。The stereoscopic image generating unit 702 outputs the generated main image and sub image to the blur processing unit 202 .

<动作><action>

图14是表示本实施方式的图像编码装置700的动作的流程图。FIG. 14 is a flowchart showing the operation of the image coding device 700 according to this embodiment.

在图14中,对于与图4相同的动作使用相同的符号并省略说明。In FIG. 14 , the same symbols are used for the same operations as those in FIG. 4 , and explanations thereof are omitted.

图像处理装置700在模糊参数的设定完成后,进行图像信号的取得(S20),取得与所取得的图像的各像素有关的距离信息(S410)。The image processing device 700 acquires an image signal after the setting of the blur parameter is completed ( S20 ), and acquires distance information on each pixel of the acquired image ( S410 ).

立体图像生成部702根据在S10中取得的模糊参数和在步骤S410中取得的距离信息,计算应存在于立体影像信号中的视差量。立体图像生成部702将在步骤S20中取得的图像作为主图像,进行生成对主图像附加计算出的视差量的副图像的立体图像生成(S420)。立体图像生成部702将所生成的立体图像向模糊处理部202输出。The stereoscopic image generator 702 calculates the amount of parallax that should exist in the stereoscopic video signal based on the blur parameter acquired in S10 and the distance information acquired in step S410 . The stereoscopic image generating unit 702 uses the image acquired in step S20 as a main image, and performs stereoscopic image generation for generating a sub image with the calculated parallax amount added to the main image ( S420 ). The stereoscopic image generation unit 702 outputs the generated stereoscopic image to the blurring processing unit 202 .

这样,在本实施方式中,根据一个图像和对应于该图像的被摄体的距离信息,生成能够立体视的两个图像,使用被摄体的距离信息附加任意的模糊而进行编码。由此,能够根据一个视点的图像与被摄体的距离信息生成附加了模糊的编码立体影像信号。In this way, in the present embodiment, two images capable of stereoscopic viewing are generated based on one image and distance information of a subject corresponding to the image, and encoded by adding arbitrary blur using the distance information of the subject. Thereby, it is possible to generate a blurred encoded stereoscopic video signal based on the distance information between the image of one viewpoint and the subject.

(实施方式4)(Embodiment 4)

图15是本发明的实施方式4的图像编码装置710的模块图。在图15中,对于与图13相同的构成要素使用相同的符号并省略说明。FIG. 15 is a block diagram of an image encoding device 710 according to Embodiment 4 of the present invention. In FIG. 15 , the same reference numerals are used for the same components as those in FIG. 13 , and explanations thereof are omitted.

本实施方式的图像编码装置710的特征在于,通过照相机120的缩放对两个焦点距离进行切换,从而取得摄像元件与被摄体之间的距离信息。The image encoding device 710 of the present embodiment is characterized in that the distance information between the imaging device and the object is obtained by switching between two focus distances by zooming the camera 120 .

在图15中,立体影像编码系统取得焦点距离不同的两个图像,基于两个图像的视差信息计算被摄体的距离,基于计算出的距离信息,从摄影的一个图像生成立体影像信号并编码。这样的立体影像编码系统具备实施方式4的图像编码装置710、具有缩放功能且焦点距离可变的照相机120、模糊参数输入部300和存储部400。In Fig. 15, the stereoscopic image encoding system obtains two images with different focal distances, calculates the distance of the subject based on the disparity information of the two images, and generates a stereoscopic image signal from one captured image based on the calculated distance information and encodes it. . Such a stereoscopic video encoding system includes the image encoding device 710 according to Embodiment 4, the camera 120 having a zoom function and a variable focal length, the blur parameter input unit 300 , and the storage unit 400 .

<图像编码装置710><Image encoding device 710>

图像编码装置710在视差取得部703中具备距离检测部704,距离检测部704连接在照相机120、模糊参数输入部300上。The image coding device 710 includes a distance detection unit 704 in the parallax acquisition unit 703 , and the distance detection unit 704 is connected to the camera 120 and the blur parameter input unit 300 .

<模糊参数输入部300><Fuzzy parameter input part 300>

模糊参数输入部300受理用来生成图像的焦点距离fp和用来进行距离测定的焦点距离fp'(fp'>fp)的输入。The blur parameter input unit 300 accepts input of a focal distance f p for generating an image and a focal distance f p for distance measurement (f p′ >f p ).

模糊参数输入部300将两个焦点距离信息向距离检测部704输出。The blur parameter input unit 300 outputs two pieces of focus distance information to the distance detection unit 704 .

<距离检测部704><Distance detection unit 704>

距离检测部704从模糊参数输入部300接受焦点距离fp和焦点距离fp',对于照相机120按照每一帧交替地设定焦点距离fp和焦点距离fp',测定从照相机120输入的图像上的各像素的、照相机120与被摄体的距离。距离的检测通过检测焦点距离不同的两种图像上的对应的像素的视差信息、使用三角计测的计测原理来进行。距离检测部704将测定出的距离信息向立体图像生成部702和模糊处理部202输出。The distance detecting unit 704 receives the focal distance f p and the focal distance f p' from the blur parameter input unit 300, sets the focal distance f p and the focal distance f p' alternately for each frame of the camera 120, and measures the distance input from the camera 120. The distance between the camera 120 and the subject for each pixel on the image. The detection of the distance is performed by detecting parallax information of corresponding pixels on two types of images having different focal lengths, and using a measurement principle of triangulation. The distance detection unit 704 outputs the measured distance information to the stereo image generation unit 702 and the blur processing unit 202 .

使用图15进行说明。在焦点距离fp时对应于被摄体的摄像元件上的像素与光轴的距离yp、和以光轴为基准的从摄像元件到被摄体的焦点距离fp时的方位θp的关系是Description will be made using FIG. 15 . At the focal distance f p , the distance y p between the pixel on the imaging element of the object and the optical axis, and the orientation θ p at the focal distance f p from the imaging element to the object based on the optical axis relationship is

[数式6][Formula 6]

tanthe tan &theta;&theta; pp == ythe y pp ff pp

在焦点距离fp'时对应于被摄体的摄像元件上的像素与光轴的距离yp'、和以光轴为基准的从摄像元件向被摄体的焦点距离fp'时的方位θp'的关系同样是The distance y p' between the pixel on the imaging element of the object and the optical axis at the focal distance f p ' and the orientation at the focal distance f p' from the imaging element to the object based on the optical axis The relation of θ p' is also

[数式7][Equation 7]

tanthe tan &theta;&theta; pp &prime;&prime; == ythe y pp &prime;&prime; ff pp &prime;&prime;

另一方面,如果设光轴与被摄体的距离为y、焦点距离fp'时的从焦点到被摄体的距离为z,则θp与y、z的关系是On the other hand, if the distance between the optical axis and the subject is y, and the distance from the focal point to the subject is z when the focal length f p' is, then the relationship between θ p and y, z is

[数式8][Formula 8]

tanthe tan &theta;&theta; pp == ythe y (( ff pp &prime;&prime; -- ff pp )) ++ zz

同样,θp'与y、z的关系是Similarly, the relationship between θ p' and y, z is

[数式9][Formula 9]

tanthe tan &theta;&theta; pp &prime;&prime; == ythe y zz

根据数式6~数式9,从被摄体到摄像元件的距离Z为According to Equation 6 to Equation 9, the distance Z from the subject to the imaging element is

[数式10][Formula 10]

ZZ == ff pp &prime;&prime; ++ zz == ff pp &CenterDot;&Center Dot; ff pp &prime;&prime; &CenterDot;&Center Dot; (( ythe y pp &prime;&prime; -- ythe y pp )) ff pp &CenterDot;&CenterDot; ythe y pp &prime;&prime; -- ff pp &prime;&prime; &CenterDot;&Center Dot; ythe y pp

按每个被摄体检测像素的位置yp、yp',根据得到的像素的位置yp、yp'而使用数式10,从而能够得到上述被摄体与摄像元件之间的距离Z。另外,像素的位置yp、yp'的检测例如可以通过与实施方式1的视差检测部201利用块匹配法检测视差的方法同样的方法进行。The distance Z between the subject and the imaging element can be obtained by using Equation 10 from the obtained pixel positions y p , y p′ for each subject detection pixel position y p , y p′ . In addition, the detection of the pixel positions y p and y p' can be performed, for example, by the same method as the method in which the parallax detection unit 201 in Embodiment 1 detects parallax by the block matching method.

将该得到的被摄体与摄像元件之间的距离Z向立体图像生成部702输出。The obtained distance Z between the subject and the imaging device is output to the stereoscopic image generation unit 702 .

<立体图像生成部702><Stereoscopic Image Generation Unit 702>

立体图像生成部702基于从照相机120输入的图像、和从视差取得部703输入的距离信息,生成由左眼用图像和右眼用图像构成的立体影像信号。关于动作,与实施方式3是同样的,所以省略说明。The stereoscopic image generation unit 702 generates a stereoscopic video signal composed of a left-eye image and a right-eye image based on the image input from the camera 120 and the distance information input from the parallax acquisition unit 703 . The operation is the same as that of Embodiment 3, so description thereof will be omitted.

<动作><action>

图像处理装置710在模糊参数的设定完成后,将照相机120的焦点距离设定为fp,进行图像信号的取得(S20),接着,通过进行将照相机120的焦点距离设定为fp'的图像信号的取得和所取得的2图像的视差的检测,进行基于视差值的每个被摄体的距离信息的检测(S410)。After the setting of the blur parameter is completed, the image processing device 710 sets the focal distance of the camera 120 to f p and acquires an image signal (S20), and then sets the focal distance of the camera 120 to f p' by performing The acquisition of the image signal and the detection of the parallax of the two acquired images are performed to detect the distance information for each subject based on the parallax value ( S410 ).

这样,在本实施方式中,根据一个图像和变更焦点距离而取得的另一个图像,检测被摄体的距离信息,使用检测到的被摄体的距离信息,生成能够立体视的两个图像,附加任意的模糊而进行编码。由此,能够使用具有缩放功能且焦点距离可变的一个照相机根据焦点距离不同的1视点的两个图像生成附加了模糊的编码立体影像信号。Thus, in this embodiment, the distance information of the subject is detected from one image and the other image obtained by changing the focus distance, and two images capable of stereoscopic viewing are generated using the detected distance information of the subject. Encoding is performed by adding arbitrary blurring. Thus, it is possible to generate a blurred encoded stereoscopic video signal from two images of one viewpoint with different focal distances using one camera having a zoom function and a variable focal length.

(实施方式5)(implementation mode 5)

在本实施方式中,对具备有关本发明的图像编码装置的系统进行说明。In this embodiment, a system including the image encoding device according to the present invention will be described.

图17是表示本实施方式的图像编码系统的结构的模块图。在图17中,对于与图1相同的构成要素使用相同的符号并省略说明。FIG. 17 is a block diagram showing the configuration of the image coding system according to this embodiment. In FIG. 17 , the same reference numerals are used for the same components as those in FIG. 1 , and explanations thereof are omitted.

图像编码系统具备图像编码装置200、存储部400、照相机100a、照相机100b、显示部800及外部记录装置900。The image encoding system includes an image encoding device 200 , a storage unit 400 , a camera 100 a , a camera 100 b , a display unit 800 , and an external recording device 900 .

照相机100a具备透镜101a、摄像元件102a、主控制部103a及透镜控制部104a。摄像元件102a例如由CCD(Charge Coupled Device)构成,经由透镜101a取得光信号,将该光信号变换为电信号,向主控制部103a输出。透镜控制部104a根据来自主控制部103a的控制,调整透镜101a的焦点等。主控制部103a例如由IC(Integrated Circuit)构成,取得从摄像元件102a输出的电信号,将该电信号作为影像信号向图像编码装置200输出。进而,主控制部103a通过控制摄像元件102a及透镜控制部103a,进行快门速度、增益调整及焦点调整等。The camera 100a includes a lens 101a, an imaging element 102a, a main control unit 103a, and a lens control unit 104a. The imaging element 102a is constituted by, for example, a CCD (Charge Coupled Device), acquires an optical signal through the lens 101a, converts the optical signal into an electrical signal, and outputs it to the main control unit 103a. The lens control unit 104a adjusts the focus and the like of the lens 101a under control from the main control unit 103a. The main control unit 103 a is composed of, for example, an IC (Integrated Circuit), acquires an electrical signal output from the imaging element 102 a, and outputs the electrical signal as a video signal to the image coding device 200 . Furthermore, the main control unit 103a performs shutter speed, gain adjustment, focus adjustment, and the like by controlling the imaging element 102a and the lens control unit 103a.

照相机100b具备透镜101b、摄像元件102b、主控制部103b及透镜控制部104b。照相机100b具备的这些构成要素分别与照相机100a具备的上述各构成要素相同。The camera 100b includes a lens 101b, an imaging element 102b, a main control unit 103b, and a lens control unit 104b. These constituent elements included in the camera 100 b are the same as the respective constituent elements included in the camera 100 a.

另外,主控制部103a及103b分别进行协调动作,以使照相机100a及100b的焦点及快门速度等相同。In addition, the main controllers 103a and 103b perform coordinated operations so that the focus, shutter speed, and the like of the cameras 100a and 100b are the same.

显示部800例如具备液晶显示器等,从图像编码装置200取得立体影像信号,显示该立体影像信号所表示的主图像及副图像。The display unit 800 includes, for example, a liquid crystal display or the like, acquires a stereoscopic video signal from the image coding device 200 , and displays a main image and a sub image represented by the stereoscopic video signal.

外部记录装置900构成为,例如安装BD-R(Blu-ray Disc Recordable)。并且,外部记录装置900从图像编码装置200取得编码影像信号,将该编码影像信号向安装的记录介质写入。The external recording device 900 is configured to incorporate, for example, a BD-R (Blu-ray Disc Recordable). Then, the external recording device 900 acquires the coded video signal from the image coding device 200 and writes the coded video signal to the attached recording medium.

<本实施方式的其他变形例><Other modified examples of this embodiment>

(1)在实施方式1中,作为基于块匹配法的视差的检测方法,说明了切出16×16像素的区域、求出亮度差的总和(SAD)、检索切出位置的情况,但本发明并不一定限定于该情况。例如,切出区域也可以是8×8像素,也可以使用8×16像素等纵横比不同的切出区域。或者,也可以代替亮度差的总和(SAD)而使用例如亮度差的平方和(SSD;Sum of SquaredDifference)、或正规化互相关(ZNCC;Zero-mean Normalized Cross-Correlation)。(1) In Embodiment 1, a case was described where a region of 16×16 pixels is cut out, the sum of luminance differences (SAD) is obtained, and the cutout position is searched for as a parallax detection method by the block matching method. The invention is not necessarily limited to this case. For example, the cut-out area may be 8×8 pixels, or a cut-out area with a different aspect ratio such as 8×16 pixels may be used. Alternatively, instead of the sum of luminance differences (SAD), for example, sum of squared luminance differences (SSD; Sum of Squared Difference) or normalized cross-correlation (ZNCC; Zero-mean Normalized Cross-Correlation) may be used.

或者,求出主图像与副图像间的对应位置的方法也可以不是块匹配法,例如也可以使用图形切割法。Alternatively, the method of finding the corresponding position between the main image and the sub-image may not be the block matching method, for example, a pattern cutting method may be used.

(2)在实施方式1中,作为基于块匹配法的视差的检测方法,说明了使用亮度差的情况,但本发明并不一定限定于该情况。例如,在用RGB空间表示了像素值的情况下,可以使用G值的差,在用YCbCr空间表示像素值而画面内的亮度Y大致一定的情况下,可以使用Cb值的差或Cr值的差。(2) In Embodiment 1, a case was described in which a luminance difference is used as a parallax detection method by the block matching method, but the present invention is not necessarily limited to this case. For example, when pixel values are expressed in RGB space, the difference in G value can be used, and when pixel values are expressed in YCbCr space and the brightness Y in the screen is approximately constant, the difference in Cb value or the difference in Cr value can be used. Difference.

或者,例如在用RGB空间表示了像素值的情况下,既可以对R、G、B的值分别计算SAD来使用它们的最小值或平均值,或者也可以使用加权平均值。例如,也可以将(R的SAD+2×G的SAD+B的SAD)/4作为视差值,检索视差值最小的切出位置。同样,在用YCbCr空间表示了像素值的情况下,既可以对Y、Cb、Cr分别计算SAD来使用最小值,也可以使用平均值或加权平均值。通过这样,能够利用使用了全部或一部分像素值的任意的方法检测视差。Alternatively, for example, when pixel values are expressed in RGB space, SAD may be calculated for R, G, and B values, and the minimum value or average value thereof may be used, or a weighted average value may be used. For example, (SAD of R+SAD of 2×SAD of G+SAD of B)/4 may be used as the parallax value, and the cutout position with the smallest parallax value may be searched. Similarly, when pixel values are expressed in the YCbCr space, SAD may be calculated for each of Y, Cb, and Cr to use the minimum value, or an average value or a weighted average value may be used. In this way, parallax can be detected by any method using all or a part of pixel values.

(3)在实施方式1中,说明了模糊参数输入部300从触摸面板和十字键接受模糊参数的设定,对主图像中的被摄体的位置进行指定而设定焦点位置的情况,但本发明并不一定限定于该情况。例如,模糊参数输入部300也可以是键盘或标度盘等任意的输入设备。或者,如果例如照相机100a具有自动对焦功能,则模糊参数输入部300也可以从照相机100a取得焦点位置和焦点位置信息P。(3) In Embodiment 1, a case was described in which the blur parameter input unit 300 receives the setting of the blur parameter from the touch panel and the cross key, specifies the position of the subject in the main image, and sets the focus position. The present invention is not necessarily limited to this case. For example, the fuzzy parameter input unit 300 may be any input device such as a keyboard or a dial. Alternatively, for example, if the camera 100a has an autofocus function, the blur parameter input unit 300 may acquire the focus position and focus position information P from the camera 100a.

(4)在实施方式1中,作为前方和后方的各权重系数Wn、Wf、模糊调整量Sf、Sn以外的模糊参数,举出了被摄体的焦点位置信息P、照相机100a与100b间的基线长l、焦点距离fp、像素大小m、假想的焦点距离fv和光圈值(F值),但本发明并不一定限定于该情况。例如,像素大小m也可以从照相机100a取得,基线长(l)也可以预先由图像编码装置200保持。通过这样,能够取得模糊所需要的足够的模糊参数而使用。(4) In Embodiment 1 , the focus position information P of the subject , the camera 100 a Baseline length l between 100b, focal distance fp , pixel size m, virtual focal distance fv , and aperture value (F value), but the present invention is not necessarily limited to this case. For example, the pixel size m may be acquired from the camera 100 a, and the baseline length (l) may be held in advance by the image encoding device 200 . In this way, sufficient blurring parameters necessary for blurring can be obtained and used.

或者,图像编码装置200也可以预先保持多个距焦点位置的距离与弥散圆径的对应模式,将采用某个模式进行了模糊处理的图像向用户提示,使用户选择使用哪个模式。通过这样,能够选择适合于用户的模糊来实施。Alternatively, the image encoding device 200 may also hold a plurality of corresponding modes of the distance from the focus position and the circle of confusion in advance, and present the blurred image using a certain mode to the user, and let the user choose which mode to use. In this way, it is possible to select and implement a blur suitable for the user.

(5)在实施方式1中,作为模糊参数而使用用于拍摄的光学系统的焦点距离fp和假想的焦点距离fv,并使用焦点距离fp计算了照相机与被摄体的距离D,但本发明并不一定限定于该情况。例如,在不是利用实际的距离L而是利用视差值d得到了焦点位置P的情况下,也可以不使用用于拍摄的光学系统的焦点距离fp而用假想的焦点距离fv代用。(5) In Embodiment 1, the distance D between the camera and the subject was calculated using the focal distance f p of the optical system used for shooting and the virtual focal distance f v as blur parameters, However, the present invention is not necessarily limited to this case. For example, when the focus position P is obtained using the parallax value d instead of the actual distance L, the virtual focus distance f v may be used instead of the focus distance f p of the optical system used for imaging.

在根据视差值d计算照相机与被摄体的距离D时,如果作为fp的代用而使用fv,则根据视差值计算的距离D’(以下,称作假想距离)成为实际的距离D的fv/fp倍,所以X和L成为实际值的fv/fp倍。因此,对应于视差值d的假想弥散圆直径σ’的值在数式2、数式3的各自中的右边第1项成为实际值的fp/fv倍。因此,通过预先将fv/fp算入权重系数Wn、Wf中,能够得到与视差值d对应的希望的假想弥散圆直径σ的值。此外,照相机与焦点位置P的假想距离L’也成为实际的距离L的fv/fp倍,所以全部的被摄体及焦点位置P的距照相机的假想距离成为实际的距离的fv/fp倍。因而,被摄体与焦点位置的前后关系、被摄体彼此的前后关系相对于实际的距离与假想距离成为相同的关系。When calculating the distance D between the camera and the subject from the parallax value d, if f v is used instead of f p , the distance D' (hereinafter referred to as the virtual distance) calculated from the parallax value becomes the actual distance D is f v /f p times, so X and L become f v /f p times the actual value. Therefore, the value of the imaginary circle of confusion diameter σ' corresponding to the parallax value d is f p /f v times the actual value in the first term on the right in each of Equation 2 and Equation 3. Therefore, by calculating f v /f p into the weighting coefficients W n and W f in advance, it is possible to obtain a desired value of the virtual circle of confusion diameter σ corresponding to the parallax value d. In addition, the virtual distance L' between the camera and the focal position P is also f v /f p times the actual distance L, so the virtual distances from the camera of all subjects and the focal position P are f v /f p times the actual distance f p times. Therefore, the anteroposterior relationship between the subject and the focus position, and the anteroposterior relationship between the subjects have the same relationship with respect to the actual distance and the imaginary distance.

即,除了照相机与所有点的假想距离是实际的距离的fv/fp倍、假想弥散圆径σ’的距离依存成分为fp/fv倍以外,不会发生代替fp而使用fv的影响。除此以外,如上所述,只要将权重系数Wn、Wf设为fv/fp倍,就能够抵消对σ’的影响,所以在模糊矩阵及模糊量中,能够消除代替fp而使用fv的影响。That is, except that the imaginary distance between the camera and all points is f v /f p times the actual distance, and the distance-dependent component of the imaginary circle of confusion σ' is f p /f v times, f will not be used instead of f p the influence of v . In addition, as mentioned above, as long as the weighting coefficients W n and W f are multiplied by f v /f p , the influence on σ' can be cancelled. Therefore, in the fuzzy matrix and the fuzzy amount, it is possible to eliminate the Effect of using f v .

因为以上的理由,作为fp的代用也可以使用fv。由此,不再需要使用fp,能够将模糊参数减少一个。For the above reasons, f v can also be used as a substitute for f p . Thereby, it is no longer necessary to use f p , and the blur parameter can be reduced by one.

(6)在实施方式1中,说明了在比焦点位置远的情况下用数式2计算假想弥散圆直径σ、在比焦点位置近的情况下用数式3计算假想弥散圆直径σ的情况,但本发明并不一定限定于该情况。例如,也可以将虚拟光学系统的弥散圆直径原样使用而设为(6) In Embodiment 1, the case where the imaginary circle of confusion diameter σ is calculated using Equation 2 when the focal position is farther than the focal position, and the imaginary circle of confusion diameter σ is calculated using Equation 3 when the focal position is closer, but The present invention is not necessarily limited to this case. For example, the diameter of the circle of confusion of the virtual optical system may be used as it is and set to

[数式11][Formula 11]

&sigma;&sigma; == ff vv 22 &CenterDot;&Center Dot; || Xx -- LL || Ff (( LL -- ff vv )) Xx

也可以不进行近似而仅进行调整量及权重系数的附加。It is also possible to perform only addition of an adjustment amount and a weight coefficient without performing approximation.

或者,也可以按被摄体的每个距离范围使用不同的σ的计算式。例如,如图2(c)所示,在比焦点位置远的情况下,也可以在比任意的距离X1远的情况和近的情况下使用不同的σ的计算式。Alternatively, different σ calculation formulas may be used for each distance range of the subject. For example, as shown in FIG. 2( c ), when the distance is farther than the focal point, different calculation formulas for σ may be used when the distance is farther than an arbitrary distance X1 and when it is closer.

或者,也可以不是设想理想的光学系统而附加模糊,而是使用以X为变量的任意的函数计算σ。例如,也可以如图2(d)所示,使用两个焦点位置L1、L2(L1<L2),在比焦点位置L1近的情况、比焦点位置L2远的情况、以及比焦点位置L1远比L2近的情况下使用不同的σ的计算式。通过这样,能够进行将焦点对准于距离不同的多个被摄体、使不存在于任何焦点位置上的全部被摄体模糊的处理。Alternatively, instead of imagining an ideal optical system and adding blur, σ may be calculated using an arbitrary function with X as a variable. For example, as shown in FIG. 2( d ), two focus positions L1 and L2 (L1<L2) may be used, and when the focus position is closer than the focus position L1, the focus position is farther than the focus position L2, and the focus position is farther than the focus position L1. When it is closer than L2, a different σ calculation formula is used. In this way, it is possible to focus on a plurality of subjects at different distances and to blur all subjects that do not exist at any focus position.

此外,例如也可以是,设权重系数为Wg,设调整量为Sg,对于照相机传感器的增益G,设为In addition, for example, it is also possible to set the weight coefficient as W g , set the adjustment amount as S g , and set the gain G of the camera sensor as

[数式12][Formula 12]

σ=Wg·G·|X-L|+Sg σ=W g ·G·|XL|+S g

也可以设权重系数为Wiso、设调整量为Siso,对于照相机传感器的ISO感度ISO,设为It is also possible to set the weight coefficient as W iso and the adjustment amount as S iso . For the ISO sensitivity ISO of the camera sensor, set it to

[数式13][Formula 13]

&sigma;&sigma; == WW isoiso &CenterDot;&Center Dot; loglog 22 ISOISO 100100 &CenterDot;&CenterDot; || Xx -- LL || ++ SS isoiso

通过这样,对于焦点位置,能够不附加模糊而使其显眼,对于从焦点位置离开的位置,能够附加用于将因增益、ISO感度较高而发生的噪声平滑化而使其不醒目的模糊。In this way, the focus position can be conspicuous without adding blur, and blur can be added for smoothing noise generated due to high gain and ISO sensitivity to make it inconspicuous at a position away from the focus position.

这样,能够附加任意的模糊。In this way, arbitrary blurring can be added.

(7)在实施方式1中,作为模糊矩阵,举出了如图3(a)使假想弥散圆直径σ内部的滤波系数为1、使外部的滤波系数为0的矩阵,但本发明并不一定限定于该情况。例如,也可以是如图3(b)所示越接近于中心则滤波系数越大的矩阵,也可以是使对角线的长度是假想弥散圆直径σ的正方形内部的滤波系数为1、使外部的滤波系数为0等任意的矩阵。或者,也可以根据计算出的假想弥散圆直径σ、使用σg=σ/4的高斯滤波器(7) In Embodiment 1, as the fuzzy matrix, as shown in FIG. must be limited to this case. For example, as shown in Figure 3(b), it may be a matrix in which the closer to the center, the larger the filter coefficient is, or the filter coefficient inside the square whose diagonal length is the diameter σ of the imaginary circle of confusion may be 1, such that The external filter coefficient is an arbitrary matrix such as 0. Alternatively, a Gaussian filter with σ g = σ/4 can also be used according to the calculated diameter σ of the imaginary circle of confusion

[数式14][Formula 14]

GG (( xx ,, ythe y )) == 11 22 &pi;&pi; &sigma;&sigma; gg expexp (( -- xx 22 ++ ythe y 22 22 &sigma;&sigma; gg 22 ))

生成矩阵。Generate matrix.

这些矩阵既可以能够由用户自由输入,也可以由用户从预先准备在图像编码装置200中的矩阵中选择。通过这样,能够选择适合于用户的模糊而实施。These matrices may be freely input by the user, or may be selected by the user from matrices prepared in advance in the image encoding device 200 . In this way, it is possible to select and implement a blur suitable for the user.

(8)在实施方式1中,说明了模糊量是假想弥散圆直径σ的值的情况,但本发明并不一定限定于该情况。例如在使用如图3(b)的模糊矩阵的情况下,也可以将集约了滤波系数的一定比例(这里设为68.26%)的范围的直径作为模糊量。(8) In Embodiment 1, a case was described in which the amount of blur is the value of the diameter σ of the virtual circle of confusion, but the present invention is not necessarily limited to this case. For example, in the case of using the fuzzy matrix as shown in FIG. 3( b ), the diameter of the range in which a certain proportion (here, 68.26%) of the filter coefficients is concentrated can also be used as the fuzzy amount.

此外,同样在使用如图3(b)的模糊矩阵的情况下,也可以将滤波系数的平均值作为阈值,将集约了该阈值以上的值的范围的直径作为模糊量。另外,也可以将阈值设为滤波系数的中央值、或滤波系数的最大值的一半。In addition, also in the case of using a blur matrix as shown in FIG. 3( b ), the average value of filter coefficients may be used as a threshold, and the diameter of a range of values above the threshold may be used as a blur amount. In addition, the threshold may be set to the median value of the filter coefficient or half of the maximum value of the filter coefficient.

或者,在利用使用了上述变形例(7)的数式14表示的高斯滤波器的矩阵的情况下,也可以将(σ/2)作为阈值。Alternatively, in the case of using the matrix using the Gaussian filter represented by Equation 14 of the modification (7), (σ/2) may be used as the threshold.

通过这样,能够根据矩阵的特性计算模糊量。By doing so, it is possible to calculate the amount of blur from the characteristics of the matrix.

(9)在实施方式1中,说明了模糊处理的像素单位是一个像素的情况,但本发明并不一定限定于该情况。例如,也可以由像素单位为2×2像素的4个像素构成。通过这样,能够以适合于模糊处理的单位进行处理,此外能够削减处理量。(9) In Embodiment 1, the case where the pixel unit of the blurring process is one pixel was described, but the present invention is not necessarily limited to this case. For example, it may be composed of four pixels whose pixel unit is 2×2 pixels. By doing so, it is possible to perform processing in a unit suitable for blurring processing, and to reduce the amount of processing.

(10)在实施方式1和实施方式2中,说明了块大小决定部210a、210b、610将阈值设为4像素或8像素、根据16×16和4×4、或16×16和8×8的两种块大小输出块大小信息的情况,但本发明并不一定限定于该情况。(10) In Embodiment 1 and Embodiment 2, it was described that the block size determination units 210a, 210b, and 610 set the threshold value to 4 pixels or 8 pixels, based on 16×16 and 4×4, or 16×16 and 8× 8 and two block sizes to output block size information, but the present invention is not necessarily limited to this case.

例如,阈值的像素数在将作为照相机的传感器的摄像面的对角线的长度设为H时,容许弥散圆直径为(H/N)(N是1000~1500的值),所以也可以将容许弥散圆直径(H/1300)的2倍设为阈值的像素数。For example, when the number of pixels of the threshold value is H as the length of the diagonal line of the imaging plane of the sensor of the camera, the allowable circle of confusion diameter is (H/N) (N is a value from 1000 to 1500), so it may be Allow twice the diameter of the circle of confusion (H/1300) as the threshold pixel number.

此外,也可以将既是超过没有进行近似、调整量及权重系数的附加的弥散圆直径的最大值(f2/(FL))的2倍的值、又是上述容许弥散圆直径(H/1300)的2倍以上的任意的值设为阈值的像素数。通过这样,能够根据照相机的传感器大小决定阈值的像素数,输出块大小信息。In addition, it is also possible to set a value exceeding twice the maximum value (f 2 /(FL)) of the added circle of confusion diameter without approximation, adjustment amount, and weight coefficient, and the above-mentioned allowable circle of confusion diameter (H/1300 ) above 2 times any value is set as the number of pixels to be thresholded. In this way, the number of pixels of the threshold value can be determined according to the sensor size of the camera, and the block size information can be output.

阈值的像素数并不限定于此,也可以由用户任意地设定阈值的像素数。The number of pixels of the threshold is not limited to this, and the number of pixels of the threshold may be set arbitrarily by the user.

(11)在实施方式1中,说明了块大小决定部210a将阈值设为4像素、根据16×16和4×4的两种块大小输出块大小信息的情况,但本发明并不一定限定于该情况。例如,在还能够使用8×8的块大小的情况下,也可以作为阈值而使用4像素和8像素这两个、根据16×16和8×8、4×4的3种块大小输出块大小信息。通过这样,能够使得越是模糊量大的图像区域则使块大小越大。(11) In Embodiment 1, the case where the block size determination unit 210 a sets the threshold to 4 pixels and outputs block size information based on two block sizes of 16×16 and 4×4 was described, but the present invention is not necessarily limited to in this case. For example, when a block size of 8×8 can also be used, the block can be output according to three block sizes of 16×16, 8×8, and 4×4 using two of 4 pixels and 8 pixels as thresholds. size information. By doing so, it is possible to increase the block size for an image region with a larger amount of blur.

或者,在模糊量比阈值小的情况下,也可以输出限制为最小的块大小、例如4×4的块大小信息。通过这样,对于模糊量较小的区域,不再需要对多个块大小实施帧内预测,能够削减处理量。Alternatively, when the amount of blur is smaller than the threshold, block size information limited to the smallest block size, for example, 4×4 may be output. In this way, it is no longer necessary to perform intra prediction for a plurality of block sizes for an area with a small amount of blur, and the amount of processing can be reduced.

(12)在实施方式1中,说明了块大小决定部210b将阈值设为8像素、根据16×16和8×8的两种块大小输出块大小信息的情况,但本发明并不一定限定于该情况。(12) In Embodiment 1, the case where the block size determination unit 210b sets the threshold to 8 pixels and outputs block size information based on two block sizes of 16×16 and 8×8 was described, but the present invention is not necessarily limited to in this case.

例如,还可以作为阈值而使用4像素,对于决定为8×8的块,在模糊量为4像素以下的情况下决定为4×4的子块。通过这样,能够根据模糊量而将块大小多级地变更。For example, it is also possible to use 4 pixels as the threshold, and determine a 4×4 sub-block when the amount of blur is 4 pixels or less for a block determined to be 8×8. In this way, the block size can be changed in multiple stages according to the amount of blur.

或者,在模糊量比阈值小的情况下,也可以输出限制为最小的块大小、例如8×8的块大小信息。通过这样,对于模糊量较小的区域,不再需要对多个块大小实施运动预测、视差预测,能够削减处理量。Alternatively, when the amount of blur is smaller than the threshold, block size information limited to the smallest block size, for example, 8×8 may be output. In this way, it is no longer necessary to perform motion prediction and parallax prediction for a plurality of block sizes for an area with a small amount of blur, and it is possible to reduce the amount of processing.

此外,由于在H.264的标准上还可以使用16×8、8×16的块大小,所以例如也可以将阈值设为8像素,模糊量比8像素大的像素不使用8×8、16×8、8×16的块。In addition, since block sizes of 16×8 and 8×16 can also be used in the H.264 standard, for example, the threshold value can also be set to 8 pixels, and the pixels whose blurring amount is larger than 8 pixels do not use 8×8 or 16 pixels. ×8, 8×16 blocks.

进而,例如也可以通过将阈值设定为8像素和6像素这两个,使模糊量比8像素大的像素不使用8×8、16×8、8×16的块,使模糊量比6像素大的像素不使用8×8。Furthermore, for example, by setting the threshold to both 8 pixels and 6 pixels, the pixels whose blurring amount is larger than 8 pixels do not use 8×8, 16×8, and 8×16 blocks, and the blurring amount is larger than 6 pixels. Larger pixels do not use 8×8.

(13)在实施方式1中,说明了检测部214对编码对象图像的周围32×32的区域进行相同或类似的块的搜索的情况,但本发明并不一定限定于该情况。也可以对更大的区域、例如周围64×64的区域进行相同或类似的块的搜索。通过这样,能够搜索更类似的块。(13) In Embodiment 1, a case was described in which the detection unit 214 searches for the same or similar blocks in the surrounding 32×32 area of the encoding target image, but the present invention is not necessarily limited to this case. The search for the same or similar blocks can also be performed on a larger area, for example a surrounding 64×64 area. By doing so, it is possible to search for more similar blocks.

或者,也可以对于更小的区域例如8×8的块,对周围16×16的区域进行相同或类似的块的搜索。通过这样,能够削减处理量。Alternatively, for a smaller area such as an 8x8 block, the search for the same or similar blocks may be performed in the surrounding 16x16 area. In this way, the amount of processing can be reduced.

(14)在实施方式1中,说明了运动补偿预测和视差补偿预测都是帧间预测,进行相同或类似的处理,所以共用块大小决定部210b和块分割部210b、检测部214和补偿部215进行处理的情况,但本发明并不一定限定于该情况。例如,也可以将块大小决定部210b在运动补偿预测和视差补偿预测中分开。通过这样,能够将用于块大小决定的模糊量的阈值按每个处理设定为不同的值,对于各个处理能够决定适当的块大小。(14) In Embodiment 1, it was explained that both motion compensation prediction and parallax compensation prediction are inter-frame prediction, and perform the same or similar processing, so the block size determination unit 210b, the block division unit 210b, the detection unit 214 and the compensation unit are shared. 215, but the present invention is not necessarily limited to this case. For example, the block size determination unit 210b may be divided into motion compensation prediction and parallax compensation prediction. In this way, the threshold value of the blurring amount used for block size determination can be set to a different value for each process, and an appropriate block size can be determined for each process.

(15)在实施方式1中,说明了检测部214对编码对象图像以从块分割部212b接受的块大小搜索相同或类似的块、检测视差矢量的情况,但本发明并不一定限定于该情况。例如,也可以使用视差检测部201检测到的视差信息计算视差矢量。通过这样,能够省略块搜索处理,能够削减处理量。(15) In Embodiment 1, the case where the detection unit 214 searches for the same or similar block with the block size received from the block division unit 212b in the encoding target image and detects a disparity vector has been described, but the present invention is not necessarily limited to this. Condition. For example, the parallax vector may be calculated using the parallax information detected by the parallax detection unit 201 . By doing so, it is possible to omit the block search process and reduce the amount of processing.

(16)在实施方式1中,说明了变换部216和逆变换部220分别进行DCT、iDCT的情况,但本发明并不一定限定于该情况。例如也可以是,变换部216进行离散小波变换(DWT;Discrete Wavelet Transform),逆变换部220进行逆离散小波变换。通过这样,能够利用使用了正交变换的任意的编码方式。(16) In Embodiment 1, a case was described in which the transform unit 216 and the inverse transform unit 220 respectively perform DCT and iDCT, but the present invention is not necessarily limited to this case. For example, the transform unit 216 may perform discrete wavelet transform (DWT; Discrete Wavelet Transform), and the inverse transform unit 220 may perform inverse discrete wavelet transform. In this way, any encoding method using orthogonal transform can be used.

(17)在实施方式1中,说明了图像编码装置200通过利用视差补偿预测和运动补偿预测这两个方式的H.264MVC进行编码的情况,但本发明并不一定限定于该情况。例如,也可以使用H.264或MPEG-4那样的没有视差补偿预测的编码方式。通过这样,只要是块大小不限定为1种的编码方式,就能够使用任意的编码方式。(17) In Embodiment 1, a case was described in which the image coding device 200 performs coding using H.264MVC using two methods of parallax compensation prediction and motion compensation prediction, but the present invention is not necessarily limited to this case. For example, an encoding method without parallax compensation prediction such as H.264 or MPEG-4 may be used. In this way, any encoding method can be used as long as the block size is not limited to one type of encoding method.

(18)在实施方式1的变形例1中,说明了距离取得单元110使用超声波或毫米波等测定从照相机100输入的图像上的各像素的、照相机与被摄体的距离的情况,但本发明并不一定限定于该情况。例如,也可以是,距离取得单元110取得照相机100的图像、以及与照相机100不同的视点的图像,利用视差取得距离。此外,例如,也可以是,距离取得单元110使用如在实施方式4中说明的具有两个以上的焦点距离的照相机的距离测定单元。通过这样,视差取得部501取得通过任意的方法取得的视差或距离信息,图像编码装置500能够进行模糊处理和编码。(18) In Modification 1 of Embodiment 1, a case was described in which distance obtaining section 110 measures the distance between the camera and the subject at each pixel on an image input from camera 100 using ultrasonic waves, millimeter waves, or the like. The invention is not necessarily limited to this case. For example, distance obtaining section 110 may obtain an image of camera 100 and an image of a viewpoint different from camera 100 , and obtain the distance using parallax. In addition, for example, the distance acquisition unit 110 may use a distance measurement unit of a camera having two or more focal lengths as described in the fourth embodiment. In this way, the parallax acquisition unit 501 acquires parallax or distance information acquired by an arbitrary method, and the image encoding device 500 can perform blur processing and encoding.

(19)在实施方式2中,说明了块大小决定部610将阈值设为8像素、根据16×16和8×8的两种块大小输出块大小信息的情况,但本发明并不一定限定于该情况。例如,在块大小中也可以使用4×4、32×32、8×16、64×32等任意的大小,阈值也可以根据使用的块大小而使用任意的值。(19) In Embodiment 2, the case where the block size determination unit 610 sets the threshold to 8 pixels and outputs block size information based on two block sizes of 16×16 and 8×8 was described, but the present invention is not necessarily limited to in this case. For example, arbitrary sizes such as 4×4, 32×32, 8×16, and 64×32 may be used as the block size, and arbitrary values may be used for the threshold value depending on the block size used.

或者,例如也可以是,作为阈值而使用4像素和8像素这两个,根据16×16和8×8、4×4的3种块大小输出块大小信息。通过这样,能够使得越是模糊量大的图像区域使块大小越大。Alternatively, for example, two of 4 pixels and 8 pixels may be used as thresholds, and the block size information may be output according to three block sizes of 16×16, 8×8, and 4×4. By doing so, it is possible to make the block size larger for an image region with a larger amount of blur.

(20)在实施方式2中,说明了如果是静止图像则使用JPEG2000作为编码方式,如果是运动图像则使用Motion JPEG2000作为编码方式的情况,但本发明并不一定限定于该情况。只要是容许多个块大小、使用正交变换的编码方式,则可以使用任意的编码方式。(20) In Embodiment 2, the case where JPEG2000 is used as the encoding method for still images and Motion JPEG2000 is used for moving images is described, but the present invention is not necessarily limited to this case. Any encoding method can be used as long as it allows a plurality of block sizes and uses an orthogonal transform.

(21)在实施方式3中,图像编码装置700是将图像编码装置200的照相机100a、照相机100b替换为照相机100、将视差取得部207替换为视差取得部501、将图像取得部206替换为图像取得部701的结构,但本发明并不一定限定于该情况。例如,实施方式3的图像编码装置也可以是将图像编码装置600的照相机100a、照相机100b替换为照相机100、将视差取得部207替换为视差取得部501、将图像取得部206替换为图像取得部701的结构。通过这样,对于根据一个图像和对应于该图像的被摄体的距离信息生成的立体影像信号,能够进行使用了进行向频率成分的变换的正交变换的编码。(21) In Embodiment 3, the image encoding device 700 replaces the camera 100 a and the camera 100 b of the image encoding device 200 with the camera 100 , replaces the parallax acquisition unit 207 with the parallax acquisition unit 501 , and replaces the image acquisition unit 206 with the image The structure of the acquisition unit 701, but the present invention is not necessarily limited to this case. For example, in the image encoding device of Embodiment 3, the camera 100a and camera 100b of the image encoding device 600 may be replaced by the camera 100, the parallax acquisition unit 207 may be replaced by the parallax acquisition unit 501, and the image acquisition unit 206 may be replaced by the image acquisition unit. 701 structure. In this way, it is possible to perform encoding using orthogonal transform for transforming into frequency components on a stereoscopic video signal generated from one image and distance information of a subject corresponding to the image.

此外,同样,实施方式4的图像编码装置710也可以是将图像编码装置600的照相机100a、照相机100b替换为照相机120、将视差取得部207替换为视差取得部703、将图像取得部206替换为图像取得部701的结构。In addition, similarly, in the image encoding device 710 of Embodiment 4, the camera 100a and the camera 100b of the image encoding device 600 may be replaced by the camera 120, the parallax acquisition unit 207 may be replaced by the parallax acquisition unit 703, and the image acquisition unit 206 may be replaced by The configuration of the image acquisition unit 701 .

(22)在实施方式4中,说明了用于距离检测的焦点距离fp′比用于图像生成的焦点距离fp长的情况(fp'>fp),但本发明并不一定限定于该情况。也可以是用于距离检测的焦点距离fp'比用于图像生成的焦点距离fp短的情况(fp'<fp)。通过这样,只要能够设定与用于图像生成的焦点距离fp不同的焦点距离fp',就能够根据焦点距离不同的两个图像进行距离检测。(22) In Embodiment 4, a case was described in which the focal distance f p' for distance detection is longer than the focal distance f p for image generation (f p' > f p ), but the present invention does not necessarily limit in this case. It may also be a case where the focal distance f p' for distance detection is shorter than the focal distance f p for image generation (f p' <f p ). In this way, as long as the focal distance f p ' different from the focal distance f p used for image generation can be set, distance detection can be performed from two images with different focal distances.

(23)在实施方式5中,说明了图像编码系统包括图像编码装置200的情况,但本发明并不一定限定于该情况。例如,图像编码系统也可以代替图像编码装置200而包括图像编码装置600。此外,例如,图像编码系统也可以代替照相机100a、100b和图像编码装置200而包括与照相机100及距离取得单元110连接的图像编码装置500或图像编码装置700。此外,例如,图像编码系统也可以代替照相机100a、100b和图像编码装置200而包括与照相机120连接的图像编码装置710。(23) In Embodiment 5, the case where the image coding system includes the image coding device 200 was described, but the present invention is not necessarily limited to this case. For example, the image coding system may include the image coding device 600 instead of the image coding device 200 . Also, for example, the image encoding system may include an image encoding device 500 or an image encoding device 700 connected to the camera 100 and the distance obtaining unit 110 instead of the cameras 100 a , 100 b and the image encoding device 200 . In addition, for example, the image encoding system may include an image encoding device 710 connected to the camera 120 instead of the cameras 100 a , 100 b and the image encoding device 200 .

(24)在实施方式5中,说明了显示部800从图像编码装置200取得立体影像信号、显示由该立体影像信号表示的主图像及副图像的情况,但本发明并不一定限定于该情况。例如,显示部800也可以从图像编码装置200取得局部解码图像信号,显示由该局部解码图像信号表示的主图像及副图像。通过这样,能够监视编码后的图像信号。(24) In Embodiment 5, a case was described in which the display unit 800 acquires a stereoscopic video signal from the image coding device 200 and displays the main image and sub-image represented by the stereoscopic video signal, but the present invention is not necessarily limited to this case. . For example, the display unit 800 may acquire a local decoded image signal from the image encoding device 200 and display the main image and sub image indicated by the locally decoded image signal. In this way, the encoded image signal can be monitored.

(25)在实施方式5中,说明了外部存储装置900将BD-R作为记录介质的情况,但本发明并不一定限定于该情况。例如,作为存储介质,也可以使用CD-R(Compact DiscRecordable)、MO(Magnet Optical disk)、DVD-R(Digital Versatile Disk Recordable),或者也可以使用SDHC存储卡、SDXC存储卡等半导体存储器。(25) In Embodiment 5, a case was described in which the external storage device 900 uses a BD-R as a recording medium, but the present invention is not necessarily limited to this case. For example, CD-R (Compact Disc Recordable), MO (Magnet Optical disk), DVD-R (Digital Versatile Disk Recordable), or a semiconductor memory such as an SDHC memory card or SDXC memory card may be used as the storage medium.

(26)上述的各实施方式的图像编码装置也可以典型地作为集成电路即LSI(LargeScale Integration)实现。既可以将各电路单独地作为一个芯片,也可以包括全部的电路或一部分的电路而形成一个芯片。例如,模糊处理部202既可以如图18所示集成到与其他电路部相同的集成电路中,也也可以成为不同的集成电路。(26) The image coding devices of the above-mentioned embodiments can also be realized typically as an LSI (LargeScale Integration) which is an integrated circuit. Each circuit may be used individually as one chip, or may include all or part of the circuits to form one chip. For example, the blur processing unit 202 may be integrated into the same integrated circuit as other circuit units as shown in FIG. 18 , or may be a different integrated circuit.

这里,记载为LSI,但根据集成度的差异,也有称作IC(IntegratedCircuit)、系统LSI、超级LSI、超大规模LSI的情况。Here, it is described as LSI, but depending on the degree of integration, it may be called IC (Integrated Circuit), system LSI, super LSI, or ultra-large-scale LSI.

此外,集成电路化的方法并不限于LSI,也可以通过专用电路或通用处理器实现。也可以利用在LSI制造后能够编程的FPGA(Field ProgrammableGate Array)、能够重构LSI内部的电路单元的连接及设定的可重构处理器。In addition, the method of circuit integration is not limited to LSI, and it can also be realized by a dedicated circuit or a general-purpose processor. FPGAs (Field Programmable Gate Arrays) that can be programmed after LSI manufacturing, and reconfigurable processors that can reconfigure the connection and settings of circuit cells inside the LSI can also be used.

进而,如果因半导体技术的进步或派生的其他技术出现代替LSI的集成电路化的技术,则当然也可以使用该技术进行功能模块的集成化。Furthermore, if an integrated circuit technology that replaces LSI emerges due to progress in semiconductor technology or other derivative technologies, it is of course possible to integrate functional modules using this technology.

(27)上述的各实施方式及各变形例的说明不过是本发明的例示,能够不脱离本发明的范围而进行各种改良或变形。(27) The above-mentioned descriptions of the respective embodiments and modifications are merely examples of the present invention, and various improvements and modifications can be made without departing from the scope of the present invention.

以下,对有关实施方式的图像编码装置和其集成电路、以及图像编码方法的结构及效果进行说明。Hereinafter, configurations and effects of the image encoding device, its integrated circuit, and image encoding method according to the embodiment will be described.

(a)实施方式的图像编码装置的特征在于,包括:图像取得部,取得图像;视差取得部,取得上述图像的每个像素单位的视差或每个像素单位的距离信息中的至少一方;模糊量决定部,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;模糊处理部,按照上述模糊量,对上述图像实施模糊处理;块大小决定部,根据上述模糊量,从多个块大小中决定用来从实施上述模糊处理后的各图像切出编码对象区域的块大小;以及编码部,按照上述决定的块大小,以块单位将实施上述模糊处理后的图像编码。(a) The image encoding device according to the embodiment is characterized by comprising: an image acquisition unit that acquires an image; a disparity acquisition unit that acquires at least one of disparity per pixel or distance information per pixel of the image; The amount determination unit determines the blur amount of each pixel unit of the image according to the parallax of each pixel unit or the distance information of each pixel unit; the blur processing unit performs blur processing on the image according to the blur amount; The block size determination unit determines, from a plurality of block sizes, a block size for cutting out an encoding target area from each image subjected to the blur processing, based on the blur amount; The unit will encode the image after the blurring process described above.

此外,实施方式的集成电路的特征在于,包括:图像取得部,取得图像;视差取得部,取得上述图像的每个像素单位的视差或每个像素单位的距离信息中的至少一方;模糊量决定部,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;模糊处理部,按照上述模糊量,对上述图像实施模糊处理;块大小决定部,根据上述模糊量,从多个块大小中决定用于从实施上述模糊处理后的图像切出编码对象区域的块大小;以及编码部,按照上述决定的块大小,以块单位将实施上述模糊处理后的图像编码。In addition, the integrated circuit of the embodiment is characterized in that it includes: an image acquisition unit that acquires an image; a parallax acquisition unit that acquires at least one of parallax per pixel unit or distance information per pixel unit of the image; blur amount determination a unit that determines a blur amount of each pixel unit of the image according to the parallax of each pixel unit or the distance information of each pixel unit; a blur processing unit that performs blur processing on the above image according to the blur amount; the block size The determining unit determines, from a plurality of block sizes, a block size for cutting out the encoding target region from the image subjected to the blurring process based on the blur amount; Image encoding after blurring above.

此外,实施方式的图像编码方法的特征在于,包括:图像取得步骤,取得图像;视差取得步骤,取得上述图像的每个像素单位的视差或每个像素单位的距离信息中的至少一方;模糊量决定步骤,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;模糊处理步骤,按照上述模糊量,对上述图像实施模糊处理;块大小决定步骤,根据上述模糊量,从多个块大小中决定用于从实施上述模糊处理后的图像切出编码对象区域的块大小;以及编码步骤,按照上述决定的块大小,以块单位将实施上述模糊处理后的图像编码。In addition, the image encoding method of the embodiment is characterized in that it includes: an image acquisition step of acquiring an image; a disparity acquisition step of acquiring at least one of disparity per pixel or distance information per pixel of the image; The decision step is to determine the blurring amount of each pixel unit of the above-mentioned image according to the parallax of each pixel unit or the distance information of each pixel unit; the blurring processing step is to perform blurring processing on the above-mentioned image according to the above-mentioned blurring amount; In the size determining step, a block size for cutting out an encoding target area from the image subjected to the blurring process is determined from among a plurality of block sizes based on the blurring amount; Image encoding after performing the blurring process described above.

此外,实施方式的图像编码系统,包括:用来摄影图像的照相机、将上述图像编码的图像编码装置、和用来记录通过上述图像编码装置的编码生成的图像压缩数据的记录介质,该图像编码系统的特征在于,上述图像编码装置包括:图像取得部,取得图像;视差取得部,取得上述图像的每个像素单位的视差或每个像素单位的距离信息中的至少一方;模糊量决定部,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;模糊处理部,按照上述模糊量,对上述图像实施模糊处理;块大小决定部,根据上述模糊量,从多个块大小中决定用来从实施上述模糊处理后的图像切出编码对象区域的块大小;以及编码部,按照上述决定的块大小,以块单位将实施上述模糊处理后的图像编码。In addition, the image encoding system of the embodiment includes: a camera for taking images, an image encoding device for encoding the image, and a recording medium for recording compressed image data generated by the encoding of the image encoding device. The system is characterized in that the image encoding device includes: an image acquisition unit that acquires an image; a disparity acquisition unit that acquires at least one of disparity per pixel unit or distance information per pixel unit of the image; a blur amount determination unit, Determining a blurring amount of each pixel unit of the above-mentioned image according to the parallax of each pixel unit or the distance information of each pixel unit; the blurring processing unit performs blurring processing on the above-mentioned image according to the blurring amount; the block size determination unit , according to the amount of blurring, determine a block size for cutting out the encoding target area from the image after the blurring process is performed from a plurality of block sizes; The processed image is encoded.

根据这些上述结构,在将图像编码时使用模糊量决定块大小,从而能够使用与图像的每个像素单位的模糊量相应的适当的块大小。According to these above configurations, when encoding an image, the blur amount is used to determine the block size, so that an appropriate block size corresponding to the blur amount per pixel of the image can be used.

(b)此外,实施方式的上述(a)的图像编码装置也可以是,上述模糊量由上述图像的每个像素单位的视差或每个像素单位的距离信息、以及上述图像的模糊参数决定。(b) In addition, in the image encoding device of the above (a) of the embodiment, the blur amount may be determined by parallax per pixel or distance information per pixel of the image, and a blur parameter of the image.

由此,不仅使用视差信息,还能够使用例如焦点信息、每个被摄体距离的模糊量等任意的模糊信息来进行多种模糊处理。Thereby, it is possible to perform various kinds of blurring processing using not only parallax information but also arbitrary blurring information such as focus information and blurring amount for each subject distance.

(c)此外,实施方式的上述(b)的图像编码装置也可以是,上述模糊参数包括与拍摄上述图像的光学系统的特性值不同的光学特性值。(c) In addition, in the image coding device of the above (b) of the embodiment, the blur parameter may include an optical characteristic value different from a characteristic value of an optical system that captures the image.

由此,能够使用模糊信息设定虚拟的光学系统,不限制于实际用于摄像的光学系统而制作附加了基于任意的光学系统的散景状况的图像,或者通过模糊处理制作设想为由难以实现的光学系统摄像的图像。Thereby, it is possible to set a virtual optical system using blur information, and to create an image with the bokeh state of an arbitrary optical system added without being limited to the optical system actually used for imaging, or to create an image by blur processing. The image captured by the optical system.

(d)此外,实施方式的上述(c)的图像编码装置也可以是,上述模糊参数包括一个以上的被摄体的焦点位置信息。(d) In addition, in the image coding device of the above (c) of the embodiment, the blur parameter may include focus position information of one or more subjects.

由此,能够进行使用焦点信息的模糊处理,例如还能够进行存在多个焦点等通过实际的光学系统不能实现的模糊处理。Thereby, blurring processing using focus information can be performed, for example, blurring processing that cannot be realized by an actual optical system, such as the presence of multiple focal points, can be performed.

(e)此外,实施方式的上述(a)的图像编码装置也可以是,上述块大小决定部针对上述模糊量比阈值大的像素单位,决定为多个块大小之中的不是最小块大小的块大小。(e) Furthermore, in the image coding device of the above (a) of the embodiment, the block size determination unit may determine, for a pixel unit in which the blur amount is larger than a threshold value, one of the plurality of block sizes that is not the smallest block size. block size.

由此,在能够使用两种以上的块大小的编码方式中,模糊量越大的区域,将所使用的块大小限制为越大的块大小,所以能够提高信息量较少的、模糊量较大的区域的压缩率。此外,在进行预测编码处理的情况下,不需要对比所决定的块大小小的块大小进行预测块大小的选择,能够实现处理量的进一步削减。As a result, in an encoding method that can use two or more block sizes, the block size used is limited to a larger block size for a region with a larger amount of blur. Compression ratio for large regions. In addition, when performing predictive coding processing, it is not necessary to select a predictive block size compared with the determined block size and block size, and it is possible to further reduce the amount of processing.

(f)此外,实施方式的上述(a)的图像编码装置也可以是,上述块大小决定部对于上述模糊量比阈值小的像素单位,决定为包括多个块大小中的最小的块大小在内的一个以上的块大小。(f) In addition, in the image coding device of the above (a) of the embodiment, the block size determination unit may determine, for a pixel unit in which the blur amount is smaller than a threshold value, that the smallest block size among a plurality of block sizes is included in within more than one block size.

由此,通过在模糊量较小、或没有被模糊的区域中使用将较小的块也包括在内的可变块,能够防止信息量的削减。此外,如果在进行预测编码处理的情况下决定为使用多个块大小,则在参照块被限制为较大的块大小的情况下能够使用较大的块大小高效率地进行预测编码处理。In this way, by using variable blocks including small blocks in areas where the amount of blur is small or not blurred, reduction in the amount of information can be prevented. Also, if it is determined to use a plurality of block sizes when performing predictive coding processing, predictive coding processing can be efficiently performed using a large block size when the reference block is limited to a large block size.

(g)此外,实施方式的上述(e)或上述(f)的图像编码装置也可以是,上述编码部在进行运动补偿预测、视差补偿预测或帧内预测的情况下,使用上述块大小决定部决定的各块大小进行类似块的搜索,选择一个能够得到与按上述块单位分割的图像最类似的块的块大小,生成针对所选择的块大小的残差信号。(g) In addition, in the image encoding device of the above (e) or the above (f) of the embodiment, the encoding unit may use the above block size determination when performing motion compensation prediction, parallax compensation prediction or intra prediction Similar blocks are searched for each block size determined locally, a block size that can obtain the block most similar to the image divided by the block unit is selected, and a residual signal corresponding to the selected block size is generated.

由此,在编码的过程中进行了运动预测、视差预测或帧内预测的处理的情况下,能够从所决定的可变块中决定适合于各个处理的块大小,能够使残差信号最小化,能够进行高压缩化。Thus, when motion prediction, parallax prediction, or intra-frame prediction processing is performed during encoding, a block size suitable for each processing can be determined from the determined variable blocks, and the residual signal can be minimized. , capable of high compression.

(h)此外,实施方式的上述(a)的图像编码装置也可以是,上述图像取得部取得用于立体图像显示的左眼用图像和右眼用图像;上述视差取得部包括检测上述左眼用图像的区域与上述右眼用图像的对应的区域的视差的视差检测部。(h) In addition, in the image encoding device of the above (a) of the embodiment, the image acquisition unit acquires an image for a left eye and an image for a right eye for stereoscopic image display; the parallax acquisition unit includes detecting and a parallax detection unit for disparity between an area of the image and a corresponding area of the image for the right eye.

由此,能够根据用于立体图像显示的右眼用图像和左眼用图像生成每个像素单位的视差信息,对于由右眼用图像和左眼用图像构成的立体图像能够使用所生成的视差信息进行模糊处理和使用适当的块大小的编码。In this way, parallax information for each pixel can be generated from the right-eye image and the left-eye image used for stereoscopic image display, and the generated parallax can be used for the stereoscopic image composed of the right-eye image and the left-eye image. The information is obfuscated and encoded using an appropriate block size.

(j)此外,实施方式的上述(a)的图像编码装置也可以是,上述图像取得部包括立体图像生成部,该立体图像生成部根据所取得的一个图像、和上述视差取得部取得的上述图像的视差或距离信息,生成由左眼用图像和右眼用图像构成的立体图像。(j) In addition, in the image encoding device of the above (a) of the embodiment, the image acquisition unit may include a stereoscopic image generation unit, and the stereoscopic image generation unit may be based on one acquired image and the above-mentioned The parallax and distance information of the images are used to generate a stereoscopic image composed of an image for the left eye and an image for the right eye.

由此,能够根据一个图像和该图像所涉及的被摄体的距离信息生成用于立体视的两个图像,对所生成的立体图像使用被摄体的距离信息进行模糊处理和使用适当的块大小的编码。Thus, two images for stereoscopic viewing can be generated based on one image and the distance information of the subject involved in the image, and blurring and appropriate blocks can be used for the generated stereoscopic image using the distance information of the subject. size encoding.

工业实用性Industrial Applicability

本发明涉及将图像信号编码的图像编码装置,特别是能够进行与被摄体的距离相应的适当的模糊的附加、以及与模糊量相应的块大小的决定,有利于高效率的编码和处理量的削减。The present invention relates to an image encoding device for encoding an image signal. In particular, it is possible to add appropriate blur according to the distance of a subject and determine a block size according to the amount of blur, which contributes to high-efficiency encoding and throughput. cuts.

因而,对于处理影像信号的数字视频照相机或数字静像照相机等的图像记录设备是有效的。除此以外,对于图像传送设备及图像编辑设备等也是有效的。Therefore, it is effective for image recording devices such as digital video cameras and digital still cameras that process video signals. In addition, it is also effective for image distribution equipment, image editing equipment, and the like.

符号说明Symbol Description

100、100a、100b、120 照相机100, 100a, 100b, 120 cameras

101a、101b 透镜101a, 101b lens

102a、102b 摄像元件102a, 102b imaging elements

103a、103b 主控制部103a, 103b main control unit

110 距离取得单元110 distance acquisition unit

200、500、600、700、710 图像编码装置200, 500, 600, 700, 710 image coding device

201 视差检测部201 Parallax detection unit

202 模糊处理部202 Fuzzy processing department

203 选择器203 selector

204a、204b、204c 开关204a, 204b, 204c switches

205 减法器205 Subtractor

206、701 图像取得部206, 701 Image Acquisition Department

207、501、703 视差取得部207, 501, 703 Parallax acquisition part

210a、210b、610 块大小决定部210a, 210b, 610 block size determination unit

212a、212b、611 块分割部212a, 212b, 611 block division unit

213 帧内预测部213 Intra prediction unit

214 检测部214 Inspection Department

215 补偿部215 Compensation Department

216 变换部216 Conversion Department

217 量化部217 Quantification Department

218 可变长编码部218 variable length code

219 逆量化部219 Inverse quantization part

220 逆变换部220 Inverse conversion unit

221 加法器221 adder

300 模糊参数输入部300 Fuzzy parameter input unit

400 存储部400 storage department

702 立体图像生成部702 Stereoscopic image generation department

704 距离检测部704 Distance detection unit

800 显示部800 Display

900 外部存储装置900 external storage devices

Claims (12)

1.一种图像编码装置,其特征在于,包括:1. An image coding device, characterized in that, comprising: 图像取得部,取得由照相机拍摄的图像;The image acquisition unit acquires the image captured by the camera; 视差取得部,取得上述图像的每个像素单位的视差或每个像素单位的、上述照相机与被摄体的距离信息的至少一方;a parallax acquisition unit that acquires at least one of the parallax per pixel of the image or the distance information between the camera and the object per pixel; 模糊量决定部,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;a blur amount determination unit that determines a blur amount per pixel of the image based on the parallax per pixel or the distance information per pixel; 模糊处理部,按照上述模糊量,对上述图像实施模糊处理;The blur processing unit performs blur processing on the image according to the blur amount; 块大小决定部,根据上述模糊量,从多个块大小中决定用于从实施上述模糊处理后的各图像切出编码对象区域的块大小;以及a block size determining unit that determines, from a plurality of block sizes, a block size for cutting out an encoding target region from each image subjected to the blur processing, based on the blur amount; and 编码部,按照上述决定的块大小,将实施上述模糊处理后的图像以块单位进行编码。The encoding unit encodes the image subjected to the blurring process in units of blocks according to the determined block size. 2.如权利要求1所述的图像编码装置,其特征在于,2. The image encoding device according to claim 1, wherein: 上述模糊量由上述图像的每个像素单位的视差或每个像素单位的距离信息、以及上述图像的模糊参数决定。The amount of blur is determined by the disparity per pixel of the image or the distance information per pixel of the image, and the blur parameter of the image. 3.如权利要求2所述的图像编码装置,其特征在于,3. The image encoding device according to claim 2, wherein: 上述模糊参数包括与拍摄上述图像的光学系统的特性值不同的光学特性值。The aforementioned blur parameter includes an optical characteristic value different from a characteristic value of an optical system that captures the aforementioned image. 4.如权利要求3所述的图像编码装置,其特征在于,4. The image encoding device according to claim 3, wherein: 上述模糊参数包括一个以上的被摄体的焦点位置信息。The aforementioned blur parameter includes focus position information of one or more subjects. 5.如权利要求1所述的图像编码装置,其特征在于,5. The image encoding device according to claim 1, wherein: 上述块大小决定部针对上述模糊量比阈值大的像素单位,决定为多个块大小之中的不是最小的块大小的块大小。The block size determination unit determines a block size that is not the smallest block size among the plurality of block sizes for a pixel unit in which the blur amount is larger than a threshold value. 6.如权利要求1所述的图像编码装置,其特征在于,6. The image encoding device according to claim 1, wherein: 上述块大小决定部针对上述模糊量比阈值小的像素单位,决定为包括多个块大小之中的最小的块大小在内的一个以上的块大小。The block size determination unit determines one or more block sizes including a smallest block size among a plurality of block sizes for a pixel unit in which the blur amount is smaller than a threshold value. 7.如权利要求5或6所述的图像编码装置,其特征在于,7. The image encoding device according to claim 5 or 6, wherein: 上述编码部在进行运动补偿预测、视差补偿预测或帧内预测的情况下,使用由上述块大小决定部决定的各块大小进行类似块的搜索,选择一个能够得到与按上述块单位分割的图像最类似的块的块大小,生成对应于所选择的块大小的残差信号。When performing motion compensation prediction, parallax compensation prediction, or intra-frame prediction, the encoding unit searches for similar blocks using each block size determined by the block size determination unit, and selects an image that can be obtained by dividing an image corresponding to the block unit. The block size of the most similar block, generating a residual signal corresponding to the selected block size. 8.如权利要求1所述的图像编码装置,其特征在于,8. The image encoding device according to claim 1, wherein: 上述图像取得部取得用于立体图像显示的左眼用图像和右眼用图像;The image acquisition unit acquires an image for a left eye and an image for a right eye for stereoscopic image display; 上述视差取得部包括视差检测部,该视差检测部检测上述左眼用图像的区域与上述右眼用图像的对应的区域间的视差。The parallax acquisition unit includes a parallax detection unit that detects a parallax between a region of the left-eye image and a corresponding region of the right-eye image. 9.如权利要求1所述的图像编码装置,其特征在于,9. The image encoding device according to claim 1, wherein: 上述图像取得部包括立体图像生成部,该立体图像生成部根据所取得的一个图像和由上述视差取得部取得的上述图像的视差或距离信息,生成由左眼用图像和右眼用图像构成的立体图像。The image acquisition unit includes a stereoscopic image generation unit that generates a left-eye image and a right-eye image based on the acquired one image and the parallax or distance information of the image acquired by the parallax acquisition unit. Stereoscopic image. 10.一种集成电路,其特征在于,包括:10. An integrated circuit, characterized in that, comprising: 图像取得部,取得由照相机拍摄的图像;The image acquisition unit acquires the image captured by the camera; 视差取得部,取得上述图像的每个像素单位的视差或每个像素单位的、上述照相机与被摄体的距离信息的至少一方;a parallax acquisition unit that acquires at least one of the parallax per pixel of the image or the distance information between the camera and the object per pixel; 模糊量决定部,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;a blur amount determination unit that determines a blur amount per pixel of the image based on the parallax per pixel or the distance information per pixel; 模糊处理部,按照上述模糊量,对上述图像实施模糊处理;The blur processing unit performs blur processing on the image according to the blur amount; 块大小决定部,根据上述模糊量,从多个块大小中决定用于从实施上述模糊处理后的图像切出编码对象区域的块大小;以及a block size determining unit that determines, from among a plurality of block sizes, a block size for cutting out an encoding target region from the blurred image based on the amount of blur; and 编码部,按照上述决定的块大小,将实施上述模糊处理后的图像以块单位进行编码。The encoding unit encodes the image subjected to the blurring process in units of blocks according to the determined block size. 11.一种图像编码方法,其特征在于,包括:11. An image encoding method, comprising: 图像取得步骤,取得由照相机拍摄的图像;The image obtaining step is to obtain the image taken by the camera; 视差取得步骤,取得上述图像的每个像素单位的视差或每个像素单位的、上述照相机与被摄体的距离信息的至少一方;a parallax obtaining step of obtaining at least one of the parallax per pixel unit of the image or the distance information between the camera and the subject per pixel unit; 模糊量决定步骤,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;The blur amount determining step is to determine the blur amount of each pixel unit of the above-mentioned image according to the above-mentioned parallax of each pixel unit or the above-mentioned distance information of each pixel unit; 模糊处理步骤,按照上述模糊量,对上述图像实施模糊处理;The blurring processing step is to perform blurring processing on the above-mentioned image according to the above-mentioned blurring amount; 块大小决定步骤,根据上述模糊量,从多个块大小中决定用于从实施上述模糊处理后的图像切出编码对象区域的块大小;以及A block size determining step of determining, from among a plurality of block sizes, a block size for cutting out an encoding target region from the blurred image based on the amount of blur; and 编码步骤,按照上述决定的块大小,将实施上述模糊处理后的图像以块单位进行编码。In the encoding step, the blurred image is encoded in units of blocks according to the determined block size. 12.一种图像编码系统,包括用于拍摄图像的照相机、将上述图像编码的图像编码装置、以及用于记录通过上述图像编码装置的编码生成的图像压缩数据的记录介质,其特征在于,12. An image encoding system comprising a camera for capturing images, an image encoding device for encoding the image, and a recording medium for recording compressed image data generated by encoding by the image encoding device, wherein: 上述图像编码装置包括:The above-mentioned image encoding device includes: 图像取得部,取得图像;The image acquisition unit acquires an image; 视差取得部,取得上述图像的每个像素单位的视差或每个像素单位的、上述照相机与被摄体的距离信息的至少一方;a parallax acquisition unit that acquires at least one of the parallax per pixel of the image or the distance information between the camera and the object per pixel; 模糊量决定部,根据上述每个像素单位的视差或上述每个像素单位的距离信息,决定上述图像的每个像素单位的模糊量;a blur amount determination unit that determines a blur amount per pixel of the image based on the parallax per pixel or the distance information per pixel; 模糊处理部,按照上述模糊量,对上述图像实施模糊处理;The blur processing unit performs blur processing on the image according to the blur amount; 块大小决定部,根据上述模糊量,从多个块大小中决定用于从实施上述模糊处理后的图像切出编码对象区域的块大小;以及a block size determining unit that determines, from among a plurality of block sizes, a block size for cutting out an encoding target region from the blurred image based on the amount of blur; and 编码部,按照上述决定的块大小,将实施上述模糊处理后的图像以块单位进行编码。The encoding unit encodes the image subjected to the blurring process in units of blocks according to the determined block size.
CN201280001281.1A 2011-07-19 2012-04-06 Picture coding device and integrated circuit thereof and method for encoding images Expired - Fee Related CN102986221B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2011158060 2011-07-19
JP2011-158060 2011-07-19
PCT/JP2012/002448 WO2013011608A1 (en) 2011-07-19 2012-04-06 Image encoding device, integrated circuit therefor, and image encoding method

Publications (2)

Publication Number Publication Date
CN102986221A CN102986221A (en) 2013-03-20
CN102986221B true CN102986221B (en) 2016-11-30

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09181966A (en) * 1995-12-22 1997-07-11 Olympus Optical Co Ltd Image processing method and device
CN101199210A (en) * 2005-07-26 2008-06-11 夏普株式会社 Image processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09181966A (en) * 1995-12-22 1997-07-11 Olympus Optical Co Ltd Image processing method and device
CN101199210A (en) * 2005-07-26 2008-06-11 夏普株式会社 Image processing device

Similar Documents

Publication Publication Date Title
JP5932666B2 (en) Image encoding apparatus, integrated circuit thereof, and image encoding method
JP6178017B2 (en) Improved depth recognition for stereo video
CN108886598B (en) Compression method and device for panoramic stereoscopic video system
US9210405B2 (en) System and method for real time 2D to 3D conversion of video in a digital camera
KR101484606B1 (en) METHOD AND APPARATUS FOR ADAPTIVE REFERENCE FILTERING
EP2491722B1 (en) Depth map generation techniques for conversion of 2d video data to 3d video data
JP5544047B2 (en) Image processing apparatus, method and program, stereoscopic imaging apparatus, portable electronic device, printer, and stereoscopic image reproducing apparatus
WO2012086120A1 (en) Image processing apparatus, image pickup apparatus, image processing method, and program
EP2706504A2 (en) An apparatus, a method and a computer program for image processing
JP6800797B2 (en) Image pickup device, image processing device, control method and program of image pickup device
JP2011188004A (en) Three-dimensional video imaging device, three-dimensional video image processing apparatus and three-dimensional video imaging method
JP5450643B2 (en) Image coding apparatus, image coding method, program, and integrated circuit
CN103181173A (en) Three-dimensional image processing device, three-dimensional camera device, and three-dimensional image processing method
JP5395911B2 (en) Stereo image encoding apparatus and method
WO2012060156A1 (en) Multi-viewpoint image encoding device and multi-viewpoint image decoding device
CN112585962A (en) Method and system for forming extended focal plane for large viewpoint changes
JP2020120322A (en) Distance image encoding device and program thereof, and distance image decoding device and program thereof
JP2013150071A (en) Encoder, encoding method, program and storage medium
CN105100595A (en) Image capture apparatus and method for controlling the same
WO2011074189A1 (en) Image encoding method and image encoding device
CN102986221B (en) Picture coding device and integrated circuit thereof and method for encoding images
JP5869839B2 (en) Image processing apparatus and control method thereof
JP2015128252A (en) Prediction image generating method, prediction image generating device, prediction image generating program, and recording medium
WO2011158562A1 (en) Multi-viewpoint image encoding device
KR20150137081A (en) Method for encoding a plurality of input images and storage medium and device for storing program

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20141009

Address after: Seaman Avenue Torrance in the United States of California No. 2000 room 200

Applicant after: PANASONIC INTELLECTUAL PROPERTY CORPORATION OF AMERICA

Address before: Osaka Japan

Applicant before: Matsushita Electric Industrial Co.,Ltd.

CB02 Change of applicant information

Address after: Seaman Avenue Torrance in the United States of California No. 20000 room 200

Applicant after: PANASONIC INTELLECTUAL PROPERTY CORPORATION OF AMERICA

Address before: Seaman Avenue Torrance in the United States of California No. 2000 room 200

Applicant before: PANASONIC INTELLECTUAL PROPERTY CORPORATION OF AMERICA

GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20161130

Termination date: 20190406