Archive for November, 2008

Nov 21 2008

Khan position estimate

Published by Martijn under PhD lab book

  • Implemented homogeneous ground plane transform to warp camera images onto each other. Using “cvGetPerspectiveTransform” and “cvWarpPerspective”  the transformation matrix is computed from corresponding ground plane coordinates and the image is transformed.
  • Images overlaid to be viewed in the application
  • To do: Create a probability based background estimation result instead of current thresholded one. Probability based estimation needed for Kahn position estimation paper.
  • Possibility: in updateBackground, take the smallest distance to a pixel colour cluster representing the foreground. This means the totalweight should be above the threshold. The duistance should be normalised so a smooth scale is aquired.

Comments Off

Nov 20 2008

undistort tracking kernels

Published by Martijn under PhD lab book

  • A number of matlab scripts have been written to undistort the kernel position and size data stored in the trackers .mat files. The script reads a kernel, plots the ellipse, creates an image mask which is then undistorted and computes the new kernel parameters from the undistorted kernel mask.
  • The conversion seems to work fine. Some kernels are transformed wrongly however. Mostly because the undistortion removes one of thye people being tracked from the field of view, after which there is no kernel anymore and the undistorted kernel gets only NaN values. This doesn’t need to be a problem, as long as the wrongly converted kernels are not the ones used for person location initialisation.
  • Oneof the scenes with this problem is scene 13-2. Occurence around frame 270, for the second track. This scene also sows another difficulty, where a person is visible during scene initialisation. The backsubmethod clearly has difficulty un-learning the person as foreground after he has moved. Changing the number of gauss kernels used seems to resolve the problem partially, but also introduced some extra noise.

Comments Off

Nov 19 2008

undistort lookup table

Published by Martijn under PhD lab book

  • Created a function for the creation of lookup tables for undistorting images. Using the “makeUndistortMap” function, it is possible to precompute a lookup table for undistorting images.
  • Train detector masks are now being undistorted aver having been loaded. This corrects the kinetic energy feature positions of the features working for the train detector.
  • Still unable to transform one point form distorted to undistorted…

Comments Off

Nov 19 2008

undistort images

Published by Martijn under PhD lab book

  • The camera images can be undistorted using vhl functions. OpenCV functions don’t seem to work that well. Creating a lookup table for transformations is useful and could be implemented in vhl, but does not solve the  problem that only the source location connected to a certain destination point can be found, and not the other way around. Only use of making the table would be image undistortion speedup.
  • Some problems occur due to undistortion:the initialisation of the tracking kernels is off, this is hard to solv, because you need to map distorted points to a destinationin an undistorted image, of which the information is not available.
  • Second, the train detector malfunctions because the train mask shouldbe undistorted as well.

Comments Off

Nov 12 2008

opencv image undistort

Published by Martijn under PhD lab book

  • Implemented undistortion by using cvInitUndistortMap and cvRemap functions. This is useful because the first function gives aundistortion lookup table which can be used to transform any point in a distorted image, for exampletracking kernels.
  • In the end it works, major problem with disappearing values and incorrect pointersseems to be due to  an old OpenCV version. Installed 1.0, fixed a lot of problems… System doesn’t crash any longer…
  • Undistorted image doesn’t look right… Only lower half is transformed, and resulting in merely blurred image.
  • Possibly camera center not well defined. Seems like vhl lib, which mainly uses OpenCV implementation, does extra transformation to intrinsic camera values. Some kind of compensation on the frame size, which results in a slightly different parameter: “double y = (v - offY - cy) * fy_inv;” instead of “float y = (v - fy)*fy_inv;”

Comments Off

Nov 11 2008

improved background subtraction and debugged voxel carving

Published by Martijn under PhD lab book

  • Improved background subtraction by enabling the upper shadow threshold (m_nBeta). This enables doing the inverse of shadow removal, highlight removal. It improves backsub results greatly by removing large light spots caused by movement of the sun and clouds. Currently set to 3 for detecting spots coloured similar to the background but 3x as bright.
  • Fixed problems with VoxelCarving. It turns out to be important to undistort the images first, before mapping them to the voxel grid. This fixesthe projection. Voxel carving result now looks a lot better.
  • Michael mentionned the difference between voxel carving using only the mapping of the voxel’s centroid to the foreground image to determine wheter it should be classified as foreground or carving using the mapping of all 8 corners of the voxel. The second one turns out to be a lot slower (because of 8 instead of 1 match, but gives more acurate results
  • Next thing to try is changing the size of the voxel grid. When are there too few voxels to make a correct classification?
  • Furthermore, improbe backsub result to create better foreground segmented people.
  • Also: think of ways to get rid of “shadow people”. People sometimes get duplicated because voxelcarving can  not distinguish between two spatial positions.

Comments Off