필터 지우기
필터 지우기

How to filter out pornographic images using MATLAB?

조회 수: 7 (최근 30일)
Shadi Ayyad
Shadi Ayyad 2015년 12월 22일
댓글: Jos (10584) 2016년 6월 22일
Hi everybody, I am trying to find a MATLAB code that is given a directory path containing a number of images, and in turn it filters out or wipe out porn images.
for example, if there are 50 images in a directory and 10 of these images contains non-ethical porn images, then the program deletes or wipe out these 10 images from the given directory.
Could any body help me ? Thanks in advance.
  댓글 수: 1
John D'Errico
John D'Errico 2015년 12월 22일
편집: John D'Errico 2015년 12월 22일
Good luck. If the supreme court was unwilling to even define the concept, except to know it when they saw it, getting a computer algorithm to be successful will be tough. And since what might qualify as such for you, might not for me, I wish you luck. However, I don't expect to see this be easy to do.
Worse, I'll bet I could take virtually any image with a person in it, and by carefully cropping it if I know your algorithm, make it appear as if it did or did not belong in the selected set. For example, take a picture of a face. Out of context, is it just a picture from some glossy magazine cover? Or let me give you some pictures from a nationally known sports magazine. How would they be interpreted by your algorithm? I'll bet I could take 10 random people and get 10 different answers on that classification.
As an example, long ago in my job we once created a digital collage of human body parts. The goal was to have ONE picture that had MANY different variations of flesh tones in it, as a test for our color management algorithms. Random arms and legs, faces, all at various angles, cropped from images we had at our disposal. But the funny fact is, the image might have looked fairly suggestive to some people.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2015년 12월 22일
There have been a number of papers written on pornography detection. See this link. Sorry, I have not read any of them and can't help you with them.

추가 답변 (4개)

Walter Roberson
Walter Roberson 2015년 12월 22일
편집: Walter Roberson 2016년 6월 21일

"pornography" is almost always a matter of intent rather than actual content.

  • pictures of infant breastfeeding are not pornographic even if they show naked breasts
  • in some provinces in Canada and some parts of the USA, it is completely legal for women to be topless in public provided they are not engaged in a sexualized display
  • pictures of mastectomy scars are not pornographic
  • In 2011, a transgender woman was arrested for indecent exposure in Tennessee for taking off her shirt in a Department of Motor Vehicles parking lot, in protest after DMV refused to change the gender on her driver's license. It is legal in Tennessee for males to go shirtless in public so if she was indeed considered legally male then she could not have been committing indecent exposure in that way, but if she was legally female then the department could not have refused to change her registration. Transwomen often encounter this kind of legal double standard, and if arrested for female-only offenses will often be held in male jails.
  • pictures of women in underwear are often considered pornographic, but not pictures of women in bathing suits that cover even less
  • paintings of naked people typically become considered "art" if the paintings were made long enough ago, but not if they were made recently
  • at least according to popular lore, in Victorian society, ankles were considered erotic and had to be covered up, even "ankles" on tables, but it was not considered offensive for breasts to be showing
  • the Janet Jackson "wardrobe malfunction" was considered offensive exposure, but reporting on female wardrobe (or lack thereof) at award shows or fashion shows is not considered to be that way
  • the decades of daily publication of the topless Page 3 Girls especially in the UK -- was that decades of pornography in a national newspaper or did the decades of "normalization" make it non-pornographic or was it never pornographic or ... ?
  • some of my female acquaintances find that their pictures are reported as being pornographic even though they are wearing as much in the way of clothes as pictures of other women. The difference is that the ones being reported are of larger women: what is socially considered acceptable and even encouraged for thin women is frequently not considered acceptable for larger women
  • in Canadian law, if a woman who is 17 years and 364 days old takes a topless selfie electronically, then that is considered "child pornography" and she can be arrested for doing so -- but as of the next day, her 18th birthday, it is no offense at all. Furthermore if she had taken the selfie using a Polaroid Instamatic camera or other analog medium, the relevant laws would be subtly different in ways that would be relevant to her being charged: the computerization brings with it a presumption of "distribution" that analog media does not. You might be able to program in some age estimation routines, but you certainly are not going to be able to get to single day accuracy.
  댓글 수: 7
Walter Roberson
Walter Roberson 2016년 3월 2일
The MATLAB icon is pornographic in some situations. Those temporary tattoos ended up in some naughty places.
Stephen23
Stephen23 2016년 3월 2일
편집: Stephen23 2016년 3월 2일
"the Janet Jackson "wardrobe malfunction" was considered offensive exposure"
Only in North America. The rest of the western world wondered what the fuss was about and found the whole media circus (and lawsuits!) quite inexplicably American.

댓글을 달려면 로그인하십시오.


Jos (10584)
Jos (10584) 2016년 3월 2일
  • Create a script that post the image automatically to Facebook
  • Wait for a few days
  • Try to retrieve the image from Facebook
  • If that fails, the image is suggestive according to at least one criterium.
  댓글 수: 3
Walter Roberson
Walter Roberson 2016년 6월 21일
FB is notorious for being inconsistent on what is acceptable. They tend to take down innocent images if there are enough reports; for example recently a very simple "Queers Against Islamophobia" text-as-image resulted in a 24 hour posting ban, but posts that say that LGBT people should be violently murdered are often left up for years "because Free Speech".
Jos (10584)
Jos (10584) 2016년 6월 22일
This is very sad indeed, Walter. FB is not an innocent player in these matters :(

댓글을 달려면 로그인하십시오.


Jan
Jan 2016년 3월 2일
  • Create a script that post the image automatically to your web page
  • Wait for a few days
  • Count the number of downloads
  • > 100: Pornographic
Seriously: Shadi, it is impossible to create such a filter. This is not a problem of Matlab, but of the human nature. There is even not a strict and clear definition of "pornographic", in consequence it is impossible for a computer to decide this.
What is the actual problem, you want to get solved?
  댓글 수: 6
Walter Roberson
Walter Roberson 2016년 3월 2일
There are lots of subjective answers to the question, but it is difficult to program subjectives. You probably want an objective answer. For that you need to define "nude".
Stephen23
Stephen23 2016년 3월 2일
편집: Stephen23 2016년 3월 4일
"briefly, is there a scientific subjective answer for my problem?"
No, because this is a question of social norms, which change between cultures (and even subcultures), between locations, and over time. The Romans ran races naked: was that pornography or sport?

댓글을 달려면 로그인하십시오.


Bjorn Gustavsson
Bjorn Gustavsson 2016년 3월 2일
Instead of continuing the discussion on a principal level I suggest that you try this fex-submission that might give you a hands-on experience in the difficulties of separating real-world images of this and that, and what problems you'll run into in your special-interest case:

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by