Specifying object properties to be detected
이전 댓글 표시
Hello everyone. I am currently working on a project to count the number of vehicles on a road from video using video processing by blob detection. The code I have can only detect cars. But I need to detect other types of vehicle as well. I want to how to specify a particular object's properties such as a van or truck to be detected in matlab. Please guide me. Thanks in advance. Regards
댓글 수: 13
Walter Roberson
2018년 9월 12일
See https://www.mathworks.com/matlabcentral/answers/264009-i-need-a-coding-to-detect-the-cars-in-an-images#answer_206408 as to why this cannot be done.
Shahrin Islam
2018년 9월 12일
Steven Lord
2018년 9월 12일
Define "vehicle".
Are roller skates a vehicle?
How about a Segway?
A hoverboard?
Would Iron Man's armor count as a vehicle? [You may scoff at the idea, but look at the first picture on this Wikipedia page. It may not be able to fly, but it's also not fictional. The caption card with it states "The Exoskeleton is a Personal Combat Vehicle ..."]
Shahrin Islam
2018년 9월 12일
Image Analyst
2018년 9월 12일
I believe my answer below should work. What happened when you tried it? Share your code.
Shahrin Islam
2018년 9월 12일
편집: Walter Roberson
2018년 9월 12일
Shahrin Islam
2018년 9월 12일
Image Analyst
2018년 9월 12일
I don't see anything there that would keep cars and throw out trucks. But attach 'video blob detection.mp4' and we'll see what happens.
Walter Roberson
2018년 9월 12일
"Does that mean that what I am trying to do is not possible?"
Exactly. And Image Analyst's solution does not achieve your stated task. Deep learning is unlikely to solve your stated task either.
For example, there are places where a Honda CRV with two wheel drive is legally defined as an automobile, but the same vehicle with four wheel drive is legally defined as a truck.
The difference between car and truck is a legal definition, and legal definitions vary from place to place.
Some of the vehicles that most people would not hesitate to classify as automobile are in fact legally trucks, with the manufacturer having widened the wheel base just slightly to meet truck definitions -- because it is common for "trucks" to have laxer fuel and pollution standards. Similarly, items such as (urban) mail trucks or (urban) windows/doors delivery/installation trucks common in the UK would potentially meet size standards to be legally considered automobiles in USA.
Some manufacturers made SUVs and vans as far as truck-like as they could while legally staying within the local limits on automobiles so that their highly urban customers would not have to get a truck driver's license and insurance would not charge the higher truck price.
Sure, some things are obvious, like an "18 wheeler" is unlikely to be legally an automobile anywhere in the world, but you need to understand that manufacturers deliberately pushed the legal boundaries on both sides, either just below or just above the boundaries, so you would need to know the location and a copy of all of the relevant regulations and a good tape measure and possibly specialized tools (for example, some jurisdiction might differentiate based upon maximum engine compression, but a given engine might be capable of exceeding the limit, or not, depending upon it's current firmware.)
Shahrin Islam
2018년 9월 13일
편집: Shahrin Islam
2018년 9월 13일
Walter Roberson
2018년 9월 13일
You need to go back to the first link I posted for you that demonstrates that you cannot differentiate between bicycle and motorcycle and car through image alone.
While I was researching I encountered a story about a fellow who built custom four wheel bicycles to drive around his handicapped relative. Municipal police gave him a ticket for operating an illegal vehicle because local law defined bicycle as having at most three wheels. The same laws defined motorcycle and car as being motor vehicle but he had no motor so he could not qualify for those. He was in a legal position of being unable to license the bicycle in any category, and thus was legally restricted to using the bicycles only on private property.
What he did was convince the local government to change their definition of bicycle, with considerable support from his neighbours who were proud of the way he was helping his handicapped relative.
Before his campaign, his device was legally nothing. Afterwards it was legally a bicycle. The exact same device and the exact same jurisdiction.
And therefore you cannot determine categories by image alone. Categories are legal more than they are technical.
Shahrin Islam
2018년 9월 13일
Walter Roberson
2018년 9월 13일
I am not aware of any country where the vehicle types are clearly defined. Especially not countries where rickshaws are common enough to be worth mentioning: in those countries there is typically a lot of personal innovation that blurs the lines badly.
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!