METHOD, DEVICE AND SYSTEM FOR A DEGREE OF BLURRING TO BE APPLIED TO IMAGE DATA IN A PRIVACY AREA OF AN IMAGE
20190340731 · 2019-11-07
Assignee
Inventors
Cpc classification
International classification
Abstract
Methods and devices for protecting personal privacy in captured image data by controlling privacy masking of an image, where the degree of blurring to be applied to a privacy area of the image depends on a threshold distance from the image capturing device, and the spatial resolution of content of the scene at this distance in the image.
Claims
1. A computer-implemented method for determining a degree of blurring to be applied to image data in a privacy area of an image, the image depicting a scene and being captured by an image capturing device, the method comprising the steps of: receiving input relating to coordinates of the privacy area of the image; receiving input relating to a threshold spatial resolution of image data corresponding to content of the scene located beyond a threshold distance from the image capturing device in the scene, said image data being within the privacy area of the image; calculating a maximum spatial resolution of the image data of the image corresponding to content of the scene located on or beyond the threshold distance from the image capturing device; calculating a difference between the maximum spatial resolution and the threshold spatial resolution; determining a degree of blurring based on the calculated difference, such that for a first difference being larger than a second difference, the degree of blurring determined based on the first difference is larger than the degree of blurring determined for the second difference; applying the degree of blurring to the image data in the privacy area of the image.
2. The method according to claim 1, wherein if the calculated difference is zero or negative, the degree of blurring is determined to be zero.
3. The method according to claim 2, further comprising when the difference is above a threshold difference, determining the degree of blurring to a predetermined value, and when the difference is between zero and the threshold difference, determining the degree of blurring to a value between zero and the predetermined value, wherein the value is related to the difference.
4. The method of claim 1, wherein the step of calculating the maximum spatial resolution is performed based on a focal length of an optical system of the image capturing device, the F-number of the optical system of the image capturing device, and a pixel pitch of an image sensor of the image capturing device.
5. The method of claim 1, wherein the step of applying the degree of blurring to the image comprises one from the list of: applying a gaussian filter, applying an average filter, applying a pixelization filter; wherein the degree of blurring determines the size of the applied filter.
6. The method of claim 1, further comprising the step of: determining that the privacy area covers at least a threshold portion of the image, setting a focus limit of the image capturing device to the threshold distance or less.
7. The method of claim 6, wherein the step of setting the focus limit comprises setting the focus limit of an autofocus algorithm of the image capturing device to the threshold distance or less.
8. The method of claim 6, wherein the step of setting a focus limit comprises: setting the focus limit to the threshold distance minus a determined value, wherein the value is determined based on a current focal length of an optical system of the image capturing device, the F-number of the optical system of the image capturing device and the threshold spatial resolution.
9. The method of claim 6, wherein the step of calculating a maximum spatial resolution comprises calculating the spatial resolution of image data of the image corresponding to content of the scene located on the threshold distance from the image capturing device.
10. A computer program product comprising a computer-readable storage medium with instructions adapted to carry out the method of claim 1 when executed by a device having processing capability.
11. A device adapted for determining a degree of blurring to be applied to image data in a privacy area of an image, the image depicting a scene and being captured by an image capturing device, the device comprising a processor configured to: receive input relating to coordinates of the privacy area of the image; receive input relating to a threshold spatial resolution of image data corresponding to content of the scene located beyond a threshold distance from the image capturing device in the scene, said image data being within the privacy area of the image; calculate a maximum spatial resolution of the image data of the image corresponding to content of the scene located on or beyond the threshold distance from the image capturing device; calculate a difference between the maximum spatial resolution and the threshold spatial resolution; determine a degree of blurring based on the calculated difference, such that for a first difference being larger than a second difference, the degree of blurring determined based on the first difference is larger than the degree of blurring determined for the second difference; apply the degree of blurring to the image data in the privacy area of the image.
12. A system comprising a first device for continuously capturing data of a scene, and producing a video stream comprising a sequence of images based on the captured data; a second device according to claim 11, adapted to continuously receiving the sequence of images from the first device.
13. The system of claim 12, wherein the first device and the second device are implemented in an image capturing device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The above, as well as additional objects, features and advantages, will be better understood through the following illustrative and non-limiting detailed description of preferred embodiments of the present invention, with reference to the appended drawings, where the same reference numerals will be used for similar elements, wherein:
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
DETAILED DESCRIPTION OF EMBODIMENTS
[0057] The aspects will now be described more fully hereinafter with reference to the accompanying drawings, in which embodiments are shown. The systems and devices disclosed herein will be described during operation.
[0058]
[0059] Using the concepts described herein, a threshold distance may be defined, which can be used for determining if, and how much, blurring should be applied to the privacy area of the image.
[0060]
[0061] In the plot of
[0062] The plots of
[0063] For the second focus curve 308b, the spatial resolution for content at the threshold distance 204 differs from the threshold spatial resolution 302 with a negative value 306b. This means that the privacy requirements for the privacy area are indeed met. For example, this may mean that the faces of people in the windows of the building 108 are not identifiable (e.g. the spatial resolution is less than 1 pixel per 0.1 meter on and beyond the threshold distance, or less than 2, 5, etc. pixels depending on the use case). Consequently, no blurring needs to be applied to the privacy area 110, which may mean that the image data corresponding to the objects 102, 104 can be better used for surveillance/monitoring purposes.
[0064] In
[0065] The maximum spatial resolution for objects in a scene located on or beyond a threshold distance from the image capturing device may be calculated using algorithms defined for calculation of the term circle of confusion, e.g. as defined in the Wikipedia article on the subject at the date of filing of the present application (https.//en.wikipedia.org/wiki/Circle_of_confusion).
[0066] Specifically, to calculate the diameter of the circle of confusion in the image plane for an out-of-focus subject, one method is to first calculate the diameter of the blur circle in a virtual image in the object plane and then multiply by the magnification of the system, which is calculated with the help of the lens equation. The circle of confusion (CoC) diameter, i.e. the blur circle, of diameter C, may be calculated using the formula:
where C=diameter of CoC, S1=the focal point of the image capturing device (i.e. the distance where the focus curve peaks, e.g. reference 310a-b in
[0067] Given that
C=f*tan(th)Equation 2
where th=the angular resolution, and by the approximation that tan(th)=th for small angles, it is given that:
[0068] If Equation 3 is evaluated at the threshold distance (S2), and by subtracting the threshold spatial resolution (th), the degree of blurring (B) (in pixels) may be calculated by:
where p=the pixel pitch of an image sensor of the image capturing device, and where S1 is between the image capturing device and the threshold distance S2 (as described in
[0069] The equation 1-5 specifies an exact way of calculating the degree of blurring to be applied. This is schematically shown in
[0070] In
[0071] In the simplest form, the mapping function between the calculated difference and the determined blurring factor (degree of blurring) is as shown in
[0072] In all examples shown in
[0073]
[0074] According to embodiments, the method comprises the step of receiving, S702, input relating to coordinates of the privacy area of the image.
[0075] The method further comprises receiving, S704, input relating to a threshold spatial resolution of image data corresponding to content of the scene located beyond a threshold distance from the image capturing device in the scene.
[0076] The threshold spatial resolution may be received e.g. in the form of an angular resolution for each pixel in the image (i.e. 1 or 0.5), or a value describing how many pixels an object of a certain size should be represented by at the threshold distance (e.g. 15*15 pixels for a 1*1 meter large object) or any other suitable measure of spatial resolution.
[0077] Further, the method comprises calculating S706 a maximum spatial resolution of the image data of the image corresponding to content of the scene located on or beyond the threshold distance from the image capturing device, e.g. using equation 3 above, or adaptations of equation 3 based on the format of the received threshold spatial resolution.
[0078] The two measures, the threshold spatial resolution and the maximum spatial resolution is then used for calculating S708 a difference between the maximum spatial resolution and the threshold spatial resolution, and determining S710 a degree of blurring based on the calculated difference, such that for a first difference being larger than a second difference, the degree of blurring determined based on the first difference is larger than the degree of blurring determined based on the second difference. The determined degree of blurring is then applied to the pixels of the privacy area, for example using a gaussian filter, an average filter or a pixelization filter, wherein the degree of blurring determines the size of the applied filter.
[0079] The determined degree of blurring is then applied S712 to the privacy area of the image, i.e. by applying the low pass filter with a kernel size according to the determined degree of blurring.
[0080] As described in
[0081] According to some embodiments, the focus limit is set to the threshold distance minus a determined value. This is shown in
[0082] It should be noted that the above strategy of setting of a focus limit may be performed independently of the method for determining a degree of blurring to be applied to image data in a privacy area of an image as described above. Such independently performed method is shown in
[0083] In its simplest form, the method for setting a focus limit of an image capturing device comprises the steps of receiving S802 input relating to a privacy threshold distance relating to a privacy requirement for images captured by the image capturing device. The privacy threshold distance may be defined similar to what is described above, i.e. a distance from the camera beyond which privacy requirements applies.
[0084] The method further comprises the step of setting S808 a focus limit of the image capturing device to the threshold distance or less.
[0085] This method can, according to embodiments, further take advantage of the DoF-concept as described above in conjunction with
[0086] The threshold spatial resolution can then be used for calculating the DoF for the image capturing device (with its current settings, e.g. F-number) for focal points (focus points) at some distances from the privacy threshold distance. As described above, also content at a certain distance beyond the actual focus point will appear acceptably sharp (e.g. having a spatial resolution above the threshold spatial resolution, also known as Depth of Field, DoF) in the captured image data, which can be taken advantage of when setting the focus limit. By taking the DoF into account, the focus limit of the image capturing device can be set at a distance from the privacy threshold, such that the spatial resolution on and beyond the privacy threshold distance always will be lower than the threshold spatial resolution. Determining at what distance from the privacy threshold distance the focus limit should be may be an iterative process, where a plurality of focus points are used for calculation of DoF for the camera (where the threshold spatial resolution thus is used for defining the circle of confusion criteria), and where the focus point where the acceptably sharp area ends closest to the threshold distance is set S808 as the focus limit for the image capturing device.
[0087] In other embodiments, depending on the threshold spatial resolution and the settings of the image capturing device, a focus limit is set S808 based on e.g. a predetermined table of focus limits.
[0088] In the above the inventive concept has mainly been described with reference to a limited number of examples. However, as is readily appreciated by a person skilled in the art, other examples than the ones disclosed above are equally possible within the scope of the inventive concept, as defined by the appended claims.