How do i tell if an image has a shadow or not?
21 次查看(过去 30 天)
显示 更早的评论
I'm currently working on a project to detect and remove shadows from an image assuming all my input images have shadows. Input images are those that have definite shadows (i.e) easy to determine that it really is a shadow just by looking at the image. My professor wants me to first find out if an image has a true shadow or not. If it does then proceed with the shadow detection and removal. I have no idea how to do this. Any thoughts?
2 个评论
回答(2 个)
Walter Roberson
2016-3-21
9 个评论
Image Analyst
2016-3-22
Often people post pictures here and ask about how to measure something (diameter, angle, whatever). Sometimes they'll take a stab at solving it themselves, usually, for some unfathomable reason, it involves (inappropriately) edge detection as the first step. If it's simple, I'll show them how to use the proper MATLAB toolbox functions to make the measurements. About 99% of image processing boils down to just this: somehow process the image to get it to where the regions you want can be identified by thresholding, then threshold and call regionprops(). If it's a more complicated question like this one on shadow removal that involves substantial algorithm development, I'll refer them to Vision Bibliography which will almost certainly have a bunch of papers where people have published algorithms that do what they want to do. So I don't consider the question itself out of line since it may be solved with some simple MATLAB functions that they just don't happen to know about yet. However if they're asking something really tough, and often they may not know if their problem is tough or not until we tell them, then I'll just refer them to the literature and ask them to come back with code. They rarely do, though sometimes they come back with a paper and no code, and ask how to implement the paper. Usually it would require way too much of my time so I just refer them to the FAQ.
Walter Roberson
2016-3-22
编辑:Walter Roberson
2016-3-23
Chad, in the last 24 hours, there has been activity on 339 Questions, excluding any which have been closed or deleted. That's plenty to go around for anyone who wants to answer, expert or not. I assure you, if I see one beginner answering another beginner on a MATLAB question, my reaction is "Thanks, that saved me the trouble of answering myself!" When someone new comes along and starts answering questions, I might peek in to be sure they are doing a reasonable job of answering, but if they are not making mistakes, I let them be.
Saying that this forum is about MATLAB is nothing to do with "expert" or not: it is about limited resources; it is about "appropriate venue", and it is about trying to keep the resource clear so that people who are looking for MATLAB material can find it easily.
Imagine the scenario in which it becomes known that this is a place where people can post their vague questions about their homework or honours project, and that they would get responses telling them what approach to take. It would not be just the people dealing with MATLAB who would come here: it would be the people dealing with C, C++, C#, Java, Excel python, and many other programming languages as well. It would become a homework / project tutoring center for... well, just about any topic not prohibited by law (e.g., cryptography.) "I have a project in architecture, what should I do?" "I have a project in composites (e.g., cement), what should I do?" "How do I graph this sinking loan in Excel?" You have an interest in satellite photography, but maybe someone else has an interest in sociology with an intent to do statistical analysis in SPSS, so why should we allow general discussions about satellite photography but not general discussions about statistical analysis?
You are, in short, asking that this resource be allowed to become a combination Stackoverflow and ResearchGate.
Are you familiar with The Tragedy of the Commons ? "The tragedy of the commons is an economic theory of a situation within a shared-resource system where individual users acting independently and rationally according to their own self-interest behave contrary to the common good of all users by depleting that resource."
"In addition, Hardin also pointed out the problem of individuals acting in rational self-interest by claiming that if all members in a group used common resources for their own gain and with no regard for others, all resources would still eventually be depleted. Overall, Hardin argues against relying on conscience as a means of policing commons, suggesting that this favors selfish individuals – often known as free riders – over those who are more altruistic. "
The response that we have developed is that we restrict access to the resource to those matters that have to do with MATLAB (and Simulink.) If someone has a question about what is available in the Mathworks libraries, we answer. If someone has a question about how MATLAB works, we answer. If someone has a bug related to their MATLAB implementation, we answer. But if someone wants us to find an algorithm for them, or wants us to read papers and explain them, then we say "Google is that-a-way; come back when you have a MATLAB question."
The Answers facility is not self-cleaning. People spend time behind the scenes throwing away the junk; redirecting to other resources; asking people to clarify questions; reformatting questions to be readable; telling people we won't do their homework for them; searching for questions with common themes and tagging them consistently; testing and commenting on File Exchange Contributions. My personal limit is adjusting tags on about 85 Questions or Contributions in a batch, and it isn't going to be more than 25 unless there is a ready supply of chocolate (or ice cream) in the house. The gatekeeping and the janitor work is a lot of work -- but it is also necessary to keep the resource useful.
MHN
2016-3-23
编辑:MHN
2016-3-23
It is like someone come here and ask you how can I do face detection with Matlab! There are 88,500 of papers (search it in google scholar), and thousands of researchers putting years of their life to answer this question and increase accuracy of their algorithms. It is exactly the same with your question! If you are a green researcher in this field, start with theory and algorithms, then try to implement the current methods. Then if you have a question about implementation in Matlab come and ask us. I believe the link that @Walter Roberson has sent is the best answer to your question.
3 个评论
MHN
2016-3-23
Yes, but this method has its problems e.g. overlapping of sub windows. And he said "My professor wants me ...." so it means it should be a new (modified) method! If his boss (in a company) asked him for doing face detection, then yes Viola-Jones detector in Computer Vision Toolbox is the answer for the face detection task. Anyway, this kind of question exists and I still believe your answer was the best (link to the Google Scholar).
Walter Roberson
2016-3-23
We had someone the other day asking for a way to check to see that there really was a face where VJ detected it. That has close similarities to this present Question, being open-ended, the topic of a lot of research over the years, with no real answer (and what exactly is a "face" anyhow?)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!