Image processing device and image processing method for correcting a depth value of a pixel or region of an image based on a contribution ratio
An image processing device includes: a contribution ratio calculation unit that calculates a contribution ratio of a predetermined pixel or a predetermined region in depth calculation in each of a plurality of pixels or a plurality of regions included in an input image; and a correction unit that corrects a depth value of the predetermined pixel or the predetermined region based on the contribution ratio.
1. An image processing device comprising:
a contribution ratio calculation unit configured to calculate a contribution ratio of a predetermined pixel or a predetermined region in depth calculation in each of a plurality of pixels or a plurality of regions included in an input image; and
a correction unit configured to correct a depth value of the predetermined pixel or the predetermined region based on the contribution ratio,
wherein the correction unit corrects the depth value using a depth edge map calculated using the input image and at least one of a preceding image or a succeeding image, and
wherein the contribution ratio calculation unit and the correction unit are each implemented via at least one processor.
2. The image processing device according to claim 1 ,
wherein the contribution ratio calculation unit calculates the contribution ratio of the predetermined pixel in the depth calculation for each of a plurality of pixels in a predetermined range of the input image including the predetermined pixel, and
wherein the correction unit is further configured to calculate a corrected depth value of the predetermined pixel based on the contribution ratio of the predetermined pixel in the depth calculation of each of the plurality of pixels in the predetermined range.
3. The image processing device according to claim 2 ,
wherein the correction unit calculates the corrected depth value for the depth value of the predetermined pixel based on a weighted mean of the depth values of the plurality of pixels using the contribution ratio of the predetermined pixel in the depth calculation of each of the plurality of pixels in the predetermined range, as a weight.
4. The image processing device according to claim 2 ,
wherein the correction unit calculates the corrected depth value for the depth value of the predetermined pixel based on a weighted median of the depth values of the plurality of pixels using the contribution ratio of the predetermined pixel in the depth calculation of each of the plurality of pixels in the predetermined range, as a weight.
5. The image processing device according to claim 1 ,
wherein the contribution ratio calculation unit calculates the contribution ratio of the predetermined region in the depth calculation for each of a plurality of regions in a predetermined range of the input image including the predetermined region, and
wherein the correction unit calculates a corrected depth value of the predetermined region based on the contribution ratio of the predetermined region in the depth calculation of each of the plurality of regions in the predetermined range.
6. The image processing device according to claim 5 ,
wherein the correction unit calculates the corrected depth value for the depth value of the predetermined region based on a weighted mean of the depth values of the plurality of regions using the contribution ratio of the predetermined region in the depth calculation of each of the plurality of regions in the predetermined range, as a weight.
7. The image processing device according to claim 5 ,
wherein the correction unit calculates the corrected depth value for the depth value of the predetermined region based on a weighted median of the depth values of the plurality of regions using the contribution ratio of the predetermined region in the depth calculation of each of the plurality of regions in the predetermined range, as a weight.
8. The image processing device according to claim 1 , further comprising:
a correction intensity calculation unit configured to calculate a correction intensity for correcting one image out of a depth image obtained by the depth calculation and a corrected depth image obtained by the correction of the depth value by the correction unit, based on the other image out of the depth image and the corrected depth image,
wherein the correction intensity calculation unit is implemented via at least one processor.
9. The image processing device according to claim 8 ,
wherein the correction intensity is a coefficient for applying α-blending on the depth image and the corrected depth image.
10. The image processing device according to claim 8 ,
wherein the correction intensity calculation unit calculates the correction intensity based on a feature amount of each of the plurality of pixels included in the input image.
11. The image processing device according to claim 10 ,
wherein the correction intensity calculation unit calculates the correction intensity based on a deviation of the feature amount within a predetermined range of the input image including the predetermined pixel.
12. The image processing device according to claim 8 ,
wherein the correction intensity calculation unit calculates the correction intensity based on a feature amount of each of the plurality of regions included in the input image.
13. The image processing device according to claim 12 ,
wherein the correction intensity calculation unit calculates the correction intensity based on a deviation of the feature amount within a predetermined range of the input image including the predetermined region.
14. The image processing device according to claim 1 ,
wherein the contribution ratio calculation unit calculates the contribution ratio of the predetermined pixel or the predetermined region based on a feature amount of each of the plurality of pixels or the plurality of regions included in the input image.
15. The image processing device according to claim 14 ,
wherein the feature amount includes edge intensity, and
wherein the contribution ratio calculation unit calculates the contribution ratio of the predetermined pixel based on the edge intensity of each of a plurality of pixels in a predetermined range of the input image including the predetermined pixel.
16. The image processing device according to claim 14 ,
wherein the input image is a stereo image including a first image defined as a standard image and a second image defined as a reference image, and
wherein the contribution ratio calculation unit calculates the feature amount based on at least one image out of the first image and the second image.
17. The image processing device according to claim 14 ,
wherein the contribution ratio calculation unit calculates the contribution ratio based on a sum of the feature amount of each of a plurality of pixels in a predetermined range of the input image including the predetermined pixel.
18. The image processing device according to claim 14 ,
wherein the input image is a stereo image including a first image defined as a standard image and a second image defined as a reference image, and
wherein the contribution ratio calculation unit calculates the contribution ratio using, as the feature amount, a matching evaluation value indicating a degree of matching between a predetermined range of the first image including the predetermined pixel and a corresponding range of the second image corresponding to the predetermined range.
19. An image processing method comprising:
calculating a contribution ratio of a predetermined pixel or a predetermined region in depth calculation in each of a plurality of pixels or a plurality of regions included in an input image; and
correcting a depth value of the predetermined pixel or the predetermined region based on the contribution ratio,
wherein the depth value is corrected using a depth edge map calculated using the input image and at least one of a preceding image or a succeeding image.