Method and apparatus for controlling a degree of compression of a digital image
AssigneeAxis AB
InventorsXing Danielsson Fan, Niclas Danielsson
Life of this patent
Estimating the term…
Abstract
Described is a method and apparatus for controlling a degree of compression of a digital image, and more specifically to such method and apparatus which receives a stereoscopic digital image, and controls a degree of compression of the digital image based on block matching characteristics between the two images of the stereoscopic digital image.
Claims28
A method of controlling a degree of compression of a digital image representing a scene, said method comprising:
- receiving a first digital image and a second digital image representing a first and second view of the scene, respectively,
- determining a plurality of pairs of matching pixels between the first and second digital images by applying a block matching algorithm on the first and second digital images,
- wherein each pair of matching pixels is determined by:
- using the block matching algorithm, comparing a block of pixels in the first digital image to a plurality of blocks of pixels in the second digital image, and for each comparison calculating a difference value,
- determining a best matching block of pixels among the plurality of blocks of pixels in the second digital image, wherein the best matching block of pixels is the block of pixels which resulted in the lowest calculated difference value,
- determining the pair of matching pixels as being one pixel from the block of pixels in the first digital image and a corresponding pixel in the best matching block of pixels,
- for each determined pair of matching pixels, calculating a confidence metric, which defines how reliable the matching of the pair of matching pixels is, wherein the confidence metric is calculated at least in part by comparing the lowest calculated difference value with remaining calculated difference values,
- determining the digital image representing the scene, wherein the digital image representing the scene is determined to be one of:
- the first digital image, the second digital image, and a stereo image comprising the first and the second digital image;
- and
- encoding the digital image representing the scene by controlling a degree of compression of the digital image representing the scene based on the calculated confidence metrics, and by, for a portion of the digital image representing the scene comprising at least one pixel of a first pair of matching pixels among the pairs of matching pixels:
- comparing the calculated confidence metric of the first pair of matching pixels to a predetermined threshold value,
- upon determining that the calculated confidence metric of the first pair of matching pixels is equal to or above the threshold value, controlling the degree of compression of the portion of the digital image representing the scene using a first compression ratio, and
- upon determining that the calculated confidence metric is below the threshold value, controlling the degree of compression of the portion of the digital image representing the scene using a second compression ratio being higher than the first compression ratio.
A non-transitory computer-readable storage medium including a computer program stored thereon with instructions which when executed by a device having a processor adapt a system to carry out the method of controlling a degree of compression of a digital image representing a scene, said method comprising:
- receiving a first digital image and a second digital image representing a first and second view of the scene, respectively,
- determining a plurality of pairs of matching pixels between the first and second digital images by applying a block matching algorithm on the first and second digital images,
- wherein each pair of matching pixels is determined by:
- using the block matching algorithm, comparing a block of pixels in the first digital image to a plurality of blocks of pixels in the second digital image, and for each comparison calculating a difference value,
- determining a best matching block of pixels among the plurality of blocks of pixels in the second digital image, wherein the best matching block of pixels is the block of pixels which resulted in the lowest calculated difference value,
- determining the pair of matching pixels as being one pixel from the block of pixels in the first digital image and a corresponding pixel in the best matching block of pixels,
- for each determined pair of matching pixels, calculating a confidence metric, which defines how reliable the matching of the pair of matching pixels is, wherein the confidence metric is calculated at least in part by comparing the lowest calculated difference value with remaining calculated difference values,
- determining the digital image representing the scene, wherein the digital image representing the scene is determined to be one of:
- the first digital image, the second digital image, and a stereo image comprising the first and the second digital image;
- and
- encoding the digital image representing the scene by controlling a degree of compression of the digital image representing the scene based on the calculated confidence metrics, and by, for a portion of the digital image representing the scene comprising at least one pixel of a first pair of matching pixels among the pairs of matching pixels:
- comparing the calculated confidence metric of the first pair of matching pixels to a predetermined threshold value,
- upon determining that the calculated confidence metric of the first pair of matching pixels is equal to or above the threshold value, controlling the degree of compression of the portion of the digital image representing the scene using a first compression ratio, and
- upon determining that the calculated confidence metric is below the threshold value, controlling the degree of compression of the portion of the digital image representing the scene using a second compression ratio being higher than the first compression ratio.
An encoder for controlling a degree of compression of a digital image representing a scene, the encoder comprising:
- a receiving component, including a computer-readable communications medium, arranged to receive a first digital image and a second digital image representing a first and second view of the scene, respectively,
- a matching component, including a processor, arranged to:
- determine a plurality of pairs of matching pixels between the first and second digital images by applying a block matching algorithm on the first and second digital images,
- wherein each pair of matching pixels is determined by:
- using the block matching algorithm, comparing a block of pixels in the first digital image to a plurality of blocks of pixels in the second digital image, and for each comparison calculating a difference value,
- determining a best matching block of pixels among the plurality of blocks of pixels in the second digital image, wherein the best matching block of pixels is the block of pixels which resulted in the lowest calculated difference value,
- determining the pair of matching pixels as being one pixel from the block of pixels in the first digital image and a corresponding pixel in the best matching block of pixels,
- for each determined pair of matching pixels, calculate a confidence metric, which defines how reliable the matching of the pair of matching pixels is, wherein the confidence metric is calculated at least in part by comparing the lowest calculated difference value with remaining calculated difference values,
- and an encoding component, including the processor and the computer-readable communications medium, arranged to:
- determine the digital image representing the scene, wherein the digital image representing the scene is determined to be one of:
- the first digital image, the second digital image, and a stereo image comprising the first and the second digital image;
- and
- encode the digital image representing the scene by controlling a degree of compression of the digital image representing the scene based on the calculated confidence metrics, and by, for a portion of the digital image representing the scene comprising at least one pixel of a first pair of matching pixels among the pairs of matching pixels:
- compare the calculated confidence metric of the first pair of matching pixels to a predetermined threshold value,
- upon determining that the calculated confidence metric of the first pair of matching pixels is equal to or above the threshold value, control the degree of compression of the portion of the digital image representing the scene using a first compression ratio,
- upon determining that the calculated confidence metric is below the threshold value, control the degree of compression of the portion of the digital image representing the scene using a second compression ratio being higher than the first compression ratio.
Dependencies are inferred from the claim text.