ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Kirielson's profile - activity

2014-06-03 14:00:25 -0500 received badge  Famous Question (source)
2014-06-03 14:00:25 -0500 received badge  Notable Question (source)
2014-06-03 14:00:25 -0500 received badge  Popular Question (source)
2012-09-19 21:30:16 -0500 received badge  Famous Question (source)
2012-09-19 21:30:16 -0500 received badge  Popular Question (source)
2012-09-19 21:30:16 -0500 received badge  Notable Question (source)
2011-07-06 07:15:31 -0500 answered a question Iterate points for OpenCV's Line function

I fixed it with two things,

First it's cv.Line not cv.line

Second of all, this is how you would want to do the listing:

for i in range(min(len (currFeatures), len (self.prev_draw_features))): # Find out which index is shorter
    currpoint = currFeatures[i]
    currpoint = (int(currpoint[0]), int(currpoint[1])) #Also code out the same setup for prev_draw_features
    cv.Line(new_image, currpoint, prevpoint, 123, 5)
2011-07-06 07:10:48 -0500 commented answer Iterate points for OpenCV's Line function
Yeah I will.
2011-07-05 05:33:40 -0500 commented answer Iterate points for OpenCV's Line function
Okay I got it fixed thanks!
2011-07-05 05:33:21 -0500 marked best answer Iterate points for OpenCV's Line function

What you probably want is:

for ((x,y), (px,py)) in zip(currFeatures, self.prev_draw_features):
        cv.line(new_image, (px,py),(x,y),cv.RGB(125, 20,200),5)
2011-07-05 01:46:57 -0500 commented answer Iterate points for OpenCV's Line function
I get new image from a live feed camera.
2011-07-02 14:23:21 -0500 commented answer Iterate points for OpenCV's Line function
Okay I did try that but then I got the error: File "****", line 73, in callback cv.line(new_image, (px,py),(x,y),cv.RGB(125, 20,200),5) TypeError: <unknown> is not a numpy array Would I need to first extract all of the information out then re-insert it in?
2011-07-02 06:37:39 -0500 asked a question Iterate points for OpenCV's Line function

I'm trying to iterate from two tuples to create a line connection previous points to currents points.

    for (x,y) in currFeatures and (px,py) in self.prev_draw_features:
            cv.line(new_image, (px,py),(x,y),cv.RGB(125, 20,200),5)

Which then leads me to this error:

[ERROR] [WallTime: 1309631642.294530] bad callback: <bound method="" cached_subscriber.callback="" of="" <__main__.cached_subscriber="" instance="" at="" 0x2bbb290="">> Traceback (most recent call last): File "/opt/ros/diamondback/stacks/ros_comm/clients/rospy/src/rospy/topics.py", line 563, in _invoke_callback cb(msg) File "**", line 70, in callback for (x,y) in currFeatures and (px,py) in self.prev_draw_features: NameError: global name 'px' is not defined

Is it possible to iterate between two tuples at the exact same time, or will I need to construct a new variable to iterate between the elements. Keep in mind that the tuples may not be equal (which probably negates my "and" statement.

Thanks.

2011-06-30 09:08:16 -0500 answered a question cvAlign Question

Okay I solved my problem. It seems for Python, at least where I'm running ROS's OpenCV for Python, the images and the pyramids are mixed up if you got the error: error: pyramid A has insufficient size. So wherever you would put your images, you would then put your pyramids and viceversa.

2011-06-30 08:27:57 -0500 asked a question cvAlign Question

Short version: Hello, I was wondering what cvAlign does in the inner functions.

Long version: I've been looking at cvCalcOpticalFlowPyrLK code and there's a function

pyrA = cvGetMat( pyrA, &pstubA );

if( pyrA->step*pyrA->height < icvMinimalPyramidSize( imgSize ) )
    CV_Error( CV_StsBadArg, "pyramid A has insufficient size" );

which then leads to this:

static int icvMinimalPyramidSize( CvSize imgSize )
{
    return cvAlign(imgSize.width,8) * imgSize.height / 3;
}

can anyone tell me what cvAlign does (is it bit alignment)?

2011-06-29 08:01:34 -0500 marked best answer Cache Access from Message_Filter

I think you are looking for that function:

std::vector< MConstPtr > getInterval (const ros::Time &start, const ros::Time &end) const

The callback is for new messages. I guess it's just there because it is a filter.

2011-06-29 08:01:34 -0500 received badge  Scholar (source)
2011-06-29 08:01:33 -0500 received badge  Supporter (source)
2011-06-28 01:53:09 -0500 answered a question Cache Access from Message_Filter

Bump for awareness.

2011-06-28 01:52:43 -0500 received badge  Editor (source)
2011-06-27 13:07:09 -0500 asked a question Cache Access from Message_Filter

In the message_filter package, there is a cache function that allows you to store data for a temporary amount of time. How would you access this cache properly? I understand that the function in message_filter says for doing a callback but how would go and create this callback function for the cache. I want to access different parts of the cache.