Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blur a zone in a picture #32

Open
mathieuruellan opened this issue Sep 24, 2016 · 12 comments
Open

Blur a zone in a picture #32

mathieuruellan opened this issue Sep 24, 2016 · 12 comments

Comments

@mathieuruellan
Copy link
Contributor

If a user uploads a photo with a face, it's forbidden to publish it in France.
And we don't want trials!

@mathieuruellan
Copy link
Contributor Author

mathieuruellan commented Sep 25, 2016

The problem is more important than i though.
In France and many country of EU, Plate numbers are personnal data, and that's a big problem.
The only way is to blur the plate and to hash the plate number ....

@infinitesunrise
Copy link
Owner

Haha well I appreciate my French brothers and sisters for being the test cases for progressive legislation. It gives the rest of the world a chance to see what works and doesn't work practically when actually implemented by society :P

However this sounds like a fun problem to work around. I could probably add in blurring and plate hashing support in the near future. Can the plate numbers be stored in the database and simply not shown on the website, or is it illegal to even store them at all?

@mathieuruellan
Copy link
Contributor Author

mathieuruellan commented Sep 25, 2016

2 points:

  1. I already faced that problem in my daily job. Data must be anonymous, so hash is mandatory to be peacefull. That's to answer to CNIL https://en.wikipedia.org/wiki/Commission_nationale_de_l%27informatique_et_des_libert%C3%A9s
  2. Personnal data can't be spread without an agreement (most of time, they disagree ;) ).

And we can't host in another country, moving personnal data a country without agreement with CNIL is even more forbidden.

@mathieuruellan
Copy link
Contributor Author

mathieuruellan commented Sep 25, 2016

I've talked with other geek bikers and nobody agrees if plates are a personnal data . So, i will ask to CNIL.
Some says that it has recently changed.

@mathieuruellan
Copy link
Contributor Author

mathieuruellan commented Sep 26, 2016

Well, i've the final word!
Plate is not a personnal data, it identifies a vehicle.
But with the picture date, we can cross data and have the owner (even if the other data is not public).

So, cibl can't be deployed in France as is.

@infinitesunrise
Copy link
Owner

Date + plate = identity? Not sure how that works, but if the government thinks that's so then that's the final word I guess. However, I could easily add a configuration option to not require the date field (Or remove it altogether) - As well as one to disable plate searches. Or combine all these changes into one config option and call it CNIL Mode.

...Was CNIL a play on words? Because in English one is inclined to pronounce it "See Nil", as in "See Nothing" :P

@infinitesunrise
Copy link
Owner

FYI I can probably implement this option next week, I'm away from home this week so I've confined myself to CSS changes only for the next few days.

@mathieuruellan
Copy link
Contributor Author

mathieuruellan commented Sep 28, 2016

Really thank you. It's really great to give free time for side projects!
The date is mandatory for our usage.
The aim is to have data, to be pain in the ass with local police. We want to give data to show them that the job is not done, and to help them (where they should go and when).
The idea is not to denounce or to shame a particular car (they are too many), so the plate is not our priority.

@kaheja
Copy link

kaheja commented Oct 7, 2016

We are checking out if we could use this in another EU country too, and seems that covering the plate and not even record it as text to database would be the safest way to avoid problems. And of course this should be done quite automatically so that admins don't usually have to do any manual editing before

I was checking how to use the ALPR data coordinates to draw a black box or something to the photo, but it only has the starting coordinates, not the size of the plate in photo. To be continued.

@infinitesunrise
Copy link
Owner

infinitesunrise commented Oct 7, 2016

It returns the four corner coordinates of every plate it finds in the photo, in plate['results']['coordinates'] as four [x,y] arrays. It's not a rectangle, since the a photograph warps the shape due to perspective, but those four coordinates do form a polygon wrapping the plate. With that data you can have an image editing library like imagemagick blur or black out the region. Check out lines 200-236 in index_actual.php, that's my listener for the request to OpenALPR's cloud API. Within that block I actually use the four coordinates of every plate returned to determine their centers, so that if there are multiple plates identified in the photo the submit form fills in the plate field with the one closest to center of image, and not the plate of the poor bystander who might be parked legally at edge of photo :) You can probably adapt that code to instead use the corner coordinates to inform a blur/blackout function.

@mathieuruellan
Copy link
Contributor Author

And people faces, or anything that can identify someone.

@infinitesunrise
Copy link
Owner

infinitesunrise commented Oct 7, 2016

I'm looking at FaceRect to provide face locations for blurring: http://apicloud.me/apis/facerect/demo/
It's simple and free.

I haven't started coding anything yet though, if you'd like to take a crack at it please do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants