Forum: C++ Jul 22nd, 2009 |
| Replies: 10 Views: 519 If you're up to getting to grips with Qt, the QString class has a comprehensive range of extra methods that don't feature in std::string. One of these is split(). The advantage of this method is... |
Forum: C++ Jul 22nd, 2009 |
| Replies: 10 Views: 388 I should indeed! Touché! :)
In the instance under discussion here, vector <int> my_vec; would be the ticket. |
Forum: C++ Jul 22nd, 2009 |
| Replies: 10 Views: 388 I know that you're just starting out and doing these things as exercises, but if you want a simple and practical way to do this, then I'd use an STL vector instead of a C-style array. You need to... |
Forum: C++ Nov 20th, 2007 |
| Replies: 10 Views: 18,108 for(int x=2; x < width-1; x++)
for(int y=2; y < height-1; y++) {
sx = convolve_gauss(imgGrey, x, y, mask);
sy = convolve_gauss(imgGrey, x, y, mask);
imgGrey[x][y] = (sx+sy)/2;
... |
Forum: C++ Nov 18th, 2007 |
| Replies: 10 Views: 18,108 I don't know about your floating point error, but you are wasting a bit of time here. Because of the way this equation for generating the gaussian mask works, the maximum will always be at i = 2, j... |