A program (in C) to find the distance to an object using two images and computing distances accross these images (thanks to a stereoscopy algorithm).

makefile 267B

  1. all: stereo bmp
  2. stereo : stereo.o
  3. gcc stereo.o -o stereo `pkg-config opencv --libs` -lm -lpthread -lfftw3 -lfftw3_threads
  4. stereo.o : stereo.c
  5. gcc -c stereo.c -Wall `pkg-config opencv --cflags` -lm -lpthread -lfftw3 -lfftw3_threads
  6. bmp : bmp.c
  7. gcc -o bmp bmp.c