5

I'm looking into different attendance taking options for a particularly large seminar class (600ish students) and I was thinking — what if a picture was taken of the seats, maybe with a visual cue on them such as reflective tape. Another picture was taken during a class with assigned seats and if the reflective tape is covered, it could be a good indication of whether the seat is occupied or not.

What kind of software should I be looking at to achieve this effect? The main things are being able to detect an object (maybe some kind of material which is obvious to the computer) and detecting if its gone.

migrated from cs.stackexchange.com Apr 17 '14 at 10:59

This question came from our site for students, researchers and practitioners of computer science.

  • I've migrated your question to a site where it's on-topic. Your question mostly meets our quality guidelines, which is nice, but you need to give us a little more information. What operating system do you have available? How much are you willing to pay (if there's no free software that can do this)? – Gilles Apr 17 '14 at 11:01
  • Detecting how which seats are occupied is one thing, but I don't see how you're going to determine students are occupying these seats. Make each student wear a T-shirt with a unique QR code? – Gilles Apr 17 '14 at 11:03
  • If there's some great solution I could probably go up to 500-1000 dollars (if it's a one time thing). I'm open to other suggestions as well. Operating system is windows but I can use any operating system, it's no big deal. – user1066886 Apr 17 '14 at 23:14
  • I'm also looking into some actual photo-recognition software so if you have some information on that, it would be great. Regarding seats being occupied, if there are assigned seats assumedly students wouldn't be able to cover up a seat for their friend or etc because they aren't in close proximity – user1066886 Apr 17 '14 at 23:28
5

If you can guarantee that the camera will be in exactly the same position each time (no one will move it or bump it), and you can choose the nature/color of the reflective tape, you might be able to use simple image differencing software.

ImageMagick contains software that will let you compare two images. It can be used to compute a "difference image" that shows the pixel locations where there is a substantial difference between the two.

With that, here's what you could do. In advance, take a picture of the auditorium while it is empty. Then, manually circle each of the locations corresponding to each chair (e.g., the location where that reflective tape is). Next, on the day of the lecture, take a picture, and do a "diff" to compare that image to the one of the empty auditorium. That will give you a heatmap of the pixel locations where there is a substantial difference between the two images. Finally, you can crop out the locations you've previously determined that correspond to a seat, and count how many of them there are. You can also use ImageMagic to crop out particular locations, compute the average intensity in those regions, and compare it to a threshold.

If the reflective tape is a particular color, you can also use ImageMagick to focus in on a particular color channel.

This is a little hacky. I don't know how well it would work, but it would be pretty easy to experiment with it by hand and determine how well it would work.

Here is more information on how to use ImageMagick for comparing images:

  • This will give quite a few false positives because people put bags / drinks in empty seats next to them – user3791372 Aug 4 '15 at 10:47
  • 1
    @user3791372 This is more a comment about the methodology proposed in the question, isn't it? – Chop Aug 4 '15 at 13:47
  • @Chop no, it's regarding the use of diff'ing two images together – user3791372 Aug 4 '15 at 15:22
  • 1
    @user3791372 The question suggests to count a reflexive tape on unoccupied seats. The difficulty of bags and drinks may arise as well. But I agree on the difficulty, which is why I think D.W. suggested to diff only specific sections of the image. I think I see your meaning (the tape may be visible though partially hidden, thus resulting in a diff where the seat is still free). – Chop Aug 4 '15 at 20:37
0

You can consider using opencv to create something which recognises a seat that is empty versus a seat which is taken. There are several image processing algorithms which will be of use - though this would be custom software you'd have to make.

You'd have to train the software to learn what an empty seat looks like, or what a taken seat looks like - including training it to recognise what a seat with a bag / food in it looks like to not count it as taken.

If the seats are a certain bright colour, you may be able to get away with colour detection, though I doubt that'd be 100% accurate as students could wear clothes of the same colour as the seats.

I'd imagine the best angle would be overhead, but this may require several cameras to prevent distortion of the seats.

This would be VERY complicated and require a lot of man hours to produce the software and ensure it's trained properly.

Wouldn't it be easier to approach it from another angle? Take an automated count as people walk in through the entrance with a simple light beam and receiver and count each time it's broken. Maybe a foot pressure pad? Or people pushing a clicker as they walk in (which incidently could be connected to an led counter in the hall!). Something simple that could be done using a pi / arduino. I'm sure you'd get a few false positives with people walking out and back in, but it'd be FAR more simpler than what you're proposing.

Or, why not use the old traditional route - pass around a piece of paper with names on for "fire regulations". Then you could use OCR to see who attended quickly and make pretty graphs of it! If attendance is a part of the grade, then it'd be doubly useful.

Or... if you want to know what students are there, give each student an NFC card with an individual number encoded on it and as they walk in, they swipe it through a receiver. NFC cards are cheap, encoding them fairly trivial. Boom. Maybe they could be incorporated into student cards.

I guess though, from the lack of details and knowledge and effort shown in your question, this isn't for a real situation, only an assignment to get you to investigate methods and to make you think outside the box.

-1

This blog article gives a nice starting point working on face detection using python and OpenCV2 in 25 lines of python code - there are a number of such articles available. The important consideration is are you trying for an approximate number or 100% accurate.

  • Face detection is never 100% accurate, and nothing was mentioned about detecting faces – user3791372 Aug 4 '15 at 15:24
  • Hence the consideration mentioned in the above. – Steve Barnes Aug 4 '15 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.