ITTO20130619A1 - PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT - Google Patents

PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT Download PDF

Info

Publication number
ITTO20130619A1
ITTO20130619A1 IT000619A ITTO20130619A ITTO20130619A1 IT TO20130619 A1 ITTO20130619 A1 IT TO20130619A1 IT 000619 A IT000619 A IT 000619A IT TO20130619 A ITTO20130619 A IT TO20130619A IT TO20130619 A1 ITTO20130619 A1 IT TO20130619A1
Authority
IT
Italy
Prior art keywords
image
pixels
contours
pixel
distance
Prior art date
Application number
IT000619A
Other languages
Italian (it)
Inventor
Massimiliano Barone
Original Assignee
St Microelectronics Srl
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 St Microelectronics Srl filed Critical St Microelectronics Srl
Priority to IT000619A priority Critical patent/ITTO20130619A1/en
Priority to US14/336,777 priority patent/US9483830B2/en
Priority to US14/336,734 priority patent/US9317925B2/en
Priority to US14/336,763 priority patent/US9373171B2/en
Publication of ITTO20130619A1 publication Critical patent/ITTO20130619A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Instructional Devices (AREA)

Description

DESCRIZIONE dell invenzione industriale dal titolo: DESCRIPTION of the industrial invention entitled:

Procedimento per generare una mappa di profondit?, relativo sistema e prodotto informatico Process to generate a depth map, related system and IT product

TESTO DELLA DESCRIZIONE TEXT OF THE DESCRIPTION

Campo dell invenzione Field of invention

Forme di attuazione della presente descrizione sono relative alla stima di mappe di profondit?. Embodiments of the present description relate to the estimation of depth maps.

Sfondo Background

Nella computer vision, un tipico problema ? relativo alla stima di una mappa di profondit? da almeno due immagini dello stesso oggetto ottenute da visuali differenti. Di solito, durante il processo di stima di una mappa di profondit?, un valore di profondit? ? associato a ciascun pixel della mappa di profondit?. Per esempio, i valori della mappa di profondit? possono essere rappresentati come un immagine nella scala del grigio. In computer vision, a typical problem? relative to the estimation of a map of depth? from at least two images of the same object obtained from different views. Usually, during the process of estimating a depth map, a depth value is ? associated with each pixel of the depth map. For example, the values of the depth map? can be represented as a grayscale image.

Per esempio, le Figure 1a e 1b illustrano rispettivamente un esempio di un immagine di sinistra e di una di destra e la Figura 1c rappresenta una possibile mappa di profondit? nella scala del grigio. For example, Figures 1a and 1b illustrate an example of a left and a right image, respectively, and Figure 1c represents a possible depth map. in the gray scale.

Sostanzialmente, le Figure 1a e 1b corrispondono alle ben note immagini di riferimento cone degli 2003 Stereo datasets with ground truth , che sono stati creati da Daniel Scharstein, Alexander Vandenberg-Rodes e Richard Szelisk. Le versioni originali delle immagini sono pubblicate, per es., in Daniel Scharstein e Richard Szeliski, High-accuracy stereo depth maps using structured light , IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2003), volume 1, pagine da 195 a 202, Madison, WI, Stati Uniti d America, giugno 2003, e sono anche disponibili, per es., in http://vision.middlebury.edu/stereo/data/scenes2003/. Basically, Figures 1a and 1b correspond to the well-known reference images of the 2003 Stereo datasets with ground truth, which were created by Daniel Scharstein, Alexander Vandenberg-Rodes and Richard Szelisk. The original versions of the images are published, e.g., in Daniel Scharstein and Richard Szeliski, High-accuracy stereo depth maps using structured light, IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2003), volume 1, pages of 195 a 202, Madison, WI, United States of America, June 2003, and are also available, e.g., at http://vision.middlebury.edu/stereo/data/scenes2003/.

Esistono vari procedimenti nella tecnica nota per ottenere una mappa di profondit?. Per questo motivo, un gruppo di ricerca del Middlebury College ha definito un procedimento di tassonomia che permette di classificare differenti soluzioni per generare immagini di mappe di profondit?, si veda per es. Daniel Scharstein e Richard Szeliski, A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms , International Journal of Computer Vision, 2002, Vol. 47, pagine da 7 a 42, che ? incorporato qui tramite citazione nella sua interezza. L articolo summenzionato di Scharstein et al. fornisce anche una panoramica generale dei procedimenti della tecnica nota, che possono essere classificati come procedimenti locali, procedimenti globali, programmazione dinamica e algoritmi cooperativi. There are various methods in the prior art for obtaining a depth map. For this reason, a research group from Middlebury College has defined a taxonomy procedure that allows to classify different solutions to generate depth map images, see eg. Daniel Scharstein and Richard Szeliski, A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms, International Journal of Computer Vision, 2002, Vol. 47, pages 7 to 42, which? incorporated herein by citation in its entirety. The aforementioned article by Scharstein et al. it also provides a general overview of the prior art processes, which can be classified as local processes, global processes, dynamic programming and cooperative algorithms.

La Figura 2 illustra uno schema a blocchi, che rappresenta le fasi principali di tipici procedimenti di stima di mappe di profondit?. Figure 2 illustrates a block diagram, representing the main steps of typical depth map estimation procedures.

Sostanzialmente, la maggior parte dei procedimenti comprendono una fase di impostazione 100, una fase di adattamento ( matching ) 102, una fase di filtraggio 104 e una fase di raffinamento 106. Per esempio, la fase di impostazione 100 pu? comprendere una conversione delle immagini originali da immagini a colori a immagini nella scala del grigio, come una conversione da RGB a scala del grigio 1002, un ridimensionamento in scala ( rescaling ) delle immagini 1004, un filtraggio del rumore 1006, una rettificazione 1008, un estrazione degli elementi distintivi ( feature ) 1010 e/o una segmentazione dei colori 1012. La fase di adattamento 102 pu? comprendere una fase di calcolo del costo di adattamento 1002 e una fase di aggregazione (di supporto) del costo 1024. La fase di filtraggio 104 pu? comprendere una fase di calcolo della disparit? 1042 e una fase di ottimizzazione della disparit? 1044. Infine, la fase di raffinamento 106 pu? comprendere una fase di raffinamento della disparit? 1062. Basically, most of the methods comprise a setting step 100, a matching step 102, a filtering step 104 and a refinement step 106. For example, the setting step 100 can? include a conversion of original images from color images to grayscale images, such as RGB to 1002 grayscale conversion, 1004 image rescaling, 1006 noise filtering, 1008 rectification, a extraction of the distinctive elements (features) 1010 and / or a segmentation of the colors 1012. The adaptation phase 102 can? comprise a step of calculating the adaptation cost 1002 and an aggregation (support) step of the cost 1024. The filtering step 104 can? understand a phase of calculating the disparity? 1042 and a phase of optimization of the disparity? 1044. Finally, the refinement phase 106 can? understand a phase of refinement of the disparity? 1062.

Uno dei procedimenti noti per generare immagini di profondit? ? detto adattamento del blocco ( block matching ). Specificamente, nell adattamento del blocco, un quadrato di pixel ? usato per ciascun pixel (pixel di riferimento) nell immagine di riferimento, come l immagine di sinistra, ed ? confrontato con i possibili quadrati nella seconda immagine, per es. l immagine di destra, per trovare la migliore associazione tra entrambi i pixel centrali. Di solito, non sono usati tutti i quadrati nella seconda immagine, ma la ricerca pu? essere limitata solo a un sottoinsieme di quadrati, come i quadrati con le stesse coordinate verticali, cio? la stessa riga, come il pixel di riferimento. In questo caso, le differenze tra le coordinate orizzontali, cio? le colonne, forniscono la disparit? e la profondit? pu? essere calcolata, per es., come l inverso della disparit?. One of the known methods for generating depth images? ? called block matching. Specifically, in the block fit, a pixel square? used for each pixel (reference pixel) in the reference image, such as the left image, and? compared with the possible squares in the second image, e.g. the right image, to find the best association between both central pixels. Usually, not all the squares in the second image are used, but the search can. be limited to only a subset of squares, such as squares with the same vertical coordinates, that is? the same row as the reference pixel. In this case, the differences between the horizontal coordinates, that is? the columns, provide the disparity? and the depth? can be calculated, for example, as the inverse of the disparity.

Sintesi Synthesis

L inventore ha osservato che il procedimento di adattamento del blocco spesso non tratta bene le occlusioni e gli oggetti sottili, perch? in questo caso l immagine di sinistra e quella di destra comprendono solo alcune differenze locali minori. The inventor observed that the block fitting process often does not treat occlusions and thin objects well. in this case the left and right images include only some minor local differences.

Inoltre, la stima di una mappa di profondit? richiede un elaborazione di molti dati e cos? di solito ? lenta. Furthermore, the estimation of a depth map? requires a lot of data processing and so on? usually ? slow.

Secondo la presente invenzione, uno o pi? dei problemi precedenti sono risolti per mezzo di un procedimento che ha gli elementi distintivi esposti nelle rivendicazioni che seguono. L invenzione ? anche relativa a un sistema corrispondente, cos? come a un relativo prodotto informatico corrispondente, caricabile nella memoria di almeno un computer e che include porzioni di codice software per effettuare le fasi del procedimento dell invenzione quando il prodotto ? eseguito su un computer. Come usato qui, si intende che un riferimento a un prodotto informatico ? equivalente a un riferimento a un mezzo leggibile da computer che contiene istruzioni per controllare un sistema di elaborazione per coordinare l esecuzione del procedimento dell invenzione. Un riferimento ad almeno un computer intende evidentemente evidenziare la possibilit? che la presente invenzione sia implementata in forma modulare/distribuita. Le rivendicazioni sono parte integrante della descrizione dell invenzione qui fornita. According to the present invention, one or more? of the preceding problems are solved by means of a process which has the distinctive elements set out in the following claims. The invention? also related to a corresponding system, so? as to a corresponding corresponding computer product, which can be loaded into the memory of at least one computer and which includes portions of software code for carrying out the steps of the process of the invention when the product? run on a computer. As used here, is meant that a reference to a computer product? equivalent to a reference to a computer readable medium that contains instructions for controlling a computer system to coordinate the execution of the process of the invention. A reference to at least one computer obviously intends to highlight the possibility? that the present invention is implemented in a modular / distributed form. The claims are an integral part of the description of the invention provided herein.

Come menzionato in precedenza, lo scopo della presente descrizione ? di fornire tecniche per stimare mappe di profondit? da almeno una prima e una seconda immagine. As previously mentioned, the purpose of this description? to provide techniques for estimating depth maps? from at least a first and a second image.

Generalmente, in varie forme di attuazione, una pluralit? di pixel di riferimento sono selezionati nella prima immagine ed a ciascun pixel di riferimento ? associato un rispettivo pixel nella seconda immagine. In seguito, ? determinata la disparit? tra ciascun pixel di riferimento e il rispettivo pixel nella seconda immagine ed ? calcolato un valore di profondit? in funzione della rispettiva disparit?. Generally, in various embodiments, a plurality of of reference pixels are selected in the first image and at each reference pixel? associated with a respective pixel in the second image. Afterwards, ? determined the disparity? between each reference pixel and the respective pixel in the second image and d? calculated a depth value? according to the respective disparity.

Specificamente, in varie forme di attuazione, i pixel di riferimento nella prima immagine sono selezionati attraverso un operazione di sotto-campionamento adattativo. Specifically, in various embodiments, the reference pixels in the first image are selected through an adaptive subsampling operation.

Per esempio, in varie forme di attuazione, ? effettuata un estrazione dei contorni al fine di rilevare i contorni nella prima immagine. In seguito, ? effettuato un sotto-campionamento adattativo al fine di selezionare un sottoinsieme di pixel o di campioni nella prima immagine, in cui il passo di campionamento nella direzione orizzontale e/o verticale ? determinata in funzione dei contorni rilevati nella prima immagine. For example, in various embodiments,? performed an extraction of the contours in order to detect the contours in the first image. Afterwards, ? carried out an adaptive subsampling in order to select a subset of pixels or samples in the first image, in which the sampling step in the horizontal and / or vertical direction? determined according to the edges detected in the first image.

Per esempio, in varie forme di attuazione, la distanza tra i contorni e rilevata in almeno una direzione di campionamento e il passo di campionamento per i campioni tra due contorni adiacenti ? determinato in funzione della distanza tra i rispettivi contorni. For example, in various embodiments, is the distance between the contours sensed in at least one sampling direction and the sampling step for samples between two adjacent contours? determined as a function of the distance between the respective contours.

A questo scopo, la distanza tra i rispettivi contorni pu? essere confrontata con una data soglia. For this purpose, the distance between the respective contours can? be compared with a given threshold.

Nel caso in cui la distanza tra i contorni sia inferiore alla soglia, il passo di campionamento per i campioni tra i due contorni adiacenti pu? essere impostato alla distanza tra i rispettivi contorni diviso per due, cio? un singolo campione ? posto al centro tra i contorni. In case the distance between the contours is less than the threshold, the sampling step for the samples between the two adjacent contours can? be set to the distance between the respective contours divided by two, that is? a single champion? placed in the center between the contours.

Al contrario, nel caso in cui la distanza tra i contorni sia superiore alla soglia, il passo di campionamento per i campioni tra i due contorni adiacenti pu? corrispondere alla soglia o, in generale, pu? essere impostato a un valore fisso. Conversely, in the event that the distance between the contours is greater than the threshold, the sampling step for the samples between the two adjacent contours can? correspond to the threshold or, in general, can? be set to a fixed value.

Inoltre, in questo caso, un certo numero di pixel pu? essere saltato al fine di distribuire meglio i campioni tra i contorni. Per esempio, in varie forme di attuazione, la distanza tra i contorni ? divisa per la soglia (o un valore di campionamento fisso) al fine di determinare il numero di campioni tra i contorni e il resto della divisione. In questo caso, il numero di pixel saltati corrisponde al resto della divisione diviso per due. Also, in this case, a certain number of pixels can? be skipped in order to better distribute the samples between the contours. For example, in various embodiments, the distance between the contours? divided by the threshold (or a fixed sampling value) in order to determine the number of samples between the contours and the remainder of the division. In this case, the number of skipped pixels is the remainder of the division divided by two.

Breve descrizione delle Figure Brief description of the Figures

Le forme di attuazione dell invenzione saranno ora descritte con riferimento ai disegni allegati, che sono forniti puramente a titolo di esempio non limitativo e nei quali: The embodiments of the invention will now be described with reference to the attached drawings, which are provided purely by way of non-limiting example and in which:

- le Figure 1 e 2 sono gi? state descritte in precedenza; - Figures 1 and 2 are already? been described above;

- la Figura 3 ? uno schema a blocchi che illustra l architettura generale di un sistema per la stima di mappe di profondit?; - Figure 3? a block diagram illustrating the general architecture of a system for estimating depth maps;

- la Figura 4 ? un diagramma di flusso che rappresenta una prima forma di attuazione di un procedimento per stimare mappe di profondit? secondo la presente descrizione; - Figure 4? a flow chart representing a first embodiment of a method for estimating depth maps according to the present description;

- la Figura 5 rappresenta un esempio di un operazione di rettificazione di due immagini; Figure 5 represents an example of a two-image rectification operation;

- le Figure da 6 a 8 illustrano vari aspetti di una forma di attuazione di un operazione di adattamento secondo la presente descrizione; Figures 6 to 8 illustrate various aspects of an embodiment of an adaptation operation according to the present description;

- le Figure da 9 a 11 illustrano vari aspetti di una forma di attuazione di un operazione di filtraggio secondo la presente descrizione; Figures 9 to 11 illustrate various aspects of an embodiment of a filtering operation according to the present description;

- la Figura 12 ? un diagramma di flusso che rappresenta una seconda forma di attuazione di un procedimento per stimare mappe di profondit? secondo la presente descrizione; e - Figure 12? a flow chart representing a second embodiment of a method for estimating depth maps according to the present description; And

- le Figure da 13 a 16 illustrano vari aspetti di una forma di attuazione che permette di ridurre la velocit? di elaborazione della stima di una mappa di profondit?. - Figures 13 to 16 illustrate various aspects of an embodiment which allows to reduce the speed? of elaboration of the estimate of a map of depth.

Descrizione dettagliata dell invenzione Detailed description of the invention

Nella descrizione seguente, sono dati numerosi dettagli specifici per fornire una comprensione approfondita delle forme di attuazione. Le forme di attuazione possono essere attuate senza uno o pi? dei dettagli specifici o con altri procedimenti, componenti, materiali, ecc. In altri casi, non sono rappresentati o descritti in dettaglio materiali, strutture o operazioni ben note per evitare di rendere poco chiari gli aspetti delle forme di attuazione. In the following description, numerous specific details are given to provide a thorough understanding of the embodiments. The forms of implementation can be implemented without one or more? specific details or with other processes, components, materials, etc. In other cases, well-known materials, structures or operations are not represented or described in detail to avoid making the aspects of the embodiments unclear.

Un riferimento in tutta questa descrizione a una forma di attuazione indica che una particolare struttura, elemento distintivo o caratteristica descritta con riferimento alla forma di attuazione ? inclusa in almeno una forma di attuazione. Cos?, le presenze delle frasi in una forma di attuazione in vari punti in tutta questa descrizione non fanno necessariamente tutte riferimento alla stessa forma di attuazione. Inoltre, le particolari strutture, elementi distintivi o caratteristiche possono essere combinate in una maniera adeguata qualsiasi in una o pi? forme di attuazione. A reference throughout this description to an embodiment indicates that a particular structure, distinctive feature or feature described with reference to the embodiment? included in at least one embodiment. Thus, the appearances of the sentences in one embodiment at various points throughout this description do not necessarily all refer to the same embodiment. Furthermore, the particular structures, distinctive elements or features can be combined in any suitable manner into one or more? forms of implementation.

Le intestazioni qui fornite sono solo per vantaggio e non interpretano l ambito o il significato delle forme di attuazione. The headings provided here are for convenience only and do not interpret the scope or meaning of the embodiments.

La Figura 3 ? uno schema a blocchi che rappresenta una forma di attuazione di un sistema per generare mappe di profondit?. Figure 3? a block diagram representing an embodiment of a system for generating depth maps.

Nella forma di attuazione considerata, il sistema include una pluralit? di videocamere 10. Specificamente, le videocamere sono disposte per acquisire immagini IMG dello stesso oggetto da differenti angoli visuali. Per esempio, a questo scopo pu? essere usata una videocamera stereo che include due videocamere. In the embodiment considered, the system includes a plurality of of cameras 10. Specifically, the cameras are arranged to acquire IMG images of the same object from different viewing angles. For example, for this purpose can? a stereo video camera that includes two cameras is used.

Le immagini IMG ottenute dalle due o pi? videocamere 10 sono fornite a un unit? di elaborazione 20, come un microprocessore o un personal computer programmato tramite istruzioni software, un circuito integrato dedicato o una combinazione di entrambi. Per esempio, l elaborazione potrebbe essere implementata completamente tramite software o tramite software accelerato da una GPU o da un sistema multi-core o infine da un hardware dedicato, che ? atto a implementare le operazioni di elaborazione. Inoltre, sia le soluzioni hardware sia quelle software possono introdurre differenti stadi di parallelismo. The IMG images obtained from the two or more? 10 cameras are supplied to a unit? processing 20, such as a microprocessor or personal computer programmed via software instructions, a dedicated integrated circuit or a combination of both. For example, the processing could be implemented completely through software or through software accelerated by a GPU or a multi-core system or finally by a dedicated hardware, which? adapted to implement the processing operations. Furthermore, both hardware and software solutions can introduce different stages of parallelism.

Nella forma di attuazione considerata, l unit? di elaborazione 20 elabora le immagini IMG e genera un immagine di mappa di profondit? DMI. Per esempio, l unit? di elaborazione 20 pu? elaborare le immagini IMG acquisite dalle videocamere 10 e pu? fornire una mappa di profondit?, in cui ciascun pixel della mappa di profondit? ? identificato da un valore di profondit?. Per esempio, si pu? considerare che una tale mappa di profondit? sia un immagine nella scala del grigio, in cui il valore pi? scuro ? il pi? lontano mentre il valore pi? chiaro ? il pi? vicino (o viceversa). In the embodiment considered, the unit? processing 20 processes the IMG images and generates a depth map image? DMI. For example, the unit? processing 20 pu? process the IMG images acquired by the cameras 10 and can? provide a depth map, where each pixel of the depth map is ? identified by a depth value. For example, you can? consider that such a depth map? is an image in the gray scale, in which the value pi? dark ? the pi? away while the value pi? clear ? the pi? close (or vice versa).

Generalmente, le videocamere 10 possono avere qualsiasi disposizione possibile. Tuttavia, almeno nel caso in cui siano usate due videocamere, ? preferibile che le videocamere siano disposte in parallelo. Per esempio, come sar? descritto in maggiori dettagli nel seguito, l unit? di elaborazione 20 pu? rettificare le immagini durante una fase di preelaborazione. Per esempio, a questo scopo, le immagini acquisite possono essere elaborate da uno strumento di calibrazione che prende in considerazione una matrice di KRT tra le videocamere, dove K dipende dai parametri ottici della videocamera (come la focale, la dimensione dello schermo, la distorsione della lente e cos? via) mentre RT ? la trasformazione di rotazione e traslazione tra le videocamere. Generally, the video cameras 10 can have any possible arrangement. However, at least if two cameras are used,? It is preferable that the cameras are arranged in parallel. For example, what will it be like? described in more detail below, the unit? processing 20 pu? rectify images during a preprocessing phase. For example, for this purpose, the acquired images can be processed by a calibration tool that takes into account a KRT matrix between cameras, where K depends on the optical parameters of the camera (such as focal length, screen size, distortion of the lens and so on) while RT? the transformation of rotation and translation between cameras.

La Figura 4 ? un diagramma di flusso di una forma di attuazione di un procedimento per generare mappe di profondit? secondo la presente descrizione. Figure 4? a flowchart of an embodiment of a method for generating depth maps according to the present description.

Specificamente, dopo una fase di inizio 2000, il procedimento acquisisce in una fase 2002 una pluralit? di immagini IMG che rappresentano almeno un oggetto da differenti angoli visuali. Per esempio, il procedimento pu? leggere le immagini IMG dalle videocamere 10 o pu? aprire dei file preesistenti. Specifically, after a phase of early 2000, the procedure acquires in a 2002 phase a plurality of of IMG images representing at least one object from different viewing angles. For example, the procedure can? read the IMG images from the cameras 10 or can? open existing files.

Nella forma di attuazione considerata, il procedimento elabora queste immagini durante una fase di impostazione 2004. In the embodiment considered, the process processes these images during a 2004 setting phase.

Per esempio, la fase di impostazione 2004 pu? comprendere una conversione dal colore alla scala del grigio, per esempio l immagine pu? essere convertita da un immagine RGB (rosso verde blu) a un immagine nella scala del grigio. Inoltre, le immagini possono essere ridimensionate in scala, per esempio la dimensione pu? essere ridotta al fine di effettuare un elaborazione pi? veloce con una qualit? inferiore. For example, the 2004 setting phase can? understand a conversion from color to grayscale, for example the image can? be converted from an RGB (red green blue) image to a grayscale image. Also, the images can be resized to scale, for example the size can be resized. be reduced in order to carry out a more processing? fast with a quality? inferior.

Nella forma di attuazione considerata, le immagini sono anche rettificate in una fase di rettificazione 2006. Come menzionato in precedenza, la rettificazione ? effettuata di solito tenendo conto di una matrice di KRT tra le videocamere, dove K dipende dai parametri ottici delle videocamere (come la focale, la dimensione dello schermo, la distorsione della lente e cos? via) mentre RT ? una trasformazione della rotazione e traslazione tra le videocamere. Di conseguenza, la matrice di KRT di solito ? costante e pu? essere calcolata in precedenza. Sostanzialmente, durante la fase di rettificazione 2006, le immagini sono allineate, in modo tale che gli elementi distintivi, cio? le caratteristiche degli oggetti, siano allineati sullo stesso asse verticale, cio? la stessa riga. Una tale fase di rettificazione ? effettuata nella maggioranza dei procedimenti di generazione di immagini di profondit? rendendo qui superflua una descrizione pi? dettagliata. Giusto a titolo di illustrazione, le Figure 5a e 5b rappresentano due possibili immagini di sorgente ottenute dalle videocamere 10 e le Figure 5c e 5d illustrano le immagini dopo la fase di rettificazione 2006. In the embodiment considered, the images are also rectified in a 2006 rectification step. As mentioned above, rectification? usually performed taking into account a KRT matrix between cameras, where K depends on the optical parameters of the cameras (such as focal length, screen size, lens distortion and so on) while RT? a transformation of rotation and translation between cameras. Consequently, the KRT matrix usually? constant and can? be calculated in advance. Basically, during the 2006 rectification phase, the images are aligned, in such a way that the distinctive elements, that is? the characteristics of the objects, are aligned on the same vertical axis, that is? the same line. Such a phase of rectification? carried out in the majority of the procedures for generating images of depth? making a more description superfluous here? detailed. Just by way of illustration, Figures 5a and 5b represent two possible source images obtained from the video cameras 10 and Figures 5c and 5d illustrate the images after the 2006 rectification step.

In varie forme di attuazione, tutte o parte delle fasi summenzionate effettuate durante la fase di impostazione 2004 e la fase di rettificazione 2006 possono essere effettuate direttamente dalle videocamere 10, per es. per mezzo di un unit? di elaborazione integrata nelle videocamere 10, oppure le immagini IMG possono essere memorizzate gi? in forma preelaborata, per es. dopo che ? stata effettuata la fase di rettificazione 2006. In various embodiments, all or part of the aforementioned steps carried out during the setting step 2004 and the rectification step 2006 can be performed directly by the video cameras 10, e.g. by means of a unit? processing integrated in the cameras 10, or the IMG images can be stored already? in preprocessed form, e.g. after that ? the 2006 rectification phase was carried out.

Inoltre, in generale, la fase di rettificazione 2006 pu? essere anche effettuata prima della fase di impostazione 2004, oppure una prima parte delle operazioni di impostazione 2004 possono essere effettuate prima della fase di rettificazione 2006 e una seconda parte delle operazioni di impostazione 2004 possono essere effettuate dopo la fase di rettificazione 2006. Furthermore, in general, the 2006 rectification phase can? may also be carried out before the 2004 setting phase, or a first part of the 2004 setting operations may be carried out before the 2006 rectification phase and a second part of the 2004 setting operations may be carried out after the 2006 rectification phase.

Nella forma di attuazione considerata, le immagini sono quindi elaborate durante una fase di adattamento 2008. In the embodiment considered, the images are then processed during a 2008 adaptation phase.

In varie forme di attuazione, la fase di adattamento 2008 comprende una fase di preadattamento 2010 opzionale e una fase di adattamento 2012. Specificamente, in varie forme di attuazione, la fase di preadattamento 2010 determina i possibili pixel candidati per la fase di adattamento 2012, riducendo cos? la quantit? totale di pixel da elaborare. In various embodiments, the 2008 adaptation phase comprises an optional 2010 pre-adaptation phase and a 2012 adaptation phase. Specifically, in various embodiments, the 2010 pre-adaptation phase determines the possible candidate pixels for the 2012 adaptation phase, reducing cos? the quantity? total of pixels to be processed.

Cos?, durante la fase di preadattamento 2010 ? selezionato un sottoinsieme di pixel candidati, e la fase di adattamento 2012 ? effettuata soltanto per i pixel candidati. Questo significa che possono essere creati dei buchi, ma questi possono essere riempiti successivamente durante una fase di raffinamento. Cos?, la fase di preadattamento 2010 ? opzionale perch? la successiva fase di adattamento 2012 potrebbe anche essere effettuata su tutti i pixel dell immagine di riferimento. What, during the 2010 pre-adaptation phase? selected a subset of candidate pixels, and the 2012 adaptation phase? performed for candidate pixels only. This means that holes can be created, but these can be filled later during a refinement phase. What, the 2010 pre-adaptation phase? optional why? the subsequent 2012 adaptation phase could also be carried out on all the pixels of the reference image.

Una volta che la fase di adattamento 2008 ? stata completata, il procedimento pu? effettuare una fase di filtraggio 2014 e/o una fase di raffinamento 2016 prima che il procedimento termini in una fase di arresto 2018. Once the 2008 adaptation phase? been completed, the procedure can? carry out a 2014 filtering phase and / or a 2016 refinement phase before the process ends in a 2018 stop phase.

Cos?, generalmente, i procedimenti per generare una mappa di profondit? DMI da una pluralit? di immagini IMG hanno in comune che ? selezionata una pluralit? di pixel di riferimento in una prima immagine, cio? tutti i pixel o solo un sottoinsieme di pixel. In seguito, a ciascun pixel di riferimento ? associato un rispettivo pixel nella seconda immagine ed ? determinata la disparit? tra ciascun pixel di riferimento e il rispettivo pixel nella seconda immagine. Infine, pu? essere calcolato un valore di profondit? per ciascun pixel di riferimento in funzione della rispettiva disparit?. So, generally, the procedures for generating a depth map? DMI from a plurality? of IMG images have in common that? selected a plurality? of reference pixels in a first image, that is? all pixels or just a subset of pixels. Next, to each reference pixel? associated with a respective pixel in the second image and? determined the disparity? between each reference pixel and the respective pixel in the second image. Finally, it can? be calculated a value of depth? for each reference pixel as a function of the respective disparity.

Nel seguito sono descritte possibili forme di attuazione della fase di preadattamento 2008, della fase di adattamento 2012, della fase di filtraggio 2014 e della fase di raffinamento 2016. Possible embodiments of the 2008 pre-adaptation phase, the 2012 adaptation phase, the 2014 filtering phase and the 2016 refinement phase are described below.

Fase di preadattamento Pre-adaptation phase

Come menzionato in precedenza, durante la fase di preadattamento 2010, sono determinati i possibili pixel candidati per la successiva fase di adattamento 2012, riducendo cos? la quantit? totale di pixel da elaborare. As previously mentioned, during the 2010 pre-adaptation phase, the possible candidate pixels for the subsequent 2012 adaptation phase are determined, thus reducing? the quantity? total of pixels to be processed.

In varie forme di attuazione, la fase di preadattamento pu? comprendere almeno uno tra un test di pixel e/o un test di gradiente . In various embodiments, the pre-adaptation phase can? comprise at least one of a pixel test and / or a gradient test.

Sostanzialmente, in entrambi i test, ? selezionato un blocco di pixel, come un blocco di 5 x 5 o di 9 x 9 pixel, centrato su un rispettivo pixel candidato nell immagine di riferimento. Basically, in both tests,? selected a block of pixels, such as a 5 x 5 or 9 x 9 pixel block, centered on a respective candidate pixel in the reference image.

Durante il test di pixel, ? calcolato il valore di luminosit? media per questo blocco di pixel ed ? associato al pixel di riferimento. In seguito, questo valore associato al pixel candidato ? confrontato con i pixel nella seconda immagine. Specificamente, il valore del pixel candidato ? confrontato con valori equivalenti calcolati per i pixel nella seconda immagine, cio? con una luminosit? media calcolata per un blocco di pixel circostanti che ha la stessa dimensione. In varie forme di attuazione, il pixel ? confrontato soltanto con i pixel nella seconda immagine, che appartengono alla stessa riga. Inoltre, in varie forme di attuazione, la scansione non ? effettuata per tutti i blocchi che appartengono alla stessa riga, ma solo per un sottoinsieme dei pixel nella riga, perch? c ? un range di disparit? limitato. During the pixel test,? calculated the brightness value? average for this block of pixels and d? associated with the reference pixel. Next, this value associated with the candidate pixel? compared with the pixels in the second image. Specifically, the candidate pixel value? compared with equivalent values calculated for the pixels in the second image, that is? with a brightness? average calculated for a block of surrounding pixels that has the same size. In various embodiments, the pixel? compared only with the pixels in the second image, which belong to the same row. Furthermore, in various embodiments, the scan does not? carried out for all the blocks that belong to the same row, but only for a subset of the pixels in the row, why? c? a range of disparities? limited.

Cos?, durante il test di pixel singolo, sono mantenuti solo quei pixel candidati per i quali esiste almeno un pixel nella seconda immagine che ha un comportamento di luminosit? simile per i pixel circostanti, per es.: Thus, during the single-pixel test, only those candidate pixels are retained for which there is at least one pixel in the second image that has a brightness behavior. similar for surrounding pixels, e.g .:

- nel caso in cui la differenza assoluta tra i valori di luminosit? media sia inferiore a una soglia, il pixel ? mantenuto, o - in the event that the absolute difference between the brightness values? average is less than a threshold, the pixel? maintained, or

- nel caso in cui la differenza assoluta tra i valori di luminosit? media sia superiore o uguale alla soglia, il pixel ? rimosso. - in the event that the absolute difference between the brightness values? average is greater than or equal to the threshold, the pixel? removed.

Per esempio, per immagini tipiche, dal 50% al 75% dei pixel possono essere rimossi in anticipo, e la velocit? ? circa da 2 a 3 volte pi? veloce. For example, for typical images, 50% to 75% of the pixels can be removed early, and the speed? ? about 2 to 3 times more? rapid.

Generalmente, il test di pixel singolo pu? essere effettuato iniziando dalla prima immagine e/o dalla seconda immagine, riducendo cos? i pixel nella prima e/o nella seconda immagine che sono disponibili per la successiva operazione di adattamento. Generally, the single pixel test can? be carried out starting from the first image and / or from the second image, reducing cos? the pixels in the first and / or second image that are available for the next fitting operation.

Al contrario, durante il test di gradiente, il gradiente medio del blocco di pixel circostanti al pixel candidato corrente ? calcolato e confrontato con una soglia. Cos?, il test di gradiente pu? essere usato per determinare se il blocco ? troppo omogeneo, cio? i pixel candidati che hanno un gradiente medio che ? inferiore a una data soglia sono saltati. In effetti, in questo caso possono essere generati troppi candidati, che contengono soltanto poche informazioni. Conversely, during the gradient test, the average gradient of the block of pixels surrounding the current candidate pixel? calculated and compared with a threshold. So, the gradient test can? be used to determine if the block? too homogeneous, that is? the candidate pixels that have a medium gradient which? below a given threshold are skipped. In fact, too many candidates may be generated in this case, containing only little information.

Generalmente, anche il test di gradiente pu? essere effettuato per la prima immagine e/o per la seconda immagine, riducendo cos? i pixel nella prima e/o nella seconda immagine che sono disponibili per la successiva operazione di adattamento. Generally, even the gradient test can? be performed for the first image and / or for the second image, thus reducing? the pixels in the first and / or second image that are available for the next fitting operation.

Fase di adattamento Adaptation phase

Nel seguito sar? descritto a titolo di esempio un adattamento di due immagini, in cui si ipotizza che l immagine di sinistra sia l immagine di riferimento. Gli esperti nella tecnica apprezzeranno che la fase di adattamento pu? essere estesa anche a pi? di due immagini. In the following it will be? described as an example an adaptation of two images, in which it is assumed that the left image is the reference image. Those skilled in the art will appreciate that the adaptation phase can be extended to pi? of two images.

In varie forme di attuazione, un procedimento di adattamento di blocco modificato ? effettuato durante la fase di adattamento 2012, che sar? detto nel seguito adattamento di blocco mascherato . Sostanzialmente, anche in questo caso, per ciascun pixel candidato nell immagine di riferimento ? determinato un blocco di pixel circostanti, come un blocco di 9x9 pixel, che ? centrato sul rispettivo pixel di riferimento. Ciascun blocco di pixel nell immagine di riferimento ? quindi confrontato con possibili blocchi di pixel nella seconda immagine al fine di determinare il blocco di pixel nella seconda immagine che ? meglio adattata al blocco di pixel nell immagine di riferimento. In various embodiments, a modified block adaptation method? carried out during the 2012 adaptation phase, which will be? hereinafter referred to as masked block adaptation. Basically, even in this case, for each candidate pixel in the reference image? determined a block of surrounding pixels, such as a 9x9 pixel block, which? centered on the respective reference pixel. Each block of pixels in the reference image? then compared with possible blocks of pixels in the second image in order to determine the block of pixels in the second image that? best suited to the block of pixels in the reference image.

In varie forme di attuazione, il blocco di riferimento, cio? il blocco di pixel centrato sul pixel candidato nell immagine di riferimento, ? confrontato soltanto con i blocchi di pixel nella seconda immagine, che appartengono alla stessa riga. Inoltre, in varie forme di attuazione, la scansione non ? effettuata per tutti i blocchi che appartengono alla stessa riga, ma soltanto per un sottoinsieme di pixel nella riga, perch? c ? un intervallo di disparit? limitato. In various embodiments, the reference block, that is? the pixel block centered on the candidate pixel in the reference image,? compared only with the blocks of pixels in the second image, which belong to the same row. Furthermore, in various embodiments, the scan does not? carried out for all the blocks that belong to the same row, but only for a subset of pixels in the row, why? c? an interval of disparity? limited.

In varie forme di attuazione, l adattamento di blocco mascherato 2012 ? atto a funzionare in differenti modalit?, che possono anche essere usate in modo indipendente. In various embodiments, the 2012 masked block adaptation? adapted to work in different modes, which can also be used independently.

Le differenze tra le varie modalit? di funzionamento saranno descritte con riferimento alle Figure da 6a a 6h, in cui le Figure 6a e 6b rappresentano le immagini delle Figure 1a e 1b e le Figure 6c e 6d rappresentano due possibili blocchi di pixel presi dalle immagini delle Figure 6a e 6b. The differences between the various modes? of operation will be described with reference to Figures 6a to 6h, in which Figures 6a and 6b represent the images of Figures 1a and 1b and Figures 6c and 6d represent two possible blocks of pixels taken from the images of Figures 6a and 6b.

La prima modalit? di funzionamento ? il caso pi? semplice detto nessuna maschera e corrisponde sostanzialmente al procedimento di adattamento di blocco tradizionale. Sostanzialmente, in questa modalit? di funzionamento tutti i pixel dei blocchi sono usati per l adattamento, cio? per calcolare una funzione di costo dell adattamento. The first mode? of operation? the case pi? simple said no mask and substantially corresponds to the traditional block adaptation procedure. Basically, in this mode? of operation all the pixels of the blocks are used for the adaptation, that is? to compute a cost-of-fit function.

La seconda modalit? di funzionamento ? detta maschera singola ed ? atta a gestire le occlusioni. Sostanzialmente, questa maschera determina l intersezione tra il blocco di sinistra e quello di destra, cio? i pixel che hanno valori simili. Per esempio, in varie forme di attuazione ? calcolata una somma delle differenze assolute (SAD, Sum of Absolute Differences ) tra loro e solo i pixel che hanno un valore inferiore a una soglia sono usati per costruire la maschera. Di conseguenza, dopo l applicazione della maschera, rimangono solo i pixel con valori simili, cio? le occlusioni sono mascherate, e la funzione di costo ? calcolata soltanto per i pixel rimanenti. Per esempio, le Figure 6e e 6f rappresentano rispettivamente esempi dei blocchi rappresentati nelle Figure 6c e 6d dopo l applicazione di un filtro di maschera singola . The second mode? of operation? said single mask and? able to manage occlusions. Basically, this mask determines the intersection between the left and right blocks, that is? pixels that have similar values. For example, in various forms of implementation? calculated a sum of the absolute differences (SAD, Sum of Absolute Differences) between them and only the pixels that have a value less than a threshold are used to construct the mask. Consequently, after applying the mask, only the pixels with similar values remain, that is? the occlusions are masked, and the cost function? calculated for the remaining pixels only. For example, Figures 6e and 6f respectively represent examples of the blocks shown in Figures 6c and 6d after applying a single mask filter.

La terza modalit? di funzionamento ? detta maschera doppia . Sostanzialmente questa maschera determina i pixel di un blocco che hanno un colore simile al pixel centrale del blocco. Per esempio, in varie forme di attuazione, il valore nella scala del grigio di ciascun pixel circostante nel blocco ? confrontato con il valore nella scala del grigio del pixel al centro del blocco e, quando la differenza tra questi valori supera una data soglia, il rispettivo pixel ? mascherato. Cos?, rimangono solo i pixel del blocco, che hanno un colore simile al pixel centrale. L inventore ha osservato che questa maschera gestisce meglio le occlusioni se lo sfondo ha un colore differente, il che ? tipico per i confini e per gli oggetti sottili. Generalmente, il filtro di maschera doppia pu? essere applicato in modo indipendente dal filtro di maschera singola; tuttavia, l inventore ha osservato che le prestazioni migliorano quando il filtro di maschera doppia ? applicato al blocco di pixel in associazione al filtro di maschera singola, e preferibilmente dopo di esso. Per esempio, in una forma di attuazione, i criteri di maschera singola e i criteri di maschera doppia sono calcolati in modo indipendente ed ? usata un operazione logica, come un operazione di AND, per determinare la maschera combinata finale, cio? il sottoinsieme di pixel che dovrebbero essere mantenuti da entrambe le maschere. The third mode? of operation? called double mask. Basically this mask determines the pixels of a block that have a similar color to the central pixel of the block. For example, in various embodiments, the grayscale value of each surrounding pixel in the block? compared to the grayscale value of the pixel in the center of the block and, when the difference between these values exceeds a given threshold, the respective? masked. Thus, only the pixels of the block remain, which have a similar color to the central pixel. The inventor observed that this mask handles occlusions better if the background has a different color, which? typical for borders and thin objects. Generally, the double mask filter can? be applied independently of the single mask filter; however, the inventor observed that the performance improves when the double mask filter? applied to the pixel block in association with the single mask filter, and preferably after it. For example, in one embodiment, the single mask criteria and the double mask criteria are calculated independently and? used a logical operation, such as an AND operation, to determine the final combined mask, that is? the subset of pixels that should be kept by both masks.

Per esempio, le Figure 6g e 6h rappresentano rispettivamente esempi dei blocchi rappresentati nelle Figure 6e e 6f dopo l applicazione di un filtro di maschera doppia . For example, Figures 6g and 6h respectively represent examples of the blocks shown in Figures 6e and 6f after applying a double mask filter.

Cos?, nelle forme di attuazione descritte in precedenza, l operazione di adattamento nella fase 2012 ? effettuata su blocchi di pixel selezionando per ciascun pixel candidato in una prima immagine, cio? l immagine di riferimento, un blocco di pixel circostanti centrato sul pixel candidato, come un quadrato di pixel, per es. un blocco di 9x9 pixel. Come menzionato in precedenza, il numero di possibili pixel candidati pu? anche essere ridotto tramite un operazione di preadattamento in una fase 2010. Questo blocco di pixel ? confrontato con rispettivi blocchi di pixel con la stessa dimensione nella seconda immagine, che di solito appartengono alla stessa riga (o eventualmente anche a righe adiacenti) al fine di determinare il blocco di pixel nella seconda immagine, che ? meglio adattata al blocco di pixel nella prima immagine. Per esempio, in varie forme di attuazione, ? selezionata la combinazione di blocchi di pixel che minimizza una data funzione di costo. Per esempio, la funzione di costo pu? essere basata sul calcolo dell errore quadratico medio (MSE, Mean Square Error ) o sulla somma delle differenze assolute (SAD) tra i valori dei rispettivi pixel nei blocchi. So, in the embodiments described above, the adaptation operation in the 2012 phase? carried out on blocks of pixels by selecting for each candidate pixel in a first image, that is? the reference image, a block of surrounding pixels centered on the candidate pixel, such as a square of pixels, e.g. a block of 9x9 pixels. As mentioned earlier, the number of possible candidate pixels can be also be reduced by a pre-fit operation in a 2010 step. This block of pixels? compared with respective blocks of pixels with the same size in the second image, which usually belong to the same row (or possibly also to adjacent rows) in order to determine the block of pixels in the second image, which? best suited to the block of pixels in the first image. For example, in various embodiments,? selected the combination of blocks of pixels that minimizes a given cost function. For example, the cost function can? be based on the calculation of the mean square error (MSE) or on the sum of the absolute differences (SAD) between the values of the respective pixels in the blocks.

Pi? specificamente, nelle forme di attuazione descritte in precedenza, una maschera pu? essere applicata ai blocchi di pixel al fine di selezionare un sottoinsieme dei pixel dei blocchi che soddisfano certi criteri, cio? certi pixel possono essere rimossi da entrambi i blocchi di pixel se questi non soddisfano certi criteri. In questo caso, l adattamento, cio? il calcolo della funzione di costo, ? effettuato soltanto sui pixel rimanenti, cio? sui pixel che non sono stati rimossi dall operazione di mascheramento. Pi? specifically, in the embodiments described above, a mask can? be applied to the blocks of pixels in order to select a subset of the pixels of the blocks that meet certain criteria, that is? certain pixels can be removed from both blocks of pixels if they do not meet certain criteria. In this case, the adaptation, that is? the calculation of the cost function,? carried out only on the remaining pixels, that is? on the pixels that were not removed by the masking operation.

La Figura 7 rappresenta un diagramma di flusso di una possibile forma di attuazione della fase di adattamento 2010, che supporta tutte e tre le operazioni di mascheramento. Specificamente, la Figura 7 rappresenta una forma di attuazione, nella quale l operazione di adattamento ? effettuata per tutti i pixel nella seconda immagine, che appartengono alla stessa riga del pixel candidato. Tuttavia, come menzionato in precedenza, potrebbero essere usate anche le righe adiacenti e/o l intervallo di pixel in una riga della seconda immagine potrebbe essere limitato. Figure 7 represents a flow diagram of a possible embodiment of the 2010 adaptation step, which supports all three masking operations. Specifically, Figure 7 represents an embodiment, in which the fitting operation? performed for all pixels in the second image, which belong to the same row as the candidate pixel. However, as mentioned above, adjacent lines may also be used and / or the pixel range in one line of the second image may be limited.

Dopo una fase di inizio 3000, il procedimento seleziona in una fase 3002 un quadrato di pixel, come un blocco di 9x9 pixel che ? centrato sul pixel candidato corrente. After an initiation step 3000, the process selects in a step 3002 a pixel square, such as a 9x9 pixel block which? centered on the current candidate pixel.

In una fase 3004, il procedimento seleziona per il pixel corrente nella seconda immagine un quadrato di pixel con la stessa dimensione del quadrato di pixel selezionato nella fase 3002. In a step 3004, the method selects for the current pixel in the second image a pixel square with the same size as the pixel square selected in step 3002.

In una fase di verifica 3006, il procedimento verifica se deve essere effettuata almeno un operazione di mascheramento. In a verification step 3006, the method verifies whether at least one masking operation is to be performed.

Nel caso in cui non deve essere effettuato alcun mascheramento (uscita N della fase di verifica 3006), il procedimento procede direttamente a una fase di adattamento 3020, che sar? descritta successivamente. In the event that no masking is to be performed (output N of the verification step 3006), the procedure proceeds directly to an adaptation step 3020, which will be? described later.

Al contrario, nel caso in cui debba essere effettuato un mascheramento (uscita Y della fase di verifica 3006), il procedimento effettua almeno un operazione di mascheramento in una fase 3008. On the contrary, in the case in which a masking is to be carried out (output Y of the verification step 3006), the method carries out at least one masking operation in a step 3008.

Sostanzialmente, durante le operazioni di mascheramento sono applicate una o pi? maschere per selezionare un sottoinsieme di pixel di ciascun blocco di pixel. Per esempio, nella forma di attuazione considerata, ? applicato almeno un criterio di mascheramento a ciascun pixel del blocco di pixel. Per esempio, in varie forme di attuazione, i pixel sono mascherati creando una schiera di informazioni di controllo, che ha la dimensione di un blocco di pixel, come una schiera di 9x9 bit. Per esempio, nei casi in cui un pixel debba essere mantenuto, il valore nella schiera di informazioni di controllo pu? essere impostato a un primo valore, per es. al valore logico 1 , e nel caso in cui un pixel debba essere rimosso, il valore nella schiera di informazioni di controllo pu? essere impostato a un secondo valore, per es. al valore logico 0 . Basically, during the masking operations are applied one or more? masks to select a subset of pixels from each block of pixels. For example, in the embodiment considered,? applied at least one masking criterion to each pixel of the pixel block. For example, in various embodiments, the pixels are masked by creating a control information array, which is the size of a block of pixels, such as a 9x9 bit array. For example, in cases where a pixel is to be kept, the value in the control information array can? be set to a first value, eg. to the logical value 1, and in case a pixel has to be removed, the value in the control information array can? be set to a second value, e.g. to the logical value 0.

Per esempio, nella forma di attuazione considerata, una prima maschera, per es. la maschera singola , ? applicata al pixel corrente del blocco di pixel in una fase 3010. For example, in the embodiment considered, a first mask, e.g. the single mask,? applied to the current pixel of the pixel block in a step 3010.

Per esempio, in una forma di attuazione, il procedimento pu? calcolare, nella fase 3010, la differenza tra i valori dei rispettivi pixel dei blocchi nella prima e nella seconda immagine, per es. la differenza tra i valori di luminanza dei pixel, e pu? confrontare la differenza con almeno un valore di soglia. Per esempio, in una forma di attuazione, il procedimento verifica per la coppia di pixel se la differenza assoluta tra i valori di luminanza dei pixel ? inferiore a una data soglia, e: For example, in one embodiment, the process can? calculating, in step 3010, the difference between the values of the respective pixels of the blocks in the first and second images, e.g. the difference between the luminance values of the pixels, and can? compare the difference with at least one threshold value. For example, in one embodiment, the method checks for the pair of pixels whether the absolute difference between the luminance values of the pixels? below a given threshold, and:

- nel caso in cui la differenza assoluta sia inferiore alla soglia, il pixel ? mantenuto, o - if the absolute difference is less than the threshold, the pixel? maintained, or

- nel caso in cui la differenza assoluta sia superiore o uguale alla soglia, il pixel ? rimosso. - if the absolute difference is greater than or equal to the threshold, the pixel? removed.

In varie forme di attuazione, invece di usare la differenza tra i valori di luminanza, ? usata una somma delle differenze assolute tra i valori di colore, come per es. una somma delle differenze assolute tra i valori di colore di RGB. In various embodiments, instead of using the difference between the luminance values,? used a sum of the absolute differences between color values, such as eg. a sum of the absolute differences between the RGB color values.

In seguito, il procedimento pu? verificare, in una fase di verifica 3012, se deve essere effettuata una seconda operazione di mascheramento per il pixel corrente. Later, the procedure can? verifying, in a verification step 3012, whether a second masking operation is to be carried out for the current pixel.

Nel caso in cui debba essere effettuato un ulteriore mascheramento (uscita Y della fase di verifica 3012), il procedimento applica, in una fase 3014, una seconda maschera, per es. la maschera doppia . In the event that a further masking is to be carried out (output Y of the verification step 3012), the method applies, in a step 3014, a second mask, e.g. the double mask.

Per esempio, in una forma di attuazione, il procedimento pu? calcolare, nella fase 3014, la differenza tra il valore del rispettivo pixel e il valore del pixel centrale del blocco. Per esempio, pu? essere calcolata la differenza tra i valori di luminanza dei pixel o pu? essere usata preferibilmente la somma delle differenze assolute tra i valori di colore, per es. i valori di un immagine RGB. Di nuovo questa differenza, la differenza assoluta o la somma delle differenze assolute, pu? essere confrontata con almeno un valore di soglia, e per es.: For example, in one embodiment, the process can? calculating, in step 3014, the difference between the value of the respective pixel and the value of the central pixel of the block. For example, it can? be calculated the difference between the luminance values of the pixels or pu? the sum of the absolute differences between the color values, e.g. the values of an RGB image. Again this difference, the absolute difference or the sum of the absolute differences, can? be compared with at least one threshold value, and for example:

- nel caso in cui la differenza assoluta sia inferiore alla soglia, il pixel ? mantenuto, o - if the absolute difference is less than the threshold, the pixel? maintained, or

- nel caso in cui la differenza assoluta sia superiore o uguale alla soglia, il pixel ? rimosso. - if the absolute difference is greater than or equal to the threshold, the pixel? removed.

Anche in questo caso, i pixel da rimuovere possono essere identificati impostando il valore nella schiera di informazioni di controllo al secondo valore, per es. al valore logico 0 . Again, the pixels to be removed can be identified by setting the value in the control information array to the second value, e.g. to the logical value 0.

Generalmente, le seconde operazioni di mascheramento descritte in precedenza possono essere effettuate per il blocco di pixel della prima e/o della seconda immagine. Tuttavia, ? preferibile effettuare la seconda operazione di mascheramento descritta in precedenza soltanto sull immagine di riferimento. In effetti, come menzionato in precedenza, i criteri di maschera singola e i criteri di maschera doppia possono essere calcolati in modo indipendente e potrebbe essere usata un operazione logica di AND per determinare la maschera combinata finale. Cos?, in questo caso, i criteri di maschera doppia potrebbero essere calcolati soltanto una volta per un dato pixel candidato nell immagine di riferimento, e dovrebbero essere calcolati soltanto i criteri di maschera singola per l intervallo di pixel selezionato nella seconda immagine. Generally, the second masking operations described above can be carried out for the block of pixels of the first and / or second image. However, ? it is preferable to carry out the second masking operation described above only on the reference image. In fact, as mentioned earlier, single mask criteria and double mask criteria can be calculated independently and a logical AND operation could be used to determine the final combined mask. Thus, in this case, the double mask criteria could only be calculated once for a given candidate pixel in the reference image, and only the single mask criteria for the selected pixel range in the second image should be calculated.

Una volta che l una o pi? maschere sono state applicate al pixel corrente del blocco (cio? uscita N della fase di verifica 3012 o direttamente dopo la seconda operazione di mascheramento nella fase 3014), il procedimento verifica, in una fase 3016, se il pixel ? stato l ultimo pixel del blocco di pixel. Once there is one or more? masks have been applied to the current pixel of the block (i.e. output N of the verification step 3012 or directly after the second masking operation in step 3014), the method verifies, in a step 3016, whether the pixel? state the last pixel of the pixel block.

Nel caso in cui il pixel non sia stato l ultimo pixel nel blocco di pixel (uscita N della fase di verifiche 3016), il procedimento seleziona il pixel successivo del blocco, in una fase 3018, e ripete le operazioni di mascheramento nella fase 3010. If the pixel was not the last pixel in the pixel block (output N of the verification step 3016), the method selects the next pixel of the block, in a step 3018, and repeats the masking operations in step 3010.

Al contrario, nel caso in cui il pixel sia stato l ultimo pixel nel blocco di pixel (uscita Y della fase di verifiche 3016), il procedimento procede a una fase 3020 per effettuare l operazione di adattamento. On the contrary, in the case in which the pixel has been the last pixel in the pixel block (output Y of the verification step 3016), the procedure proceeds to a step 3020 to carry out the adaptation operation.

In varie forme di attuazione, il procedimento calcola, nella fase 3020, una funzione di costo prendendo in considerazione soltanto i pixel che non sono stati rimossi dalle operazioni di mascheramento. Generalmente, a questo scopo potrebbe essere usata qualsiasi funzione di costo dell adattamento di blocco, per esempio quelle rappresentate nella Tabella 1 dell articolo di riferimento precedente A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms a nome di Scharstein et al., come una differenza quadratica, una correlazione incrociata, una differenza assoluta, basata sul gradiente, ecc. In various embodiments, the method calculates, in step 3020, a cost function taking into consideration only the pixels that have not been removed by the masking operations. Generally, any block adaptation cost function could be used for this purpose, for example those represented in Table 1 of the previous reference article A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms on behalf of Scharstein et al., Such as a quadratic difference, a cross correlation, an absolute difference, based on the gradient, etc.

In varie forme di attuazione, il blocco che ha attualmente il migliore adattamento nella seconda immagine per il pixel candidato corrente nella prima immagine ? memorizzato nella fase 3020, per es. il blocco per il quale ? stato ottenuto il pi? piccolo risultato del calcolo della funzione di costo. Per esempio, il migliore risultato corrente del calcolo della funzione di costo pu? essere memorizzato e, nel caso in cui il calcolo corrente delle funzioni di costo fornisca un risultato inferiore, il blocco memorizzato pu? essere sostituito con il blocco di pixel corrente o in generale con un segnale che permette di identificare questo blocco di pixel, come la colonna (ed eventualmente la riga) associata al pixel centrale del blocco. Inoltre, come sar? descritto in un maggior dettaglio nel seguito, la fase di adattamento pu? non selezionare soltanto il blocco che ha il migliore adattamento, ma pu? fornire una pluralit? di blocchi candidati o di rispettivi pixel candidati nella seconda immagine che hanno un basso errore. In various embodiments, the block that currently has the best fit in the second image for the current candidate pixel in the first image? stored in step 3020, e.g. the block for which? been obtained the pi? small result of the calculation of the cost function. For example, the best current result of calculating the cost function may be be stored and, in the event that the current calculation of the cost functions gives a lower result, the stored block can? be replaced with the current block of pixels or in general with a signal that makes it possible to identify this block of pixels, such as the column (and possibly the row) associated with the central pixel of the block. Also, what will it be like? described in greater detail below, the adaptation phase can? not only select the block that has the best fit, but can? provide a plurality? of candidate blocks or respective candidate pixels in the second image that have a low error.

In seguito, il procedimento verifica, in una fase 3022, se il blocco di pixel corrente ? stato l ultimo blocco nella riga di pixel della seconda immagine. Next, the method checks, in a step 3022, whether the current pixel block? been the last block in the pixel row of the second image.

Nel caso in cui il rispettivo pixel centrale non sia stato l ultimo pixel nella riga di pixel (uscita N della fase di verifiche 3022), il procedimento seleziona, in una fase 3024, il pixel successivo della riga nella seconda immagine e il procedimento procede alla fase 3004, cio? le fasi precedenti sono ripetute per tutti i pixel che appartengono alla stessa riga nella seconda immagine. In the event that the respective central pixel was not the last pixel in the pixel row (output N of the verification step 3022), the procedure selects, in a step 3024, the next pixel of the row in the second image and the procedure proceeds to phase 3004, that is? the previous steps are repeated for all the pixels belonging to the same row in the second image.

Nel caso in cui il pixel sia stato l ultimo pixel nel blocco di pixel (uscita Y della fase di verifiche 3022), il procedimento procede a una fase di verifica 3026. In the event that the pixel was the last pixel in the pixel block (output Y of the verification step 3022), the procedure proceeds to a verification step 3026.

Sostanzialmente, il procedimento verifica, nella fase 3026, se tutti i pixel candidati sono stati elaborati. Basically, the procedure checks, in step 3026, if all the candidate pixels have been processed.

Cos?, nel caso in cui il pixel candidato non sia stato l ultimo pixel candidato (uscita N della fase di verifiche 3026), il procedimento seleziona, in una fase 3028, il primo pixel della riga nella seconda immagine e il successivo pixel candidato. Thus, in the case in which the candidate pixel was not the last candidate pixel (output N of the verification step 3026), the procedure selects, in a step 3028, the first pixel of the row in the second image and the subsequent candidate pixel.

Al contrario, nel caso in cui il pixel candidato sia stato l ultimo pixel candidato (uscita Y della fase di verifiche 3028), la fase di adattamento termina in una fase di arresto 3030. On the contrary, if the candidate pixel was the last candidate pixel (output Y of the verification step 3028), the adaptation step ends in a stop step 3030.

Cos?, nella forma di attuazione considerata, l operazione di adattamento nella fase 3022 ? effettuata per lo stesso blocco di pixel attualmente elaborato dall operazione di mascheramento nella fase 3008. Tuttavia, generalmente, l operazione di adattamento potrebbe anche essere effettuata in modo indipendente dall operazione di mascheramento. So, in the embodiment considered, the adaptation operation in step 3022? carried out for the same block of pixels currently processed by the masking operation in step 3008. However, generally, the matching operation could also be carried out independently of the masking operation.

Le Figure da 8a a 8c rappresentano a questo riguardo possibili immagini di mappe di profondit? delle immagini rappresentate nelle Figure 1a e 1b, in cui ? stata applicata rispettivamente nessuna maschera, la maschera singola e la combinazione di una maschera singola e di una maschera doppia. Figures 8a to 8c represent in this regard possible images of depth maps? of the images represented in Figures 1a and 1b, in which? No mask, single mask, and the combination of a single mask and a double mask were applied, respectively.

Fase di filtraggio Filtering phase

Come menzionato in precedenza, in varie forme di attuazione, la fase di adattamento 2008 non seleziona semplicemente il blocco che ha il migliore adattamento nella seconda immagine, come usuale per i procedimenti locali, ma molteplici blocchi candidati con un basso errore sono associati a ciascun pixel candidato ed elaborati dallo stadio di filtro 2014. As mentioned above, in various embodiments, the 2008 matching step does not simply select the block that has the best fit in the second image, as is usual for local processes, but multiple candidate blocks with a low error are associated with each pixel. candidate and processed by the 2014 filter stage.

Generalmente, il numero dei pixel nella seconda immagine associati a ciascun pixel candidato nell immagine di riferimento pu? essere fisso o variabile. Per esempio, possono essere selezionate solo quelle coppie di pixel per le quali il rispettivo risultato della funzione di costo ? inferiore a una data soglia. Per esempio, in varie forme di attuazione, questo valore di soglia e/o un numero massimo di coppie di pixel sono configurabili. Generally, the number of pixels in the second image associated with each candidate pixel in the reference image can? be fixed or variable. For example, only those pairs of pixels can be selected for which the respective result of the cost function? below a given threshold. For example, in various embodiments, this threshold value and / or a maximum number of pixel pairs are configurable.

In varie forme di attuazione, ? usato uno stadio di filtro di minima energia locale di disparit? (DLEM, Disparity Local Energy Min ) per la selezione finale e anche per una rimozione dei valori anomali. In various embodiments,? used a filter stage of minimum local energy of disparity? (DLEM, Disparity Local Energy Min) for final selection and also for a removal of outliers.

In varie forme di attuazione, il filtro ? basato sulla seguente funzione di energia: In various embodiments, the filter? based on the following energy function:

E(d) = Edata(d) Esmooth(d) E (d) = Edata (d) Esmooth (d)

Specificamente, in varie forme di attuazione, il calcolo dell equazione precedente ? suddiviso in due funzioni di costo separate: Specifically, in various embodiments, the calculation of the previous equation? split into two separate cost functions:

E1(d) = Edata(d) E1 (d) = Edata (d)

E2(d) = Esmooth(d) E2 (d) = Esmooth (d)

In varie forme di attuazione, la prima funzione di costo E1(d) ? usata durante la fase di adattamento, per es. durante la fase 3020 rappresentata nella Figura 7. Cos?, la fase di adattamento 2008 fornisce una pluralit? di possibili soluzioni che rappresentano i blocchi di pixel pi? simili tra le due immagini, cio? alla fine dell adattamento molteplici pixel candidati nella seconda immagine sono associati a ciascun pixel dell immagine di riferimento o al sottoinsieme di pixel nel caso in cui sia stato effettuato un preadattamento o un altra operazione per ridurre il numero di pixel usati durante la fase di adattamento. In various embodiments, the first cost function E1 (d)? used during the adaptation phase, eg. during the 3020 phase depicted in Figure 7. So, the 2008 adaptation phase provides a plurality of of possible solutions that represent the blocks of pixels pi? similar between the two images, that is? at the end of the adaptation, multiple candidate pixels in the second image are associated with each pixel of the reference image or with the subset of pixels if a pre-adaptation or other operation has been carried out to reduce the number of pixels used during the adaptation step.

Al contrario, la seconda funzione di costo ? usata durante la fase di filtro 2014 per definire un peso per la funzione di costo finale. Specificamente, in varie forme di attuazione, lo stadio di filtro modifica il risultato della prima funzione di costo E1(d) e seleziona la migliore associazione per ciascun pixel. Per esempio, pu? essere selezionata la coppia di pixel che ha il pi? piccolo valore della funzione di costo modificata. Conversely, the second cost function? used during the 2014 filter phase to define a weight for the final cost function. Specifically, in various embodiments, the filter stage modifies the result of the first cost function E1 (d) and selects the best association for each pixel. For example, it can? be selected the pair of pixels that has the pi? small value of the modified cost function.

In varie forme di attuazione, una rimozione dei valori anomali pu? essere effettuata prima che sia fatta la selezione finale al fine di ridurre il rischio di selezioni erronee. Per esempio, una tale rimozione dei valori anomali pu? essere effettuata in base a valori vicini di disparit?. In various embodiments, a removal of the outliers can? be made before the final selection is made in order to reduce the risk of erroneous selections. For example, such a removal of the outliers can? be carried out on the basis of close values of disparity.

Per esempio, in una forma di attuazione, l immagine ? divisa in tile quadrati, come blocchi di 32 x 32 o di 16 x 16 pixel. Per esempio, la Figura 9 rappresenta un esempio nel quale l operazione di divisione in tile ( tiling ) ? stata applicata all immagine di riferimento della Figura 1b. Per esempio, nella Figura 9 ? evidenziato uno dei tile TIL. For example, in one embodiment, the image? divided into square tiles, such as blocks of 32 x 32 or 16 x 16 pixels. For example, Figure 9 represents an example in which the tiling operation? applied to the reference image of Figure 1b. For example, in Figure 9? highlighted one of the TIL tiles.

Nella forma di attuazione considerata, ? costruito un istogramma di disparit? per ciascun tile TIL soltanto con i valori di disparit? dei candidati che appartengono al rispettivo tile. In the embodiment considered,? built a histogram of disparity? for each tile TIL only with the disparity values? of candidates belonging to the respective tile.

Per esempio, la Figura 10a rappresenta schematicamente il tile TIL della Figura 9, che include per es. un blocco di 10 x 10 pixel. Specificamente, a ciascun pixel PX del tile TIL ? associato un numero di pixel candidati e, come menzionato in precedenza, il numero di pixel candidati potrebbe essere fisso o variabile. Inoltre, a ciascuna coppia di pixel ? associato un valore di disparit? o di profondit? d. For example, Figure 10a schematically represents the TIL tile of Figure 9, which includes e.g. a block of 10 x 10 pixels. Specifically, to each pixel PX of the TIL tile? associated with a number of candidate pixels and, as previously mentioned, the number of candidate pixels could be fixed or variable. Also, at each pair of pixels? associated with a value of disparity? or depth? d.

Questi valori di disparit? o di profondit? d per ciascun pixel PX sono usati per costruire un istogramma di disparit?. Specificamente, l istogramma rappresenta le occorrenze del valore di disparit? o di profondit? d per tutti i pixel nel tile TIL. Per esempio, nel caso in cui 4 pixel candidati fossero associati a ciascun pixel PX del tile di 10 x 10 TIL, nell istogramma sarebbero distribuiti un totale di 400 valori. Cos?, l istogramma di disparit? per tile permette di scoprire i valori anomali. In effetti, anche quando un adattamento ? molto buono da un punto di vista della similarit?, l associazione potrebbe non essere quella corretta. In effetti, come rappresentato nella Figura 10b, ? possibile riconoscere come valori anomali i candidati con poche occorrenze nell istogramma. These values of disparity? or depth? d for each pixel PX are used to construct a histogram of disparity. Specifically, the histogram represents occurrences of the disparity value? or depth? d for all pixels in the TIL tile. For example, if 4 candidate pixels were associated with each pixel PX of the 10 x 10 TIL tile, a total of 400 values would be distributed in the histogram. So, the histogram of disparity? per tile allows you to discover outliers. Indeed, even when an adaptation? very good from a similarity point of view, the association may not be the correct one. In fact, as depicted in Figure 10b,? Candidates with few occurrences in the histogram can be recognized as outliers.

Nella forma di attuazione considerata, l istogramma ? quindi usato per modificare i risultati della funzione di costo calcolata durante la fase di adattamento. Per esempio, in una forma di attuazione, le occorrenze occ(d) sono usate come il peso inverso della funzione di costo. Di conseguenza, occorrenze elevate diminuiscono la funzione di costo, cos? anche un valore di costo originale non minimo potrebbe vincere: In the embodiment considered, the histogram? then used to modify the results of the cost function calculated during the fitting phase. For example, in one embodiment, occurrences occ (d) are used as the inverse weight of the cost function. Consequently, high occurrences decrease the cost function, so? even a non-minimal original cost value could win:

E 1 (d) E 1 (d)

E 2 (d) E 2 (d)

occ(d) occ (d)

Di conseguenza, nella forma di attuazione considerata, durante la fase di adattamento sono determinati, per una data coppia di pixel, un valore di disparit? d e una rispettiva funzione di costo E1(d). Al contrario, durante la fase di filtraggio ? determinata l occorrenza occ(d) del valore di disparit? d nell intero tile TIL associato al rispettivo pixel, e l occorrenza occ(d) del valore di disparit? d ? usata per ponderare la funzione di costo iniziale. Consequently, in the embodiment considered, during the adaptation step a disparity value is determined for a given pair of pixels. d and a respective cost function E1 (d). On the contrary, during the filtering phase? determined the occurrence occurrence (d) of the disparity value? d in the entire TIL tile associated with the respective pixel, and the occurrence (d) of the disparity value? d? used to weight the initial cost function.

Per esempio, considerando l esempio di un caso in cui 4 pixel candidati che hanno i seguenti valori di disparit? siano associati a un pixel nell immagine di riferimento: For example, considering the example of a case where 4 candidate pixels that have the following disparity values? are associated with a pixel in the reference image:

- la prima coppia di pixel ha una disparit? d = 4 e una funzione di costo E1 = 20; - the first pair of pixels has a disparity? d = 4 is a cost function E1 = 20;

- la seconda coppia di pixel ha una disparit? d = 5 e una funzione di costo E1 = 30; - the second pair of pixels has a disparity? d = 5 and a cost function E1 = 30;

- la terza coppia di pixel ha una disparit? d = 6 e una funzione di costo E1 = 15; e - the third pair of pixels has a disparity? d = 6 and a cost function E1 = 15; And

- la quarta coppia di pixel ha una disparit? d = 7 e una funzione di costo E1 = 25, - the fourth pair of pixels has a disparity? d = 7 is a cost function E1 = 25,

il valore di disparit? d = 6 avrebbe il pi? piccolo valore per la funzione di costo E1. the value of disparity? d = 6 would have the pi? small value for the cost function E1.

Ora, si considera che l istogramma per il rispettivo tile mostrerebbe le seguenti occorrenze per i valori di disparit? d summenzionati: Now, consider that the histogram for the respective tile would show the following occurrences for the disparity values? d above:

- occ(4) = 4; - occ (4) = 4;

- occ(5) = 2; - occ (5) = 2;

- occ(6) = 5; e - occ (6) = 5; And

- occ(7) = 25. - occ (7) = 25.

Di conseguenza, la funzione di costo modificata avrebbe come risultato finale: Consequently, the modified cost function would have as a final result:

- E2(4) = 20/4 = 5; - E2 (4) = 20/4 = 5;

- E2(5) = 30/2 = 15; - E2 (5) = 30/2 = 15;

- E2(6) = 15/5 = 3; e - E2 (6) = 15/5 = 3; And

- E2(7) = 25/25 = 1. - E2 (7) = 25/25 = 1.

Cos?, lo stadio di filtro selezionerebbe in effetti la quarta coppia di pixel con il valore di disparit? d = 7, che ha il pi? piccolo valore per la funzione di costo modificata. So, the filter stage would actually select the fourth pair of pixels with the disparity value. d = 7, which has the pi? small value for the modified cost function.

Per esempio, le Figure 11a e 11b rappresentano rispettivamente immagini di mappe di profondit? possibili delle immagini rappresentate nelle Figure 1a e 1b, in cui ? stato selezionato soltanto il blocco che ha il migliore adattamento o ? stato applicato il filtro di DLEM descritto in precedenza. For example, Figures 11a and 11b represent images of depth maps, respectively. possible of the images represented in Figures 1a and 1b, in which? only the block that has the best fit has been selected or? the DLEM filter described above has been applied.

Cos?, nella forma di attuazione considerata, non ? richiesto definire un valore di per la funzione di energia globale. In effetti, di solito, ? difficile stabilire il valore di Edata(d) ed Esmooth(d) di solito hanno differenti ordini di misurazioni. So, in the embodiment considered, it is not? required to define a value of for the global energy function. In fact, usually,? difficult to establish the value of Edata (d) and Esmooth (d) usually have different orders of measurements.

In una forma di attuazione, l istogramma di disparit? non ? generato semplicemente per il tile TIL corrente, ma un area allargata EA ? usata a questo scopo. Per esempio, come rappresentato nella Figura 9, i tile TIL possono essere blocchi di 16 x 16 pixel, ma per ciascun tile pu? essere usato un blocco EA pi? grande, come un blocco di 32 x 32 pixel, che ? usato per determinare l istogramma di disparit?. Specificamente, quest area allargata ? usata soltanto per calcolare, tramite l istogramma, le occorrenze dei valori di disparit? d, ma la selezione finale ? effettuata soltanto per i pixel del tile TIL pi? piccolo. Inoltre, nel caso estremo, anche le dimensioni del tile potrebbero essere impostate a 1 x 1, cio? per ciascun pixel potrebbe essere determinato un rispettivo istogramma in base ai pixel circostanti. In one embodiment, the histogram of disparity? Not ? simply generated for the current TIL tile, but an EA enlarged area? used for this purpose. For example, as shown in Figure 9, TIL tiles can be blocks of 16 x 16 pixels, but for each tile it can be. be used a block EA pi? large, like a 32 x 32 pixel block, which? used to determine the disparity histogram. Specifically, this enlarged area? used only to calculate, through the histogram, the occurrences of the disparity values? d, but the final selection? carried out only for the pixels of the tile TIL pi? small. Also, in the extreme case, the tile size could also be set to 1 x 1, that is? for each pixel a respective histogram could be determined based on the surrounding pixels.

Cos?, nella forma di attuazione considerata, l operazione di adattamento seleziona una pluralit? di pixel candidati nella seconda immagine che si adattano meglio al pixel di riferimento e a ciascun pixel candidato ? associato un rispettivo valore della funzione di costo e un rispettivo valore di disparit?. In seguito, l operazione di filtraggio di DLEM seleziona, per ciascun pixel di riferimento, un rispettivo pixel candidato migliore tra la pluralit? di pixel candidati nella seconda immagine. Specificamente, il filtro di DLEM seleziona una pluralit? di pixel nelle vicinanze del pixel di riferimento, cio? il tile TIL o l area allargata EA. In seguito, il filtro di DLEM determina le occorrenze occ(d) dei valori di disparit? d associati ai pixel candidati dei pixel nelle vicinanze del pixel di riferimento. Infine, il filtro di DLEM seleziona il pixel candidato nella seconda immagine in funzione del rispettivo valore della funzione di costo associato a ciascun pixel candidato e l occorrenza occ(d) dei rispettivi valori di disparit? (d) associati al pixel candidato. Thus, in the embodiment considered, the adaptation operation selects a plurality of number of candidate pixels in the second image that best match the reference pixel and each candidate pixel? associated with a respective value of the cost function and a respective disparity value. Subsequently, the DLEM filtering operation selects, for each reference pixel, a respective best candidate pixel among the plurality. of candidate pixels in the second image. Specifically, the DLEM filter selects a plurality of of pixels in the vicinity of the reference pixel, that is? the TIL tile or the EA enlarged area. Then, the DLEM filter determines the occurrences occ (d) of the disparity values? d associated with the candidate pixels of the pixels in the vicinity of the reference pixel. Finally, the DLEM filter selects the candidate pixel in the second image as a function of the respective value of the cost function associated with each candidate pixel and the occurrence (d) of the respective disparity values? (d) associated with the candidate pixel.

Generalmente, invece di generare un singolo istogramma per i valori di Luma, cio? i valori della scala del grigio, ? anche possibile effettuare una segmentazione dei colori che fornisca molteplici istogrammi, uno per ciascun colore. Generally, instead of generating a single histogram for the Luma values, that is? the values of the gray scale,? It is also possible to perform a color segmentation that provides multiple histograms, one for each color.

In questo caso, anche il peso e la selezione potrebbero essere differenti per ciascun colore. In this case, the weight and selection may also be different for each color.

Fase di raffinamento Refinement phase

In varie forme di attuazione, il procedimento pu? perfezionare l immagine di una mappa di profondit? finale nella fase di raffinamento 2016. In various forms of implementation, the procedure can? refine the image of a depth map? final in the refinement phase 2016.

Per esempio, di solito, dopo la fase di adattamento 2008 o dopo la fase di filtro 2014 ciascun pixel di sinistra ? associato soltanto a un pixel di destra, ma questo pu? non essere sempre vero nella direzione opposta. In effetti, molteplici pixel di sinistra potrebbero essere associati a un pixel dell immagine di destra. For example, usually after the 2008 adaptation phase or after the 2014 filter phase each pixel on the left? associated only with a pixel on the right, but this can? not always be true in the opposite direction. In fact, multiple left pixels could be associated with one pixel of the right image.

Generalmente, questo problema potrebbe essere evitato effettuando anche un adattamento dell immagine di destra sull immagine di sinistra. Generally, this problem could be avoided by also fitting the right image onto the left image.

Al contrario, in una forma di attuazione, ? applicato un test univoco per scoprire molteplici associazioni e usando la funzione di costo della fase di adattamento 2012 (o eventualmente la funzione di costo modificata durante la fase di filtro 2014) per determinare la migliore associazione tra i pixel di sinistra e quelli di destra. Conversely, in one embodiment,? applied a unique test to discover multiple associations and using the cost function of the 2012 adaptation phase (or possibly the cost function modified during the 2014 filter phase) to determine the best association between the left and right pixels.

Inoltre, in varie forme di attuazione, pu? essere effettuato un riempimento dei buchi e/o una regolazione dei confini. Furthermore, in various forms of implementation, it can? hole filling and / or boundary adjustment be carried out.

Sostanzialmente, durante questa operazione di raffinamento possono essere riempiti gli ultimi pixel non adattati. Per esempio, il colore dei pixel vicini pu? essere considerato per associare la stessa profondit? a pixel simili. Si pu? anche testare se c ? un divario ( gap ) di profondit? elevato e un colore differente. Per esempio, in questo caso pu? essere preso il pi? piccolo valore per gestire le occlusioni. Nel caso opposto, pu? essere applicata un interpolazione lineare. Infine, anche il pixel che ha gi? associato un valore di profondit? pu? essere regolato con gli stessi criteri. Basically, the last unfit pixels can be filled during this refinement operation. For example, the color of neighboring pixels can? be considered to associate the same depth? similar pixels. Can you? also test if c? a gap (gap) of depth? high and a different color. For example, in this case it can? be taken the pi? small value to manage occlusions. In the opposite case, can it? linear interpolation be applied. Finally, even the pixel that already has? associated with a depth value? can be regulated with the same criteria.

Per esempio, la Figura 1c rappresenta un possibile risultato dell immagine di una mappa di profondit? dopo la fase di raffinamento 2016. For example, Figure 1c represents a possible result of a depth map image? after the 2016 refinement phase.

Miglioramenti della velocit? di elaborazione Speed improvements processing

Uno dei problemi principali della generazione di mappe di profondit? ? la velocit? di elaborazione, che pu? essere critica per le applicazioni in tempo reale. I procedimenti descritti in precedenza, mentre permettono la generazione di immagini di profondit? di alta qualit?, comprendono gi? meccanismi che permettono di ridurre il tempo di elaborazione, come la fase di preadattamento 2010 che riduce il numero di pixel candidati, e la possibilit? di eseguire varie operazioni in parallelo, come per es. il preadattamento 2010 e l operazione di adattamento 2012. One of the main problems of the generation of depth maps? ? the speed? processing, which can? be critical for real-time applications. The procedures described above, while they allow the generation of images of depth? of high quality, already include? mechanisms that allow to reduce the processing time, such as the 2010 pre-adaptation phase which reduces the number of candidate pixels, and the possibility? to perform various operations in parallel, such as for example. the 2010 pre-adaptation and the 2012 adaptation operation.

Inoltre, l articolo A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms citato in precedenza descrive vari altri procedimenti per migliorare la velocit? di elaborazione, che potrebbero essere combinati con i procedimenti qui descritti. Per esempio, le immagini originali IMG potrebbero essere ridotte di scala e la mappa di profondit? DMI stimata potrebbe essere aumentata di scala di nuovo. Inoltre, potrebbe essere usato un approccio piramidale, nel quale le immagini IMG sono ridotte di scala varie volte in modo da avere livelli piramidali, che rappresentano versioni della stessa immagine con differenti risoluzioni. Quindi, l operazione di adattamento 2008 potrebbe essere ripetuta per tutti i livelli piramidali iniziando dalla pi? piccola immagine fino alla pi? grande in modo da avere una mappa di profondit? con una precisione superiore. In questo caso, la velocit? di elaborazione pu? essere migliorata prendendo in considerazione il risultato dell operazione di adattamento dello strato precedente, come limitando le operazioni di adattamento soltanto a un intervallo di pixel in prossimit? del pixel (o dei pixel) trovato per l operazione di adattamento di livello inferiore. In addition, the A Taxonomy and Evaluation of Dense Two-Frame Stereo Correspondence Algorithms cited earlier describes various other procedures for improving speed. processing, which could be combined with the processes described here. For example, the original IMG images could be reduced in scale and the depth map? Estimated DMI could be scaled again. Also, a pyramid approach could be used, in which IMG images are scaled several times to have pyramidal levels, which represent versions of the same image at different resolutions. Therefore, the 2008 adaptation operation could be repeated for all pyramid levels starting from the pi? small image up to the pi? large in order to have a depth map? with superior accuracy. In this case, the speed? processing can? be improved by taking into account the result of the adaptation operation of the previous layer, such as limiting the adaptation operations to only a range of pixels in the vicinity? of the pixel (s) found for the lower level fitting operation.

La Figura 12 rappresenta a questo riguardo una forma di attuazione di un nuovo procedimento per stimare un immagine di profondit? che permette di ridurre la velocit? di elaborazione. Figure 12 represents in this regard an embodiment of a new procedure for estimating a depth image. that allows you to reduce the speed? processing.

Sostanzialmente, la forma di attuazione ? basata sull architettura generale di un processo di stima di un immagine di profondit? descritto rispetto alla Figura 4. Cos?, il procedimento pu? comprendere anche in questo caso una fase di acquisizione dell immagine 2002, una fase di impostazione 2004 e una fase di rettificazione 2006, e tutte o parte di queste operazioni potrebbero essere effettuate direttamente dalla videocamera 10 o durante una preelaborazione off-line. Basically, the form of implementation? based on the general architecture of a process of estimating a depth image? described with respect to Figure 4. So, the procedure can? also in this case comprising an image acquisition phase 2002, a setting phase 2004 and a rectification phase 2006, and all or part of these operations could be carried out directly by the video camera 10 or during an off-line preprocessing.

Tuttavia, nella forma di attuazione considerata, la fase di adattamento 2008 non ? effettuata su tutti i pixel, ma soltanto per un sottoinsieme di pixel nell immagine di riferimento, cio? un numero ridotto di campioni. Di conseguenza, una tale operazione di campionamento ? differente da una semplice operazione di riduzione di scala, perch? l operazione di campionamento riduce il numero di pixel soltanto per l immagine di riferimento, per es. l immagine di sinistra, mentre il numero di pixel della seconda immagine rimane invariato. However, in the form of implementation considered, the 2008 adaptation phase is not? carried out on all the pixels, but only for a subset of pixels in the reference image, that is? a small number of samples. Consequently, such a sampling operation? different from a simple scaling operation, why? the sampling operation reduces the number of pixels only for the reference image, eg. the left image, while the number of pixels of the second image remains unchanged.

Di conseguenza, ? introdotta una fase di campionamento 2020 prima della fase di adattamento 2008, durante la quale ? effettuata un operazione di campionamento. Consequentially, ? introduced a 2020 sampling phase before the 2008 adaptation phase, during which? performed a sampling operation.

La Figura 13 rappresenta a questo riguardo una possibile forma di attuazione dell operazione di campionamento 2020. Figure 13 represents in this regard a possible form of implementation of the 2020 sampling operation.

Specificamente, nella forma di attuazione rappresentata nella Figura 13, sono supportati due procedimenti di campionamento, che potrebbero tuttavia anche essere usati in modo indipendente: Specifically, in the embodiment represented in Figure 13, two sampling methods are supported, which could however also be used independently:

- un campionamento fisso; e - a fixed sampling; And

- un campionamento adattativo. - adaptive sampling.

Specificamente, dopo una fase di inizio 4000, il procedimento verifica, in una fase di verifica 4002, se deve essere effettuato un campionamento fisso o un campionamento adattativo. Specifically, after an initiation step 4000, the process verifies, in a verification step 4002, whether fixed sampling or adaptive sampling is to be performed.

Nel caso in cui debba essere effettuato un campionamento fisso (uscita Y della fase di verifiche 4002), il procedimento procede a una fase di campionamento fisso 4004. In case a fixed sampling is to be performed (output Y of the verification phase 4002), the procedure proceeds to a fixed sampling phase 4004.

Sostanzialmente, durante la fase 4004, l immagine ? divisa in blocchi di pixel che hanno una data dimensione sh x sv, come un quadrato di N x N pixel, e in cui soltanto un pixel di ciascun blocco, come il pixel centrale, ? usato per l operazione di adattamento 2008. Per esempio, la fase 4004 pu? essere implementata selezionando soltanto ciascuna sv-esima riga dell immagine e, per ciascuna riga selezionata, ? selezionato soltanto ciascun sh-esimo pixel (cio? colonna). Di conseguenza, nel procedimento di campionamento fisso, di solito ? selezionata una schiera fissa o una griglia regolare di pixel. Basically, during phase 4004, the image? divided into blocks of pixels that have a given size sh x sv, such as a square of N x N pixels, and in which only one pixel of each block, such as the central pixel,? used for the 2008 fitting operation. For example, step 4004 can? be implemented by selecting only each sv-th row of the image and, for each selected row,? selected only each sh-th pixel (ie column). Consequently, in the fixed sampling procedure, usually? a fixed array or regular pixel grid is selected.

Al contrario, nel caso in cui debba essere effettuato un campionamento adattativo (uscita N della fase di verifiche 4002), il procedimento procede a una fase di campionamento adattativo 4006. Conversely, in the event that adaptive sampling is to be performed (output N of the verification phase 4002), the procedure proceeds to an adaptive sampling phase 4006.

Specificamente, durante il campionamento adattativo, il passo di campionamento in almeno una direzione di campionamento non ? fisso, ma variabile. Specifically, during adaptive sampling, the sampling step in at least one sampling direction is not? fixed, but variable.

Nella forma di attuazione considerata, al fine di determinare il passo di campionamento, ? applicato un procedimento di estrazione dei contorni all immagine di riferimento in una fase 4008. Per esempio, in una forma di attuazione pu? essere usato un Filtro di Sobel per ottenere il comportamento di gradiente di YUV. In effetti, preferibilmente sono considerati tutti i canali, perch? in questo modo il filtro pu? essere applicato a ciascun canale e quindi pu? essere preso il pi? alto gradiente per ciascun pixel. In questo modo, pu? essere rilevata la maggioranza dei contorni anche quando i valori di Lume, cio? i valori della scala del grigio, genererebbero soltanto un basso gradiente. Per esempio, la Figura 15a rappresenta un esempio dell immagine della Figura 1a dopo l uso di un Filtro di Sobel. In the embodiment considered, in order to determine the sampling step,? applied a method of extracting the contours to the reference image in a step 4008. For example, in one embodiment it can be used. be used a Sobel filter to obtain the gradient behavior of YUV. In fact, preferably all channels are considered, why? in this way the filter can? be applied to each channel and then can? be taken the pi? high gradient for each pixel. In this way, it can? be detected the majority of the contours even when the values of Lume, that is? grayscale values would only generate a low gradient. For example, Figure 15a represents an example of the image of Figure 1a after using a Sobel Filter.

Nella forma di attuazione considerata, pu? quindi essere applicata una quantizzazione dei contorni all immagine filtrata per avere gli elementi distintivi pi? importanti, cio? l immagine ? convertita in un immagine in bianco e nero che ha solo valori di zero e uno. Per esempio, la Figura 15b rappresenta un esempio dell immagine della Figura 15a dopo l operazione di quantizzazione. In the embodiment considered, can? then be applied a quantization of the edges to the filtered image to have the most distinctive elements? important, that is? the image ? converted to a black and white image that has only zero and one values. For example, Figure 15b represents an example of the image of Figure 15a after the quantize operation.

Come menzionato in precedenza, il passo di campionamento in almeno una direzione di campionamento non ? fisso, ma variabile. As mentioned earlier, the sampling step in at least one sampling direction is not? fixed, but variable.

Specificamente, in varie forme di attuazione, il passo di campionamento tra due contorni adiacenti ? fisso per tutti i campioni tra quei due contorni e il passo di campionamento, e cos? il numero di campioni, ? determinato in funzione della distanza tra quei due contorni. Specifically, in various embodiments, the sampling step between two adjacent contours? fixed for all samples between those two contours and the sampling step, and so on? the number of samples,? determined as a function of the distance between those two contours.

Per esempio, nel seguito sar? descritta una forma di attuazione nella quale il passo di campionamento verticale ? fisso e il passo di campionamento orizzontale ? variabile. Di conseguenza, nella forma di attuazione considerata, pu? essere selezionata soltanto ciascuna svesima riga dell immagine di riferimento. Tuttavia, sebbene durante il campionamento fisso anche il campionamento all interno di ciascuna riga sia fisso, il campionamento all interno delle righe pu? ora essere variabile. For example, in the following it will be? described an embodiment in which the vertical sampling step? fixed and the horizontal sampling step? variable. Consequently, in the embodiment considered, can? only each fth row of the reference image be selected. However, although during fixed sampling the sampling within each row is also fixed, the sampling within the rows can be fixed. now be changeable.

Nella forma di attuazione considerata, al fine di determinare il corrente passo di campionamento orizzontale sh, il procedimento determina, in una fase 4010, la distanza dh tra due contorni orizzontali nell immagine elaborata nella fase 4008. In the embodiment considered, in order to determine the current horizontal sampling step sh, the method determines, in a step 4010, the distance dh between two horizontal contours in the image processed in step 4008.

La Figura 14 rappresenta a tale riguardo una riga nell immagine di riferimento che include quattro confini da B1 a B4. Specificamente, nell esempio rappresentato nella Figura 14, le distanze dh tra i confini sono: Figure 14 represents in this respect a row in the reference image which includes four boundaries from B1 to B4. Specifically, in the example represented in Figure 14, the distances dh between the boundaries are:

- dh = 22 tra i confini B1 e B2; - dh = 22 between the borders B1 and B2;

- dh = 9 tra i confini B2 e B3; e - dh = 9 between borders B2 and B3; And

- dh = 4 tra i confini B3 e B4. - dh = 4 between borders B3 and B4.

In seguito, la distanza dh ? confrontata, in una fase 4012, con una data soglia, che pu? corrispondere per es. al valore usato per il campionamento verticale, cio? sv. Thereafter, the distance dh? compared, in a phase 4012, with a given threshold, which can? match eg. to the value used for vertical sampling, that is? sv.

Nel caso in cui la distanza dh rilevata sia minore della data soglia (uscita Y della fase di verifiche 4012), il passo di campionamento sh ? impostato a met? della distanza dh in una fase 4014, cio? If the detected distance dh is less than the given threshold (output Y of the verification phase 4012), the sampling step sh? set in the middle? of the distance dh in a phase 4014, that is?

sh = dh/2 sh = dh / 2

Per esempio, considerando l esempio numerico precedente, la distanza tra i confini B3 e B4 sarebbe 4, e cos? il passo di campionamento tra questi due confini sarebbe impostato a sh = 2, cio? un singolo campione S sarebbe posto al centro tra i confini B3 e B4. For example, considering the previous numerical example, the distance between the boundaries B3 and B4 would be 4, and so? the sampling step between these two boundaries would be set to sh = 2, that is? a single sample S would be placed in the center between the B3 and B4 boundaries.

Al contrario, nel caso in cui la distanza dh rilevata sia uguale o maggiore della data soglia (uscita N della fase di verifiche 4012), il passo di campionamento sh ? impostato, in una fase 4016, alla data soglia, per es. On the contrary, if the detected distance dh is equal to or greater than the given threshold (output N of the verification phase 4012), the sampling step sh? set, in a step 4016, to the given threshold, e.g.

sh = sv sh = sv

Specificamente, in varie forme di attuazione, i primi mod(dh / sh)/2, cio? il resto della divisione di dh per sh diviso per due, pixel sono saltati in questo caso al fine di distribuire meglio i campioni S. Specifically, in various embodiments, the first mod (dh / sh) / 2, ie? the remainder of the division of dh by sh divided by two, pixels are skipped in this case in order to better distribute the samples S.

Di nuovo, considerando l esempio precedente, la distanza tra i confini B1 e B2 sarebbe 22, e cos? il passo di campionamento tra questi due confini sarebbe impostato a sh = sv. Per esempio, nel caso di sh = 5, quattro campioni S sarebbero posti tra i confini B1 e B2 e il primo pixel sarebbe saltato. Similmente, due campioni S sarebbero posti tra i confini B2 e B3 e i primi due pixel sarebbero saltati. Again, considering the previous example, the distance between boundaries B1 and B2 would be 22, and so? the sampling step between these two boundaries would be set to sh = sv. For example, in the case of sh = 5, four samples S would be placed between the boundaries B1 and B2 and the first pixel would be skipped. Similarly, two samples S would be placed between the boundaries B2 and B3 and the first two pixels would be skipped.

In varie forme di attuazione, l operazione di campionamento ? quindi ripetuta sia per i pixel successivi nella riga sia per tutte le righe selezionate. In various embodiments, the sampling operation? then repeated for both subsequent pixels in the row and for all selected rows.

Per esempio, nella forma di attuazione considerata, il procedimento verifica, in una fase 4018, se il pixel ? stato l ultimo pixel della riga e se la riga selezionata ? stata l ultima. For example, in the embodiment considered, the method verifies, in a step 4018, whether the pixel? state the last pixel of the row and if the selected row? was the last.

Nel caso in cui il pixel non sia stato l ultimo pixel della riga e la riga selezionata non sia stata l ultima (uscita N della fase di verifiche 4018), in una fase 4020, il procedimento effettua un salto alla posizione di pixel del confine determinato attualmente o seleziona la riga successiva, ed effettua l operazione di campionamento successiva, cio? il procedimento ritorna alla fase 4010. In the event that the pixel was not the last pixel of the row and the selected row was not the last (output N of the verification step 4018), in a step 4020, the procedure makes a jump to the pixel position of the determined boundary currently or select the next line, and perform the next sampling operation, that is? the process returns to step 4010.

Al contrario, nel caso in cui il pixel sia stato l ultimo pixel della riga e la riga selezionata sia stata l ultima (uscita Y della fase di verifiche 4018), l operazione di campionamento termina in una fase di arresto 4022. On the contrary, if the pixel was the last pixel of the row and the selected row was the last (output Y of the verification phase 4018), the sampling operation ends in a stop phase 4022.

Cos?, gli oggetti sottili sono campionati almeno con un campione S. Al contrario, tali oggetti sottili potrebbero essere saltati con il procedimento di campionamento fisso. Thus, thin objects are sampled with at least one S sample. Conversely, such thin objects could be skipped with the fixed sampling procedure.

I pixel campionati sono quindi usati per l operazione di adattamento 2008. Per esempio, potrebbe essere usata l operazione di adattamento 2012 descritta con riferimento alla Figura 7, includendo potenzialmente anche l operazione di preadattamento 2010. The sampled pixels are then used for the 2008 fitting operation. For example, the 2012 fitting operation described with reference to Figure 7 could be used, potentially including the 2010 pre-fitting operation as well.

Come descritto in precedenza, generalmente, potrebbe anche essere selezionata una pluralit? di pixel con adattamento e potrebbe essere selezionata la migliore combinazione soltanto durante una successiva fase di filtraggio 2014. Tuttavia, di solito, per le applicazioni in tempo reale anche questa fase potrebbe essere saltata per migliorare la velocit? di elaborazione. As described above, generally, a plurality could also be selected. of pixels with adaptation and the best combination could be selected only during a subsequent filtering phase 2014. However, usually, for real-time applications also this phase could be skipped to improve the speed? processing.

In qualsiasi caso, una volta che sono stati determinati i pixel con adattamento, mediante l operazione di adattamento 2008 o l operazione di filtraggio 2014, ciascun campione dell immagine di riferimento ? associato a un corrispondente pixel della seconda immagine. In any case, once the pixels with fit have been determined, by the fit operation 2008 or the filter operation 2014, each sample of the reference image? associated with a corresponding pixel of the second image.

Tuttavia, a causa dell operazione di campionamento nella fase 2020, molti pixel non sono adattati. However, due to the sampling operation in the 2020 phase, many pixels are not matched.

Generalmente, questi spazi vuoti possono essere riempiti come descritto in precedenza al fine di recuperare pixel mancanti saltati durante la fase di preadattamento. Generally, these gaps can be filled as described above in order to recover missing pixels skipped during the pre-fit phase.

Cos?, anche in questo caso, pu? essere effettuata una fase di raffinamento 2016. Per esempio, pu? essere applicato un procedimento di riempimento dei buchi, che riempie l area vuota in base ai valori di profondit? dei campioni pi? vicini, per es. direttamente con il valore di profondit? del campione pi? vicino. Inoltre, nel caso in cui sia stato usato l adattamento di blocco mascherato descritto in precedenza, l operazione di riempimento dei buchi potrebbe anche prendere in considerazione la maschera di adattamento, cio? la forma degli oggetti (si veda per es. la Figura 6). So, even in this case, it can? be carried out a phase of refinement 2016. For example, can? be applied a procedure of filling the holes, which fills the empty area according to the depth values? of the samples pi? neighbors, e.g. directly with the value of depth? of the sample pi? Neighbor. Also, in case the masked block fit described above was used, the hole filling operation could also take the fit mask into consideration, i.e. the shape of the objects (see for example Figure 6).

Inoltre, pu? anche essere effettuata una regolazione dei confini durante la fase di raffinamento 2016. Per esempio, la regolazione dei confini pu? essere effettuata in funzione dei valori di RGB dei pixel al fine di associare valori di profondit? simili ai pixel che hanno colori simili. Furthermore, it can? Boundary adjustment can also be performed during the 2016 refinement phase. be carried out according to the RGB values of the pixels in order to associate depth values? similar to pixels that have similar colors.

Generalmente, i procedimenti di stima di una mappa di profondit? descritti in precedenza possono anche essere modificati. Generally, the procedures for estimating a depth map? described above can also be modified.

Per esempio, in varie forme di attuazione, possono essere applicati filtri aggiuntivi alle immagini originali, per es. al fine di adattare soltanto gli elementi distintivi importanti. For example, in various embodiments, additional filters can be applied to the original images, e.g. in order to adapt only the important distinctive elements.

Per esempio, le Figure 16a e 16b rappresentano rispettivamente l immagine di sinistra della Figura 1a in cui sono stati applicati un filtro di segmentazione e un filtro di segmentazione in combinazione a un filtro di rilevazione dei confini/bordi. For example, Figures 16a and 16b represent the left image of Figure 1a respectively in which a segmentation filter and a segmentation filter have been applied in combination with a boundary / edge detection filter.

Le soluzioni descritte per generare immagini di mappe di profondit? hanno vari vantaggi rispetto alle soluzioni della tecnica nota, come The solutions described to generate images of depth maps? have various advantages with respect to the solutions of the known art, such as

- il tempo di calcolo ? migliorato, perch? sono usati soltanto un numero limitato di pixel candidati nella prima immagine e un area di confronto limitata nella seconda immagine invece di elaborare le intere immagini; - the calculation time? improved, why? only a limited number of candidate pixels are used in the first image and a limited comparison area in the second image instead of processing the entire images;

- la qualit? dell immagine della mappa di profondit? ? migliorata perch? le occlusioni e gli oggetti sottili possono essere trattati grazie all operazione di mascheramento; e - the quality depth map image ? improved why? occlusions and thin objects can be treated thanks to the masking operation; And

- la soluzione pu? essere elaborata in parallelo, per es. effettuando in parallelo varie operazioni di mascheramento e di adattamento di un blocco di pixel o persino di un pixel, permettendo cos? implementazioni veloci in hardware. - the solution can? be processed in parallel, e.g. performing in parallel various operations of masking and adaptation of a block of pixels or even of a pixel, thus allowing? fast implementations in hardware.

Inoltre, per varie forme di attuazione delle soluzioni, pu? essere sufficiente una singola iterazione su tutti i pixel candidati e pu? non essere richiesta alcuna verifica incrociata bidirezionale tra le immagini. Moreover, for various forms of implementation of the solutions, can? be sufficient a single iteration on all the candidate pixels and can? no bidirectional cross-checking between images is required.

Naturalmente, senza pregiudizio per il principio dell invenzione, i dettagli di costruzione e le forme di attuazione possono variare considerevolmente rispetto a ci? che ? stato descritto e illustrato qui a puro titolo di esempio, senza uscire per questo dall ambito della presente invenzione, come definito dalle rivendicazioni seguenti. Of course, without prejudice to the principle of the invention, the details of construction and embodiments may vary considerably with respect to this. that ? has been described and illustrated here purely by way of example, without thereby departing from the scope of the present invention, as defined by the following claims.

Claims (11)

RIVENDICAZIONI 1. Procedimento per generare una mappa di profondit? (DMI) da almeno una prima e una seconda immagine (IMG), il procedimento comprendendo le fasi di: - selezionare (2010, 2020) una pluralit? di pixel di riferimento in detta prima immagine, - associare (2008, 2014) a ciascun pixel di riferimento un rispettivo pixel nella seconda immagine, - determinare la disparit? tra ciascun pixel di riferimento e il rispettivo pixel in detta seconda immagine, e - determinare per ciascun pixel di riferimento un valore di profondit? in funzione della rispettiva disparit?, caratterizzato dal fatto che detto selezionare (2020) una pluralit? di pixel di riferimento in detta prima immagine comprende: - applicare un?estrazione dei contorni (4008) a detta prima immagine al fine di rilevare i contorni (da B1 a B4) in detta prima immagine, - effettuare un sotto-campionamento adattativo (da 4010 a 4020) al fine di selezionare un sottoinsieme di pixel (S) in detta prima immagine come detta pluralit? di pixel di riferimento in detta prima immagine, in cui il passo di campionamento nella direzione orizzontale e/o verticale ? determinato in funzione di detti contorni (da B1 a B4) rilevati in detta prima immagine. CLAIMS 1. Procedure for generating a depth map? (DMI) from at least a first and a second image (IMG), the procedure including the steps of: - select (2010, 2020) a plurality? of reference pixels in said first image, - associate (2008, 2014) to each reference pixel a respective pixel in the second image, - determine the disparity? between each reference pixel and the respective pixel in said second image, and - determine for each reference pixel a depth value? according to the respective disparity, characterized by the fact that said select (2020) a plurality? of reference pixels in said first image comprises: - applying a contour extraction (4008) to said first image in order to detect the contours (B1 to B4) in said first image, - carrying out an adaptive subsampling (from 4010 to 4020) in order to select a subset of pixels (S) in said first image as said plurality? of reference pixels in said first image, wherein the sampling step in the horizontal and / or vertical direction? determined as a function of said contours (from B1 to B4) detected in said first image. 2. Procedimento della rivendicazione 1, in cui detto applicare un?estrazione dei contorni (4008) a detta prima immagine al fine di rilevare i contorni (da B1 a B4) in detta prima immagine comprende applicare un Filtro di Sobel a detta prima immagine. The process of claim 1, wherein said applying a contour extraction (4008) to said first image in order to detect the contours (B1 to B4) in said first image comprises applying a Sobel Filter to said first image. 3. Procedimento della rivendicazione 1 o della rivendicazione 2, in cui detto applicare un?estrazione dei contorni (4008) a detta prima immagine al fine di rilevare i contorni (da B1 a B4) in detta prima immagine comprende effettuare una quantizzazione dei contorni. The process of claim 1 or claim 2, wherein said applying a contour extraction (4008) to said first image in order to detect the contours (B1 to B4) in said first image comprises performing a quantization of the contours. 4. Procedimento di qualsiasi delle rivendicazioni precedenti, in cui detto effettuare un sotto-campionamento adattativo (da 4010 a 4020) comprende: - selezionare un primo passo di campionamento fisso nella direzione di campionamento orizzontale o in quella verticale, - determinare un passo di campionamento variabile nelle altre direzioni di campionamento. The process of any of the preceding claims, wherein said carrying out an adaptive subsampling (4010 to 4020) comprises: - select a first fixed sampling step in the horizontal or vertical sampling direction, - determine a variable sampling step in the other sampling directions. 5. Procedimento di qualsiasi delle rivendicazioni precedenti, in cui detto effettuare un sotto-campionamento adattativo (da 4010 a 4020) comprende: - rilevare le distanze tra i contorni (da B1 a B4) in almeno una direzione di campionamento, - determinare il passo di campionamento per i campioni tra due contorni adiacenti (da B1 a B4) in funzione della distanza tra i rispettivi contorni (da B1 a B4). The process of any of the preceding claims, wherein said carrying out an adaptive subsampling (4010 to 4020) comprises: - detect the distances between the contours (from B1 to B4) in at least one sampling direction, - determine the sampling step for the samples between two adjacent contours (from B1 to B4) as a function of the distance between the respective contours (from B1 to B4). 6. Procedimento della rivendicazione 5, in cui detto determinare il passo di campionamento per i campioni tra due contorni adiacenti (da B1 a B4) in funzione della distanza tra i rispettivi contorni (da B1 a B4) comprende: - confrontare la distanza tra i rispettivi contorni (da B1 a B4) con una data soglia, e - nel caso in cui la distanza tra i rispettivi contorni (da B1 a B4) sia inferiore a una data soglia, impostare detto passo di campionamento per i campioni tra i due contorni adiacenti (da B1 a B4) alla distanza tra i rispettivi contorni (da B1 a B4) diviso per due. 6. The process of claim 5, wherein said determining the sampling step for the samples between two adjacent contours (B1 to B4) as a function of the distance between the respective contours (B1 to B4) comprises: - compare the distance between the respective contours (from B1 to B4) with a given threshold, e - if the distance between the respective edges (from B1 to B4) is less than a given threshold, set said sampling step for the samples between the two adjacent edges (from B1 to B4) to the distance between the respective edges ( B1 to B4) divided by two. 7. Procedimento della rivendicazione 5 o della rivendicazione 6, in cui detto determinare il passo di campionamento per i campioni tra due contorni adiacenti (da B1 a B4) in funzione della distanza tra i rispettivi contorni (da B1 a B4) comprende: - confrontare la distanza tra i rispettivi contorni (da B1 a B4) con una data soglia, e - nel caso in cui la distanza tra i rispettivi contorni (da B1 a B4) sia superiore a una data soglia, impostare detto passo di campionamento per i campioni tra i due contorni adiacenti (da B1 a B4) a detta data soglia. The process of claim 5 or claim 6, wherein said determining the sampling step for the samples between two adjacent contours (B1 to B4) as a function of the distance between the respective contours (B1 to B4) comprises: - compare the distance between the respective contours (from B1 to B4) with a given threshold, e - if the distance between the respective contours (from B1 to B4) is greater than a given threshold, set said sampling step for the samples between the two adjacent contours (from B1 to B4) at said given threshold. 8. Procedimento della rivendicazione 7, in cui detto determinare il passo di campionamento per i campioni tra due contorni adiacenti (da B1 a B4) in funzione della distanza tra i rispettivi contorni (da B1 a B4) comprende: - nel caso in cui la distanza tra i rispettivi contorni (da B1 a B4) sia superiore a detta data soglia: a) dividere la distanza tra i rispettivi contorni (da B1 a B4) per detta data soglia, b) determinare il resto di detta divisione, e c) saltare un numero di pixel che corrisponde al resto di detta divisione diviso per due. 8. The process of claim 7, wherein said determining the sampling step for the samples between two adjacent contours (B1 to B4) as a function of the distance between the respective contours (B1 to B4) comprises: - if the distance between the respective contours (from B1 to B4) is greater than said given threshold: a) divide the distance between the respective contours (from B1 to B4) by said given threshold, b) determine the remainder of said division, e c) skip a number of pixels which corresponds to the remainder of said division divided by two. 9. Procedimento di qualsiasi delle rivendicazioni precedenti, comprendente effettuare una fase di raffinamento al fine di assegnare un valore di profondit? ai pixel in detta prima immagine che non appartengono a detto sottoinsieme di pixel (S) in detta prima immagine. A process of any of the preceding claims, comprising carrying out a refinement step in order to assign a depth value. to the pixels in said first image which do not belong to said subset of pixels (S) in said first image. 10. Sistema (20) per generare una mappa di profondit? (DMI) da almeno una prima e una seconda immagine (IMG), caratterizzato dal fatto che detto sistema (20) ? configurato per implementare il procedimento secondo qualsiasi delle rivendicazioni da 1 a 9. 10. System (20) to generate a depth map (DMI) from at least a first and a second image (IMG), characterized by the fact that said system (20)? configured to implement the method according to any of claims 1 to 9. 11. Prodotto informatico che pu? essere caricato nella memoria di almeno un processore e che comprende porzioni di codice software per implementare il procedimento secondo qualsiasi delle rivendicazioni da 1 a 9. 11. IT product that can? being loaded into the memory of at least one processor and comprising portions of software code for implementing the method according to any of claims 1 to 9.
IT000619A 2013-07-22 2013-07-22 PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT ITTO20130619A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
IT000619A ITTO20130619A1 (en) 2013-07-22 2013-07-22 PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT
US14/336,777 US9483830B2 (en) 2013-07-22 2014-07-21 Depth map generation method, related system and computer program product
US14/336,734 US9317925B2 (en) 2013-07-22 2014-07-21 Depth map generation method, related system and computer program product
US14/336,763 US9373171B2 (en) 2013-07-22 2014-07-21 Method for generating a depth map, related system and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
IT000619A ITTO20130619A1 (en) 2013-07-22 2013-07-22 PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT

Publications (1)

Publication Number Publication Date
ITTO20130619A1 true ITTO20130619A1 (en) 2015-01-22

Family

ID=49182439

Family Applications (1)

Application Number Title Priority Date Filing Date
IT000619A ITTO20130619A1 (en) 2013-07-22 2013-07-22 PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT

Country Status (1)

Country Link
IT (1) ITTO20130619A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845006A (en) * 1995-07-19 1998-12-01 Jiro Hiraishi Method of processing image formation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845006A (en) * 1995-07-19 1998-12-01 Jiro Hiraishi Method of processing image formation

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
G. RAMPONI ET AL: "An adaptive irregular sampling algorithm and its application to image coding", IMAGE AND VISION COMPUTING, vol. 19, no. 7, 1 May 2001 (2001-05-01), pages 451 - 460, XP055106052, ISSN: 0262-8856, DOI: 10.1016/S0262-8856(00)00090-1 *
MARTIN D LEVINE ET AL: "Computer Determination of Depth Maps", COMPUTER GRAPHICS & IMAGE PROCESSING,, vol. 2, no. 2, 1 October 1973 (1973-10-01), pages 131 - 150, XP001379792 *
MICHEL SARKIS ET AL: "Sparse stereo matching using belief propagation", IMAGE PROCESSING, 2008. ICIP 2008. 15TH IEEE INTERNATIONAL CONFERENCE, IEEE, PISCATAWAY, NJ, USA, 12 October 2008 (2008-10-12), pages 1780 - 1783, XP031374368, ISBN: 978-1-4244-1765-0 *
TOMASI C ET AL: "STEREO MATCHING AS A NEAREST-NEIGHBOR PROBLEM", PATTERN ANALYSIS AND MACHINE INTELLIGENCE, IEEE TRANSACTIONS ON, IEEE SERVICE CENTER, LOS ALAMITOS, CA, US, vol. 20, no. 3, 1 March 1998 (1998-03-01), pages 333 - 340, XP000767923, ISSN: 0162-8828, DOI: 10.1109/34.667890 *

Similar Documents

Publication Publication Date Title
US9317925B2 (en) Depth map generation method, related system and computer program product
US11455712B2 (en) Method and apparatus for enhancing stereo vision
US9773302B2 (en) Three-dimensional object model tagging
CN104899845B (en) A kind of more exposure image fusion methods based on the migration of l α β spatial scenes
KR101277229B1 (en) Apparatus and method for improved foreground/background separation in digitl images
US7609888B2 (en) Separating a video object from a background of a video sequence
CN108352083B (en) 2D image processing for stretching into 3D objects
CN105825494A (en) Image processing method and mobile terminal
JPWO2006080239A1 (en) Image processing apparatus, microscope system, and region specifying program
JP7024736B2 (en) Image processing equipment, image processing method, and program
US20170243328A1 (en) Method and apparatus for image processing
US20160142702A1 (en) 3d enhanced image correction
CN103942756B (en) A kind of method of depth map post processing and filtering
CN103743750A (en) Method for generating distribution diagram of surface damage of heavy calibre optical element
CN104537627A (en) Depth image post-processing method
US20210374527A1 (en) Information processing apparatus, information processing method, and storage medium
ITTO20130619A1 (en) PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT
ITTO20130617A1 (en) PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT
ITTO20130618A1 (en) PROCEDURE FOR GENERATING A DEPTH MAP, RELATED SYSTEM AND IT PRODUCT
KR102003671B1 (en) Method and apparatus for processing the image
CN112241960B (en) Depth information-based matting method and system
KR101722969B1 (en) Apparatus for detecting moving object and method for controlling the same
JP2011124955A (en) Method for processing image and image processing apparatus
KR20120006593A (en) An apparatus for object segmentation given a region of interest in an image and method thereof
CN105450909A (en) Information processing method and electronic equipment