Ask Your Question

srig's profile - activity

2014-02-28 04:01:33 -0500 received badge  Student (source)
2014-02-28 00:26:24 -0500 commented question Pass a value say "the final value" from a main function to some other class I am designing.

Suppose this is my code of main function:

int main(int argc,char*argv[]) {

m.at<float>(i,j) = exp(-RR/(2b2))(1-exp(-S2/(2c2)))*exp(-hypotenuse/gradscale); return 0; }

m is the matrix which is the final result this function... and shaprDetect() is the function of class Vsharp. now I want to use the "m" in this function shaprDetect to do some processing on it.

void Vsharp::shaprDetect() { }

Now tell me how to use that "m" in this function. }

2014-02-28 00:05:27 -0500 commented question Pass a value say "the final value" from a main function to some other class I am designing.

But how to define a function which gets data from main and store it in the class variables. This is the main problem actually. I have designed the class other than main function. I have also made a function in this class which will be doing some processing. But in that function only I need to use the final result of the main function. And I am facing problem in getting that final result of main function in the function of the class.

2014-02-27 04:05:26 -0500 asked a question Pass a value say "the final value" from a main function to some other class I am designing.

Hi,

Actually I designed a code in C++ with the help of OpenCV to process some image. In the main function I did something on image img and the processed image which I get at last is img_final.

No I am making one new code in the same project and started with the class because its not possible to have two main functions in same project. So, I designed another alogrithm with the help of class. Now I want to get the values of img_final and some other 2-3 parameters that are to be used in the present code. Both the codes are in the same project.

Please help me how to do it. I am new to programming.

Thanks.