Hello,
I am attempting to perform a zero-crossing edge detection on an image in OpenCV. I blur and use the cvLaplace() then scale it from (0, max). My question is: How can I access the pixel values in that image in such a way as to correctly identify negative values? Using the function provided by OpenCV (cvPtr2D) returns unsigned chars...
I fully understand this question has been asked a lot, but I'm asking for a specific variation and my search-foo has given up, as I've only found algorithms that append one existing vector to another, but not one returned to from a function.
I have this function that lists all files in a directory:
vector<string> scanDir( const string&...
I'm compiling a branch of the Blender 3D modeling program from source (using SCONS), on a Fedora 8 box, and am running into an error that I didn't encounter compiling the same source on a CentOS 5 box, and I'm thinking it has to do with the variable definition. The error is:
source/blender/blenkernel/intern/implicit.c: In function ‘mul_...
I wanted to animate the QWidget maximumWidth in order to change thd widgets size in a layout with animation, but it does not work. I have tried to do the following:
QPropertyAnimation *animation1 = new QPropertyAnimation(m_textEditor2, "maximumWidth");
animation1->setStartValue(0);
animation1->setEndValue(100);
animation1->start();
ED...
is there a difference, from prospective of meta-programming for example, between the two
declarations?
template<typename T>
struct matrix {
typedef matrix self_type; // or
typedef matrix<T> self_type;
};
thank you
...
The closest thread to my question is here. I am trying to compile the following code with gcc:
#include <malloc.h>
class A
{
public:
A(){};
~A(){};
};//class A
int main()
{
A* obj = (A*) malloc( sizeof(A) );
if(obj==0) return 1 ;
obj->A::A(); /*error: invalid use of 'class A' */
obj->A::~A();
free(obj);
return 0;
}...
We're evaluating using Silverlight on C++ for an embedded project and are prototyping some screens for a demonstration.
What I'm finding is that Expression Blend will create XAML files that work fine on the desktop but, when porting them over to the CE device results in parse errors (apparently not all tags and elements are supported on...
Suppose I have a C++ application for a pet store that started out just with Cats. The app has a class that does some data handling for a Cat dialog box:
CatDlg.cpp:
CatDlg::CatDlg() {//ctor stuff}
CatDlg::onInitDialog() {
DBAccess db;
db.open();
CatRec cat;
cat = db.findRec(m_catID);
CString name = cat.getName();
Na...
Hi everyone,
I am really not sure if such a tool exits but let me describe it in few words. I want to measure the performance of a small library I am writing. Basically the library does arbitrary precision arithmetic. I would like to compare the performance of the library against available libraries and get the statistics of the tests. ...
Is there any way to calculate how much updates should be made to reach desired frame rate, NOT system specific? I found that for windows, but I would like to know if something like this exists in openGL itself. It should be some sort of timer.
Or how else can I prevent FPS to drop or raise dramatically? For this time I'm testing it on ...
Hello!
I wonder what techniques xfire and/or Steam uses to overlay into games.
I'm trying to do something similar and I really would like to know what is the least intrusive way, I.e. won't alert any anti-cheat systems. I don't need any kind of information from the game (no wall-hack BS). I would basically just like to display a rectang...
I have hit upon a real brain scorcher in C++, it has never happened to me before.
The gist of the problem is that upon invocation of my (template) function the arguments I have defined defaults for have their values scrambled. It only happens if I call the function with the defaults.
My template function is declared like this:
templat...
I have a template class in which I am specializing a couple of methods. For some reason, when I added a specialization for a struct, it seems to be conflicting with the specialization for bool. I am getting a type conversion error because it is trying to set the struct = bool (resolving to the wrong specialization). Here is some code
...
I am inputting a matrix of black/white pixel values and then I am blurring the inside using an averaging technique. I have the program looping through properly but I need a constant copy of the original matrix for the for loops to use when stepping through. How can I do this?
#include<iostream>
using namespace std;
/****blurImage*****...
I'd rather not install the entire VS 2008 installation given that I'm not going to be using anything other than the compiler. Will VS 2010's multitargeting work correctly using only the Platform SDK instead of the full VS2008 install?
...
My issue is I am trying my first attempt at writing a very basic lexical analyzer for ascii text files. so far, it reads and compares to my token list properly, however I am unable to grab the final token without a space or pressing enter. I've tried using the delimiter ^Z ASCII 26 as another selection before comparing the string to my t...
Hello everyone I'm currently implementing a simple programming language for learning experience but I'm in need of some advice. Currently I'm designing my Interpreter and I've come into a problem.
My language is a subset of C and I'm having a problem regarding the stack interpreter implementation. In the language the following will comp...
Wondering if anyone could point me towards a good recursion tutorial. I am a bit rusty on it as I learned about it in my Data Structures class first semester. Would like to brush up on my recursion...any help?
...
I'm simulating a biological model involving several (27) stiff ordinary differential equations using C++. My program runs perfectly under MS C++ 2010 expression compiler but fails under the g++ compiler (NetBeans 6.8, Ubuntu 10.04 LTS). The problem is that some of the variables become NaN. The following are the values of the variable Vm ...
For example, it this expression valid in semantic?
container.begin() == container.begin();
...