Ask Your Question

TiBe's profile - activity

2020-04-15 18:33:22 -0600 received badge  Popular Question (source)
2020-02-18 22:32:16 -0600 received badge  Famous Question (source)
2018-11-10 15:46:48 -0600 received badge  Notable Question (source)
2018-04-26 07:04:14 -0600 received badge  Popular Question (source)
2016-11-30 05:33:10 -0600 commented question Find Corners of a contour

Done ...;)

2016-11-30 03:05:10 -0600 commented question Find Corners of a contour

Thanks for the help. Thats exactly what I mean :)

2016-11-29 07:14:02 -0600 asked a question Find Corners of a contour

Hello,

i want to know how i can find the pixel postion of the corner points of a contour?

I use canny for edge detection and then I am finding the largest contour in the image (see image). Now I need the exact corner points. Important, the display position is variable

image description

If I use minRectArea, I get bad results.

image description

I hope someone can help me :)

2016-11-17 01:20:52 -0600 commented question Tesseract finds letters where none are

The whole preprocessing is opencv. FindContours, Grab ROI.

Now I thought, someone knows here also with tesseract

2016-11-17 01:02:04 -0600 asked a question Tesseract finds letters where none are

Hello guys,

I need your help :)

I use tesseract for text recognize. Therefor I grab al lot of ROI´s in my Image.

Of course some ROI´s are garbage or contain a symbol (see the pictures). But tesseract also find text here like "“v" or a single letter -_-.

Symbol https://picload.org/image/rdwaaiop/sy...

Garbage https://picload.org/image/rdwaailg/ga...

initilize tesseract OCR engine

tesseract::TessBaseAPI *myOCR = new tesseract::TessBaseAPI();
myOCR->Init(NULL, "eng");
tesseract::PageSegMode pagesegmode = static_cast<tesseract::PageSegMode>(7); 
myOCR->SetPageSegMode(pagesegmode);

How can I prevent this?

Thanks.

2016-11-14 06:32:21 -0600 asked a question 3D Rotation - warpPerspective

Hello guys,

I need your help. It is possible to rotate this image with the rotation matrix from the calibration? I would like to align the image for the further processing

If I use warpPerspective and the Rotationmatrix from this camera I get garbage.

My Image: http://fs5.directupload.net/images/16...

My rotation Matrix:

   <Rotation2 type_id="opencv-matrix">
  <rows>3</rows>
  <cols>3</cols>
  <dt>d</dt>
  <data>
    9.8147992305149145e-001 1.4936824389738384e-002
    1.9098181045321724e-001 -1.4484503241020826e-002
    9.9988800853888926e-001 -3.7642457405153026e-003
    -1.9101664799880488e-001 9.2825496726222116e-004
    9.8158635816214179e-001</data></Rotation2>

Output: http://www.bilder-upload.eu/show.php?...

Thanks for your help

2016-10-26 00:27:42 -0600 commented question Boounding Rect float return

thanks for your help

2016-10-24 04:38:53 -0600 asked a question Boounding Rect float return

Hello,

is it possible to get float or double values from bounding rect? I would like to triangulate them and for that I need the exact values and no int.

Thanks for your help.

2016-10-18 04:43:29 -0600 commented question findContours ERROR

The problem was the linking of vs15 and opencv...know it works

2016-10-17 10:03:41 -0600 commented question findContours ERROR

no I use the debug libs for debug and the release for release. Strange is that it works debug compiled in VS but not the debug.exe version

2016-10-17 07:43:32 -0600 asked a question findContours ERROR

Hello,

I need your help!

When I compile my code in VS15 in debug mode and start it with VS everything works.

But if I run my program as debug exe, I get this error after findContours image description

The problem comes from findContours, but I have no idea to fix it. -_-

If I create a release version of my application. The app crashes without an error.

2016-10-12 06:33:34 -0600 commented question Buffer to Mat

Is working. Thank you very much :)

2016-10-12 06:11:11 -0600 commented question Buffer to Mat

About the PixelFormat I found the following

https://secure.toshiba-teli.co.jp/ttf...

According to api the Pixel Format is BayerGR8

2016-10-12 05:54:19 -0600 commented question Buffer to Mat

These are the image information I get from the function.

Or do you mean something different?

image description

2016-10-12 05:05:45 -0600 asked a question Buffer to Mat

Hello guys,

I need your help.

I work with two cameras with a resolution of 4000x3000. Because of USB3 Vision I can only access with the manufacturer api on pictures.

As return value I get a pointer

void*                    BufferCam = NULL;
Strm_ReadCurrentImage(mStrmCam, BufferCam, &uiPyldSize, &sImageInfo);

Now I want to write the data into a cv Mat like this

Mat mCam= Mat(3000, 4000, CV_8UC3, BufferCam, Mat::AUTO_STEP);

Unfortunately my matrix keep empty. If I change size of the rows and cols like this

Mat mCam= Mat(1080, 1920, CV_8UC3, BufferCam, Mat::AUTO_STEP);

it work, but the image is understandably garbage.

image description

2016-09-23 04:14:16 -0600 commented question Triangulate Points from Stereo Image

The unit is in mm. I need an accuracy of 0,5mm. Yes, it's possible that the chessboard are not exactly parallel to the image plane but what I have to change then, so that the values are constant?

If I use the projection matrices from stereo rectify, all of my values are bad

2016-09-22 00:18:52 -0600 commented question Triangulate Points from Stereo Image

Short excursion

My stereosystem consists of vertical parallel-aligned cameras.

I calibrate the cameras with several chessboard images from various positions (load the images from desktop) and create the 3D points of my chessboard in its own coordinate system as follow

vector<Point3f>  obj;
for (int j = 0; j<sChess.board_n; j++)
{
    obj.push_back(Point3f(0.02377*(j % sChess.board_w), 0.02377*(j / sChess.board_w), 0));  
}

Now I use the last image pair to check the triangulation.

Image Camera up https://picload.org/image/rdrlldgd/me...

Image Camera down https://picload.org/image/rdrlldgg/me...

According to my understanding, after triangulation the depth must be constant, respectively the distance from camera to Chessboard.

2016-09-21 07:15:31 -0600 asked a question Triangulate Points from Stereo Image

Hello guys,

I hope someone can help me with my problem :)

That's my approach

I have two cameras and now I want to calculate the 3D coordinates of an object. For this, I calibrate the cameras individually and then I use stereoCalibrate.

Now I have the intrinsic and extrinsic parameters and would like to triangulate. To do that, I create the projection Matrices like this.

Basically one camera I can keep as P1= K1 [I|0] (identity rotation and 0 translation), and the other camera P2= K2*[R|t] (rotation and translation between the cameras from stereoCalibrate())

These matrices I hand over to the triangulate function (http://www.morethantechnical.com/2012...)

To test the triangulation

Checkerboard: 9x6 and 12 mm per square

I use the reference checkerboard images because the depth should be constant but i have depth "linear". The x and y coordinates are accurate over the entire distance to 0.2mm.

The picture shows the values for the first two rows. As you can see the depth is strange

image description

Anyone know where is my problem? Thanks.

2016-09-19 06:53:47 -0600 received badge  Editor (source)
2016-09-19 01:15:28 -0600 answered a question Stereosystem triangulate points

I have a new problem...as you can see, I create my projection matrix as described above.

The z value of the triangulation is not good. As you can see the z value is constantly increasing although I triangulate the reference chessboard. Normally, the Z value would still be 0

Image

image description

Can anyone help me?

2016-09-19 00:45:46 -0600 received badge  Enthusiast
2016-09-13 12:52:08 -0600 commented answer Stereosystem triangulate points

Okay, I will give it a try...thank you

2016-09-13 04:09:21 -0600 commented question StereoCalibration RMS Problem

Thanks for your help.... yes I forgot the flag CV_CALIB_USE_INTRINSIC_GUESS but my great fault was that I reversed two calibration Images :D

Now everything fits....thank you

2016-09-13 01:39:19 -0600 asked a question StereoCalibration RMS Problem

Hi guys,

I have a strange Problem. I want to calibrate a vertical stereo camera system.

First I calibrate each camera individually

double rms = calibrateCamera(xObjektPoints, xImageCam1, Size(3000,4000), intrinsic, distCoeffs[0], rvecs1, tvecs1, CV_CALIB_USE_INTRINSIC_GUESS +   CV_CALIB_ZERO_TANGENT_DIST);

double rms2 = calibrateCamera(xObjektPoints, xImageCam2, Size(3000, 4000), intrinsic2, distCoeffs[1], rvecs2, tvecs2, CV_CALIB_USE_INTRINSIC_GUESS +   CV_CALIB_ZERO_TANGENT_DIST);

The RMS are 0,21 and 0,23...thats okay...but now I use stereoCalibrate and the RMS is 24

double rms3 = stereoCalibrate(xObjektPoints, xImageCam1, xImageCam2,
    intrinsic, distCoeffs[0],
    intrinsic2, distCoeffs[1],
    Size(3000, 4000), R, T, E, F,
    TermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 100, 1e-5)
    );

Can someone help me?

Thanks

2016-09-12 10:05:09 -0600 received badge  Student (source)
2016-09-12 01:11:28 -0600 commented answer Stereosystem triangulate points

And this...the variables mProjection1, mProjection2 I hand over to triangulate

hconcat(mRot1, tVec1, rt_a);  
hconcat(mRot2, tVec3, rt_b);

Mat mProjection1, mProjection2;
mProjection1 = intrinsic * rt_a;
mProjection2 = intrinsic2 * rt_b;

Unfortunately that was wrong, can you help me?

2016-09-12 01:09:50 -0600 commented answer Stereosystem triangulate points

Thanks for your help. But I think I'm doing something wrong. You say I need to invert one of the rotation/translation matrices

for (int i=0; i<xObjektPoints.size(); i++)
{ 
    solvePnPRansac(xObjektPoints[i], xImageCam1[i], intrinsic, distCoeffs[0], rVec1, tVec1);
    solvePnPRansac(xObjektPoints[i], xImageCam2[i], intrinsic2, distCoeffs[1], rVec2, tVec2);
} 

Rodrigues(rVec1, mRot1); // R is 3x3
mRot1 = mRot1.t();  // rotation of inverse
tVec1 = -mRot1 * tVec1; // translation of inverse
Rodrigues(mRot1, rVec1);

To chain them I do this

composeRT(rVec1, tVec1, rVec2, tVec2, rVec3, tVec3);
Rodrigues(rVec3, mRot2); // R is 3x3
2016-09-12 00:56:52 -0600 received badge  Supporter (source)
2016-09-11 11:00:49 -0600 asked a question Stereosystem triangulate points

Hi guys,

currently I am working on a program that takes 3d coordinates from non rectified stereo images with triangulate. First I give you a short insight into my program.

I tried it on this way (OpenCV, C++):

1.
Calibrate the cameras with several chessboard images from various positions. I create the 3D points of my chessboard in its own coordinate system as follow

vector<Point3f>  obj;
for (int j = 0; j<sChess.board_n; j++)
{
    obj.push_back(Point3f(0.02377*(j % sChess.board_w), 0.02377*(j / sChess.board_w), 0));  
}

2.
To get the camera intrinsic I use stereoCalibrate and the extrinsic I calculate with solvePnP. So i get the rotation and translation vector of each camera.

double rms3 = stereoCalibrate(xObjektPoints, xImageCam1, xImageCam2,
    intrinsic, distCoeffs[0],
    intrinsic2, distCoeffs[1],
    Size(3000, 4000), R, T, E, F,
    TermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 100, 1e-5),
    CV_CALIB_USE_INTRINSIC_GUESS  + CV_CALIB_ZERO_TANGENT_DIST
);

for (int i=0; i<xObjektPoints.size(); i++)
{ 
    solvePnP(xObjektPoints[i], xImageCam1[i], intrinsic, distCoeffs[0], rVec1, tVec1);
    solvePnP(xObjektPoints[i], xImageCam2[i], intrinsic2, distCoeffs[1], rVec2, tVec2);
}

3.
Next I create two Projection Matrices. I convert the rotation vector with Rodrigues to a rotation matrix and chain the rotation matrix with the translation vector to a 3x4 matrix. Last but not least I multiply both 3x4 matrices with the respective camera matrix (intrinsic).

Rodrigues(rVec1, mRot1); // mRot1 is 3x3
Rodrigues(rVec2, mRot2); // mRot2 is 3x3

Mat rt_a, rt_b;
hconcat(mRot1, tVec1, rt_a);  
hconcat(mRot2, tVec2, rt_b); 

Mat mProjection1, mProjection2;
mProjection1 = intrinsic * rt_a;
mProjection2 = intrinsic2* rt_b;

4.
As last step I triangulate the images points

double ImagePoints1[3] = { points1[i].x, points1[i].y, 1 };
double ImagePoints2[3] = { points2[i].x, points2[i].y, 1 };

        Mat mPoint1 = Mat(3, 1, CV_64FC1, ImagePoints1);
        Mat mPoint2 = Mat(3, 1, CV_64FC1, ImagePoints2);

        Mat test = triangulate_Linear_LS(mP1, mP2, mPoint1, mPoint2);

Thats the Stereo-System, Image is from Matlab

image description

Now my question:

To test the program I use the first chessboard images from the stereosystem, because I know all 3D coordinates (object points from 1), find the corners and triangulate them.

My results look good because the calculated 3D points are the same as the object points from 1

The Z-Value is near to 0, I tkink the chessboard is probably the origin. But I want that the z value reflects the distance from the stereo camera system to object for example the first corner top left X: 0 ; Y: 0 ; Z: 64.

Do you know what I mean?

I hope someone can help me....thanks.