Search Results

Search found 2499 results on 100 pages for 'face recognition'.

Page 8/100 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • What's wrong with this turn to face algorithm?

    - by Chan
    I implement a torpedo object that chases a rotating planet. Specifically, it will turn toward the planet each update. Initially my implement was: void move() { vector3<float> to_target = target - get_position(); to_target.normalize(); position += (to_target * speed); } which works perfectly for torpedo that is a solid sphere. Now my torpedo is actually a model, which has a forward vector, so using this method looks odd because it doesn't actually turn toward but jump toward. So I revised it a bit to get, double get_rotation_angle(vector3<float> u, vector3<float> v) const { u.normalize(); v.normalize(); double cosine_theta = u.dot(v); // domain of arccosine is [-1, 1] if (cosine_theta > 1) { cosine_theta = 1; } if (cosine_theta < -1) { cosine_theta = -1; } return math3d::to_degree(acos(cosine_theta)); } vector3<float> get_rotation_axis(vector3<float> u, vector3<float> v) const { u.normalize(); v.normalize(); // fix linear case if (u == v || u == -v) { v[0] += 0.05; v[1] += 0.0; v[2] += 0.05; v.normalize(); } vector3<float> axis = u.cross(v); return axis.normal(); } void turn_to_face() { vector3<float> to_target = (target - position); vector3<float> axis = get_rotation_axis(get_forward(), to_target); double angle = get_rotation_angle(get_forward(), to_target); double distance = math3d::distance(position, target); gl_matrix_mode(GL_MODELVIEW); gl_push_matrix(); { gl_load_identity(); gl_translate_f(position.get_x(), position.get_y(), position.get_z()); gl_rotate_f(angle, axis.get_x(), axis.get_y(), axis.get_z()); gl_get_float_v(GL_MODELVIEW_MATRIX, OM); } gl_pop_matrix(); move(); } void move() { vector3<float> to_target = target - get_position(); to_target.normalize(); position += (get_forward() * speed); } The logic is simple, I find the rotation axis by cross product, the angle to rotate by dot product, then turn toward the target position each update. Unfortunately, it looks extremely odds since the rotation happens too fast that it always turns back and forth. The forward vector for torpedo is from the ModelView matrix, the third column A: MODELVIEW MATRIX -------------------------------------------------- R U A T -------------------------------------------------- 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 -------------------------------------------------- Any suggestion or idea would be greatly appreciated.

    Read the article

  • HP's Linux OS Alternative Gets a Face Lift

    OS Roundup: Despite the growing popularity of the myriad Linux OS and cloud computing options, HP-UX retains a strong, albeit leaking, presence. Now, with Sun's UNIX ecosystem in turmoil, HP is seizing the day as it packages and sings the virtues of its Big Iron OS.

    Read the article

  • HP's Linux OS Alternative Gets a Face Lift

    OS Roundup: Despite the growing popularity of the myriad Linux OS and cloud computing options, HP-UX retains a strong, albeit leaking, presence. Now, with Sun's UNIX ecosystem in turmoil, HP is seizing the day as it packages and sings the virtues of its Big Iron OS.

    Read the article

  • HP's Linux OS Alternative Gets a Face Lift

    <b>ServerWatch:</b> "In contrast, IBM and HP, the other two big enterprise UNIX players, have been plodding along steadily, hoping all the while to pick up disaffected Sun customers quicker than they lose their own to Linux implementations."

    Read the article

  • Algorithmic Forecasting and Pattern Recognition

    - by Ryan King
    Say a user could enter project data into my software. Each project has 2 variables "size" and "work" and they're related but the relationship is not known. Is there a way to programmatically determine the relationship between the variables based on previous data and forecast the amount of work provided if only given the size of the project in the future? For Example, say the user had manually entered the following projects. Project 1 - Size:1, Work: 4 Project 2 - Size:2, Work: 7 Project 3 - Size:3, Work: 10 Project 4 - Size:4, Work: x What should I look into to be able to programmatically determine, that Work = Size*3+1 and therefor be able to say that x=13?

    Read the article

  • Tales from the Coal Face - Speeding up a C# compilation

    - by TATWORTH
    At one place, I was faced with a C# solution which when XML documentation was turned on, the compilation time increased from 45 seconds to over 8 minutes. This slowdown was unacceptable, however some digging revealed an excellent suggestion by Eric Woodruff at http://social.msdn.microsoft.com/Forums/en-US/devdocs/thread/9bbad4cc-e229-49da-a6f7-3cdf470ac53a/ where he suggested "just suppress the warning by entering it's number (1591 for C#) in the Suppress Warnings field on the Build tab of the project properties". I followed Eric's suggestion and the compilation time went back down to 45 seconds. Now that CS1591 is suppressed how was missing documentation to be found? All that was necessary was to run StyleCop!

    Read the article

  • From the Coal Face - StyleCop 4.4.0

    - by TATWORTH
    Style Cop 4.4.0 is now out. This is a free download from http://stylecop.codeplex.com/ (please note the new location). This version is for VS2010. If you are usign an older version of Visual Studio you be prepared to keep to an older release like 4.3.0. The more I use StyleCop the more I like it. Code that is style cop compliant is much easier to pick up. It helps if you have GhostDoc (free) and Resharper (from jetBrains.Com)

    Read the article

  • std::vector::size with glDrawElements crashes?

    - by NoobScratcher
    ( win32 / OpenGL 3.3 / GLSL 330 ) I decided after a long time of trying to do a graphical user interface using just opengl graphics to go back to a gui toolkit and so in the process have had to port alot of my code to win32. But I have a problem with my glDrawElement function. my program compiles and runs fine until it gets to glDrawElements then crashes.. which is rather annoying right. so I was trying to figure out why and I found out its std::vector::size member not returning the correct amount of faces in the unsigned interger vector eg, "vector<unsigned int>faces; " so when I use cout << faces.size() << endl; I got 68 elements???? instead of 24 as you can see here in this .obj file: # Blender v2.61 (sub 0) OBJ File: '' # www.blender.org v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1.000000 -1.000000 v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000 v -1.000000 1.000000 -1.000000 s off f 1 2 3 4 f 5 8 7 6 f 1 5 6 2 f 2 6 7 3 <--- 24 Faces not 68? f 3 7 8 4 f 5 1 4 8 I'm using a parser I created to get the faces/vertexes in my .obj file: char modelbuffer [20000]; int MAX_BUFF = 20000; unsigned int face[3]; FILE * pfile; pfile = fopen(szFileName, "rw"); while(fgets(modelbuffer, MAX_BUFF, pfile) != NULL) { if('v') { Point p; sscanf(modelbuffer, "v %f %f %f", &p.x, &p.y, &p.z); points.push_back(p); cout << " p.x = " << p.x << " p.y = " << p.y << " p.z = " << p.x << endl; } if('f') { sscanf(modelbuffer, "f %d %d %d %d", &face[0], &face[1], &face[2], &face[3]); cout << "face[0] = " << face[0] << " face[1] = " << face[1] << " face[2] = " << face[2] << " face[3] = " << face[3] << "\n"; faces.push_back(face[0] - 1); faces.push_back(face[1] - 1); faces.push_back(face[2] - 1); faces.push_back(face[3] - 1); cout << face[0] - 1 << face[1] - 1 << face[2] - 1 << face[3] - 1 << endl; } } using this struct to store the x,y,z positions also this vector was used with Point: vector<Point>points; struct Point { float x, y, z; }; If someone could tell me why its not working and how to fix it that would be awesome I also provide a pastebin to the full source code if you want a closer look. http://pastebin.com/gznYLVw7

    Read the article

  • The New Face of SEO - It Has Taken on a New Role

    As little as just a few years ago, SEO referred to the service of making sure your website code was up to standard and that all of the necessary page elements were in place so your website could effectively communicate with the search engines. Back then, a Search Engine Optimisation consultant optimised your site and submitted it to the search engines and you were off to the races.

    Read the article

  • Tales from the Coal Face - Reporting errors

    - by TATWORTH
    One of the questions that comes up frequently, is "Is it worthwhile to report errors?".Last weekend, after installing the latest StyleCop I loaded up my copy of Power Collections. I found that StyleCop was now correctly picking up a lot of missing "this." statements, however there were now a number of false positives. Anticipating the need to submit sample code, I cleaned the solution and zipped it up.I reported this at http://stylecop.codeplex.com/discussions/357319.  The stylecop administrator promoted this report to a work item (see http://stylecop.codeplex.com/workitem/7285) and I uploaded the previously prepared Zip file. The StyleCop team was able to locate the problem and it is "Fixed in upcoming 4.7.27".The conclusion:Report errors!  Prepare sample code illustrating the error.

    Read the article

  • Two Basic Steps to Enhance Your Web Presence and Brand Recognition

    If you are a confident business person, you must believe that your product is the best a client can get. To present this information to prospective clients, you will need assistance to direct web traffic of users seeking your product to your website where you will have the opportunity to convince them that buying from you will not be a mistake. Most business people stop at stage one because they fail to attract the right clients, they are said to have practically no web presence.

    Read the article

  • 3 Problems Some Large Websites Face With SEO

    Thin content, duplicate content, or little or no original content can be killers to your large website SEO strategy. Using great keywords appropriately can really help indicate the subject matter of the individual page and allow for better SEO indexing. Here are a few tips to help optimize your large website and avoid thin content pages.

    Read the article

  • Ubuntu 13.10 Installer freezes on partition recognition on Alienware M17x

    - by Mutewinter
    I'm trying to install Ubuntu 13.10 on an Alienware M17x, after bypassing the graphical problems with "nomodeset" (annoying!), I'm facing a rather different problem: I click on "Install Ubuntu", the guided installation progress reach the point where the partition, mount point etc. needs to be selected and...nothing. In the partition selection menu it sees only dev/sda, but in the window where the actual way the disk is partitioned should appear nothing shows, it's blank. I've tried to click on "change..." to try to force it to read something, but the installer simply quits. The button "change partition table" etcetera are greyed out (well, obviously, since no partition table has been read). What's that? The Alienware has Windows 7 and legacy BIOS (so no UEFI here). Anyone has an idea? Thanks for your time and help!

    Read the article

  • using Visual Studio 2010 and speech recognition on windows 7?

    - by Kevin Won
    I've never used Speech Recognition (SR) at all, but I'm hearing that the built-in SR capabilities of windows 7 is not half-bad. I'm thinking that it might be a real productivity booster with Visual Studio so I can decrease the use of the mouse (no Emacs comments please ;-). I don't envision not using the keyboard to type the actual code--but maybe that would work too? Does anyone have experience using SR with Visual Studio on Windows 7? If so, any tips on usage?

    Read the article

  • Sub Rectangle or ROI problem in opencv

    - by iva123
    Hi, I'm trying to convert this c code(http://nashruddin.com/OpenCV_Eye_Detection) to the python code, but in c style, he used cvROI thing, since ROI functions are not supported by python-opencv, I tried cvGetSubRect so Here is the eye detection part of the code : eye_region = cvGetSubRect(image,cvRect(face.x,int(face.y + (face.height/4)),face.width,int(face.height/2))) eyes = cvHaarDetectObjects(eye_region,eyeCascade,memo,1.15,3,0,cvSize(25,15)) for e in eyes: cvRectangle(image, cvPoint( int(e.x), int(e.y)), cvPoint(int(e.x + e.width), int(e.y + e.height)), CV_RGB(0, 255, 0), 1, 8, 0) return image; When I run this code, It draws rectangles irrelevant places. I thought, eye_region coordinates are wrong, and tried some coordinates, but it didn't work. Any idea ? Note :Face detection method works very well, and it's code is same with the eye detection method.

    Read the article

  • Eye Detection Problem In Opencv

    - by iva123
    Hi, I'm trying to convert this c code(http://nashruddin.com/OpenCV_Eye_Detection) to the python code, but in c style, he used cvROI thing, since ROI functions are not supported by python-opencv, I tried cvGetSubRect so Here is the eye detection part of the code : eye_region = cvGetSubRect(image,cvRect(face.x,int(face.y + (face.height/4)),face.width,int(face.height/2))) eyes = cvHaarDetectObjects(eye_region,eyeCascade,memo,1.15,3,0,cvSize(25,15)) for e in eyes: cvRectangle(image, cvPoint( int(e.x), int(e.y)), cvPoint(int(e.x + e.width), int(e.y + e.height)), CV_RGB(0, 255, 0), 1, 8, 0) return image; When I run this code, It draws rectangles irrelevant places. I thought, eye_region coordinates are wrong, and tried some coordinates, but it didn't work. Any idea ? Note :Face detection method works very well, and it's code is same with the eye detection method.

    Read the article

  • Why are my descenders being cut off when using CSS @font-face?

    - by Olly Hodgson
    I'm using the Google webfonts API to embed Droid Sans on a page. All is fine, except for the descenders (i.e. the dangly bits on y, g, etc). The latest versions of Firefox, IE and Chrome on my Windows Vista box are all cutting the bottom off. <!DOCTYPE html> <html> <head> <title>Droid sans descender test</title> <meta charset="utf-8"> <link href="http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold" rel="stylesheet" type="text/css"> <style type="text/css"> body { font-size: 16px; font-family: "Droid Sans"sans-serif; } h1, h2, h3 { margin: 1em 0; font-weight: normal; } h1 { font-size: 2em; } h2 { font-size: 1.5em; } h3 { font-size: 1em; } </style> </head> <body> <h1>A bug ran under the carpet anyway</h1> <h2>A bug ran under the carpet anyway</h2> <h3>A bug ran under the carpet anyway</h3> </body> </html> The above code looks like this: I've tried line-height, font-size, padding etc to no avail. I had some success with font-size-adjust, but the last time I checked it was Gecko only. Does anybody know of a fix for this?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >