Ask Your Question

secrestb's profile - activity

2015-02-01 21:35:06 -0600 answered a question how to fetch image using c?

Try looking under video capture in the documentation:

C: CvCapture* cvCaptureFromCAM(int device) C: CvCapture* cvCaptureFromFile(const char* filename)

2015-01-31 05:22:31 -0600 commented answer Use a camera to detect an object and mark it in the real world with a beamer

The object is detected in camera space. The output (perhaps center pixel and radius) is the input to the projector translator which re-maps camera space to projector space. Because of resolution and misalignment camera space and projector space are not the same. The radius needs to be scaled so the circle is the correct size. The center needs to be scaled (to account for resolution difference) as well as moved/translated to account for misalignment. If you know the resolutions, (for example 1280X800 camera; 1024X768 projector) you can calculate the scaling (x 1024/1280 y 768/800 ). If not, project a large circle and measure it with the camera, then adjust the scaling until the circle size is what you want.

2015-01-30 20:56:05 -0600 commented answer Use a camera to detect an object and mark it in the real world with a beamer

They don't need to be aligned perfectly, although they do need to significantly overlap. The point is to measure the amount of misalignment to change the projection. If for example, your circle is nearly perfect, but is one pixel too high (as seen in the camera), then re-project the circle one pixel lower. Once you know the correction factors needed (scaling, translation and maybe even rotation), you don't need a feedback loop anymore, just project using the correction.

2015-01-30 10:07:47 -0600 answered a question Use a camera to detect an object and mark it in the real world with a beamer

One approach would be a feedback loop. Take your best shot. The LED circle will show up on the camera. From there you should be able to make the circle larger or smaller, translate it left, right, up, or down as needed. Once you have it calibrated (correct scaling and correct translation) it should always work.

2015-01-29 00:03:21 -0600 asked a question Mat_ initialization error??

I've compiled 2.4.10 using CUDA with VS2008 (VC9). I've also compiled the simple stitcher example. In the ComposePanarama routine there is a line Mat_<float> K; that creates a matrix where the data has an unitialized pointer. This goes on to cause an error down the road. Since this fairly obvious problem hasn't been reported I think it has something to do with my compilation and not the program. The initialization called is the first one (///////////////////////////////// Mat_<_Tp> ////////////////////////////////////
template<typename _tp=""> inline Mat_<_Tp>::Mat_() : Mat() { flags = (flags & ~CV_MAT_TYPE_MASK) | DataType<_Tp>::type; })

in the file Mat.hpp which chains to InitEmpty() and does in fact set data to 0 (not initialized). Can someone try it and let me know if it is a bug, or if it is just me.