Ask Your Question

bvbdort's profile - activity

2019-10-24 03:53:10 -0600 received badge  Nice Answer (source)
2017-09-11 10:48:03 -0600 commented question C++ - Y'CbCr422 to RGB - convert from raw data file

Isn't rawSize should be 3 * DEFAULT_FRAME_Y * DEFAULT_FRAME_X; ?

2017-07-26 06:30:48 -0600 commented question Point Grey camera interface with opencv

What error did you get when you execute this code ? Are using Windows or Ubuntu ?

2017-07-26 06:23:09 -0600 commented question Using HoughLinesP to straighten skewed receipt scans

Can you post original RGB image, may be you could directly find the rectangle and can align easily.

2015-03-31 10:16:47 -0600 commented question line segments from same line showing different angles

yes this is from laser data , when i use the angle of segment for calculating distance between lines its giving wrong result.

2015-03-31 09:30:57 -0600 commented question line segments from same line showing different angles

thanks for suggestions, Since i needsegment start and endpoint for furthur calculations increasing maxLineGap is not an option. Also for fitline() i dont know in advance which segments are from sameline.

2015-03-31 08:13:18 -0600 asked a question line segments from same line showing different angles

Hi,

I am using HoughLinesP to calculate lines from image. But the line segments from same line have different angles.

image description

the segments start and end points and angle (in degrees) and length.

id = 0 start(x,y) = (1331 , 790 )   end(x,y) = (1366 , 794 ) Angle = 6.52311 len = 35.2278
id = 2 start(x,y) = (1508 , 807 )   end(x,y) = (1543 , 810 ) Angle = 4.90158 len = 35.1283
id = 4 start(x,y) = (1291 , 786 )   end(x,y) = (1328 , 789 ) Angle = 4.63781 len = 37.1214
id = 8 start(x,y) = (1391 , 795 )   end(x,y) = (1423 , 798 ) Angle = 5.35854 len = 32.1403
id = 9 start(x,y) = (1224 , 779 )   end(x,y) = (1261 , 782 ) Angle = 4.63781 len = 37.1214

To calculate angle i used atan2(y2-y1,x2-x1)*180/3.14

I am expecting same angle since the segments are part of same line.

Is there a way to improve the angle calculation or improving line detection ?

thanks.

2015-03-27 11:01:55 -0600 commented question How to link the matched features with lines

matching part was missing, mDMatch you are passing empty.

2015-03-27 06:53:59 -0600 commented answer How to replace part of the image with another image ROI

i just put complete code lines, let me know it its working and gives you required result.

2015-03-27 03:44:49 -0600 commented question [c++] VideoCapture always returns a null image

how did you check the device id of your camera ?

2015-03-26 07:30:58 -0600 answered a question How to replace part of the image with another image ROI

change

trunctaed.copyTo(target);   // erases all content  of target and keeps truncated image only.

to

trunctaed.copyTo(target(cv::Rect(0, 0, 30, 30))); // replace specified rect of target with truncate image.
Highgui.imwrite(PATH6, target); //img_3  result is in target.

above change gives.

image description

Update :

    Mat temp = Highgui.imread(PATH5);//img_1
    Mat trunctaed = temp.submat(new Rect(0, 0, 30, 30));
    Mat target = Highgui.imread(PATH6);//img_2
    trunctaed.copyTo(target(cv::Rect(0, 0, 30, 30))); 
    Highgui.imwrite(PATH6, target); //img_3
2015-03-19 14:57:30 -0600 commented question Where can I find resources for Computer Vision theory?

@wuling add your link as answer.

2015-03-11 15:38:18 -0600 commented question Android - Rotating an Image

try removing abs for sin and cos calculation.

2015-03-11 10:52:11 -0600 received badge  Scholar (source)
2015-03-10 06:15:22 -0600 received badge  Enthusiast
2015-03-05 23:20:09 -0600 received badge  Nice Answer (source)
2015-03-05 15:14:44 -0600 commented answer Improving line extraction from HoughLinesP

thanks for the answer. Yes this result was better. But using 5° is not good for my case. Since i was using line angle for further calculation. Also i can see that the line 38 from a edge because of line. I am using it with 1° and you answer is helpful.

2015-03-05 04:13:18 -0600 commented question Improving line extraction from HoughLinesP

i tried with 1° and 5° but the result was same.

2015-03-05 03:02:28 -0600 received badge  Teacher (source)
2015-03-04 11:52:08 -0600 commented question Improving line extraction from HoughLinesP

i tried it and didnt solve, here the issue i guess due to width of the edge

2015-03-04 11:47:41 -0600 answered a question OpenCV: BGR to YUV conversion

In c++ use

  cvtColor(img_in, img_out, CV_BGR2YUV);

In python

 img_out = cv2.cvtColor(img_in, cv2.COLOR_BGR2YUV)
2015-03-04 08:55:57 -0600 asked a question Improving line extraction from HoughLinesP

Hi,

I am using HoughLinesP to extract lines from grayscale image.

Below is my psudo code.

threshold(img_tmp,bin_img,30,255,cv::THRESH_BINARY);
Canny(bin_img, canny_img, 50, 255, 3);
vector<Vec4i> tmp_lines;
HoughLinesP(canny_img,tmp_lines, 1, CV_PI/360,10, 10, 1);

As seen in below image single edge (i.e single line in image) is returning more than one line. 16,22 and 0,28 and 10,11 and 23,18,24 lines correspond to single line.

How can i get single line for single edge, any suggestions ?

Input image:

Input image

Extracted lines

image description

Zoomed image

image description

thanks.

2015-02-17 05:09:19 -0600 received badge  Student (source)
2015-01-14 02:17:22 -0600 received badge  Necromancer (source)
2015-01-13 12:06:03 -0600 answered a question Changing line colors randomly.

You can do it by generating random color using rand() function in c++

    for ( ) // inside loop
    {
       // create random color variable
       Scalar clr(rand() % 255,rand() % 255,rand() % 255);  

       // draw line with random color            
       cv::Line(shape, cv::Point(z,a), cv::Point(o,n), clr,1,1); 
    }
2014-11-20 11:00:07 -0600 commented question How to find the best match between two curves, part-to-whole

Did you try Hausdorff distance ?

2014-11-19 19:03:16 -0600 received badge  Supporter (source)
2014-11-03 03:16:17 -0600 received badge  Editor (source)
2014-10-29 12:34:52 -0600 asked a question Keypoint matching on Occupancy grid maps

Hi all ,

I am using ROS Mapstitch package based on Opencv to find transformation bewtween maps ( grayscale images of same size and resolution) to combine them.

The implementation is based on opencvs estimateRigidTransform function, ORB feature extraction and matching the distance of pairwise feature candidates

For my input files the result from estimateRigidTransform is not correct.

Can somebody has any suggestion or know anyother existing methods to improve the result.


input image1

image description


input image 2

image description


keypoint matching

image description

I can see Keypoints are matching to wrong location. In Ideal case upperwall keypoint should match to upperwall.


result

image description


Thanks.

2014-10-22 07:27:18 -0600 received badge  Necromancer (source)
2014-10-22 05:39:39 -0600 answered a question getting compilation error with estimateRigidTransform

Add below header, it solves

#include "opencv2/video/tracking.hpp"