Thanks for the reply. The issue is the function I am using accpets vector as input and re-writing it is not possible at the moment.
Raza5680
Posts
-
Question regarding std::Vector.... -
Question regarding std::Vector....There is a little improvement but for cases with more coordiante values ( > 2000) it is still slow. I am trying to get rid of the for loop, since at each index there a two values (pixel coordinates) using .assign is a bit tricky for me thanks
-
Question regarding std::Vector....Hi, I am working with images and computing radon transform for an object. the function that computes the transform accepts vector as input:
pixel p;
vector segObj //segObj is the object segmneted from the imagepixel is a user-defined struct defined as:
struct pixel
{
float x, y; //x,y coordinates of the pixel
};Currently, I am doing an element wise assignment to the vector:
for(int ix=0; ix < element_count; ix++)
{
{
f.x = xCoordArray[ix];
f.y = yCoordArray[ix];
segObj.push_back(f);
}
}//xCoordArray and yCoordArray are computed separately The for loop makes it slow when dealing with large images. Is there a way to assign xCoordArray and yCoordArray directly to
vectorsegObj
I am not expereinced with the use of vectors so any help would be appreciated Thanks
-
reading file using fscanf();Thanks for replies.
-
reading file using fscanf();Hi, I have a text file that looks like 0 0:3649 1:1643563 2:563726 3:2358500 4:1706041 5:1399436 6:1021542 7:2612862 8:2399618 9:2177296 10:507745 11:2504905 1 0:2072009 1:1497603 2:886529 3:43699 4:266555 5:1062838 6:429603 7:483804 8:2882799 9:1299756 10:347278 11:13617 2 0:25988 1:1101998 2:1550469 3:1665724 4:1754902 5:1770655 6:484783 7:1933614 8:1314619 9:1026882 10:166341 11:1772168 3 0:2284363 1:2340611 2:1516115 3:880566 4:2554567 5:2119179 6:2787658 7:2699637 8:1572897 9:415096 10:1347549 11:686279 The first element is the line number nad then it is arranged as 'attribute:value'. Due to large number of elements one line of data spans two or more lines of a text file. please note that there are no empty lines I have just done it for clarity. how to read the first elements of each data line(in this case 0, 1,2 ,3) regardless of the the numebr of lines spanned in the text file any help will be appreciated thanks
-
Finding index of an array element??Hi, Is there any function that returns an index of a particular element in a numeric array. Thanks P.S. I am looking for an equivalent of MATLAB's find() function.
-
problem with text field, address bars etcthanks for the replies the keyboard is clean but i think there is something wrong with the key it does not work sometimes and sometimes it goes crazy
-
problem with text field, address bars etcHi, I have been having this strange problem for a couple of days When I am using the internet, dots (or periods) start appearing in an active text field or address bar of the bro.ws.er like this.: ........................................ so. is. it a vi.rus. or. so.mething. wro..ng. with my l.apto.p need. help thanks.... .........
-
3D mesh materialhey, can someone suggest good book or online material on 3d mesh manipulation that starts from basic concepts thanks
-
Displaying image (RAW format) on a controlhey.. i am using C++ (wxWindows for GUI)--I have an image file in RAW format ...i have read the file into a 2-D array, how that data is to be used display the image on a control? thanks
-
Reading/displaying Image in raw formathey, thanks Mark for the reply.. hopefully the idea you gave will solve my problem
-
Reading/displaying Image in raw formathey.. i am using C++ (wxWindows for GUI)--I have an image file in RAW format ...i have read the file into a 2-D array, how that data is to be used display the image on a control? thanks
-
2d drawing----help???hey... need help in 2D drawing ...I want to add drawing ablity for elliptical curves, arcs and ellipses...most of the tutorials i have seen just draw static curves.. I want the drawings to be based on points specified by the user(through mouse clicks) but I having a little trouble in drawing circular arcs using three points(like in AutoCAD)... any help will be appreciated thanks
-
Using Mousewheel----help needed?hey, I want to use MouseWheel for my drawing application...Idea is to expand and contract a circle depending upon the direction of wheel motion...which function/property to use..? thanks
-
Use of trignometric func.??-----------help urgenthey.. I am working on a drawing application(using openGL) how to use trig. functions sin, cos in c-sharp etc.......the error is displayed 'Sin/cos does not exist in current context... how to use these and other maths functions. thanks
-
OpenGL slection/picking(mouse based) HEELP?I am currently working on a drawing application using openGL and C#..........having a nightmare trying to grasp concept of selection/picking... My application will be drawing 2D(later 3D) objects...the user will be able to select any edge of a polygon and move it around/modify it.. I have seen few tutorials but they were not really useful..i am still confused about how the retreived information in selection mode(Hits records) will help in performing above mentioned editing functions kindly help please suggest links/tutorials (better if in C#) thanks
-
Drawing Application--Line Selection?hey.. i am currently working on a C#/openGL drawing application.....drawing is great but I need to incorporate functionality to select and edit lines with the help of mouse...plz suggest good tutorials from your expereince cheers
-
Drawing in Panel---help needed Urgenthey... I am working on an application that used the complete form for drawing(using openGL) but the problem is that after I add menus to my application the menus are not displayed at run-time.... kindly tell how to solve this problem?? someone also suggeted to use of panel how to setup panel for drawing in C#?/ thanks
-
drawing in a picture box(using C-Sharp)hey... currently working on a graphics application using C# and openGL....intially the whole from was used for drawing...but now I want to refine my application by adding controls and drawing in a picture box but having problems properly defining a drawing area in a picture-box....kindly help me in this regard thanks
-
Drawing in picture box--C#/opengl helphey... currently working on a graphics application using C# and openGL....intially the whole from was used for drawing...but now I want to refine my application by adding controls and drawing in a picture box but having problems properly defining a drawing area in a picture-box....kindly help me in this regard thanks