Lecture 14 (Lecture 13) - Camera and Image Processing Flashcards
What type of technology do digital camera have?
Technology
* CCD (charge coupled devices)
* CMOS (complementary metal oxide semiconductor)
Resolution
* 6080 black/white up to
* several Mega-Pixels in 32bit color
* However: Embedded system has to have computing power to deal with this large amount of data!
How do digital camera interface to a CPU?
Completely depends on sensor chip specs
* Many sensors provide several different interfacing protocols
versatile in hardware design
software gets very complicated
* Typically: 8 bit parallel (or 4, 16, serial)
* Numerous control signals required
* Digital camera sensors are very complex units. In many respects they are themselves similar to an embedded controller chip.
* Some sensors buffer camera data and allow slow reading via handshake (ideal for slow microprocessors)
* Most sensors send full image as a stream after start signal (CPU must be fast enough to read or use hardware buffer or DMA)
What is digital camera interfacing and what is the problem 8-bit parallel?
Camera can send data in a variety of ways, esp.
serial and 8-bit parallel.
Problem 8-bit parallel
* Every pixel from the camera causes an interrupt
* Interrupt service routines take long, since they need to
store register contents on the stack
* Everything is slowed down
What is the solution to the problem 8-bit parallel?
Solution with FIFO Buffer
* Use FIFO as image data buffer
* FIFO is similar to dual-ported RAM, this approach has no synchronization between camera and CPU
* When FIFO is half full, interrupt is generated
* Interrupt service routine then reads FIFO until empty (Assume delay is small enough to avoid FIFO overrun)
Image Data Formats
Refer to slides
What things can image processing do?
Software for “Embedded Vision Systems”
* Motion detection
* Color detection
* Shape detection
What is motion detection?
Idea for Motion Detection (gray scale image)
Subtract gray scale values for all pixel-pairs from two subsequent images
Better use absolute difference of values than just difference
* Compute average over all pixels
* If average above threshold: motion detected! (returns 1 = motion, or 0 = no motion) - Refer to slides for implementation
What is object tracking
We have done: check whether there is motion yes/no
* What would be nice:
(assume camera mounted on servo)
Check where in the image motion is detected and move the camera towards it (→ tracking) - Refer to slides for implementation
What are colour models?
- RGB values produced by most cameras
- RGB changes with lighting conditions
- Ideally, we want hue value
What is the HIS Conversion?
Refer to slides
What is colour detection?
Uniquely colored objects are easier to detect
by using color than shape
1. For a single pixel:
➢How can we check whether a pixel value matches a
given sample color (HSI)
2. For the whole image:
➢How can we find the location of a colored object ?
What are the steps/process of colour detection?
- From RGB to Hue (of HSI) (values are made up)
- ## From Hue to Yes/No for Match - Does pixel HSI value match desired HIS range? Yes (1) or No (0) ?We have now:
* For a given hue and range, we can transform an input image into a binary image with every pixel expressing yes or no
What we really want:
* Look for color “blob” that defines object position
Idea:
* Create histogram over image columns (and image rows). Histogram max. is defined as object center.
—– - From Match-Image to Position Coordinates - For whole image: find cluster of matching pixels to find object
3.1 Histogram in x and y
3.2 Find position of max. values in x and y histogram
Refer to slides for implementation