Visual C++ :: How To Run OpenCV Program

Mar 15, 2013

I am trying to run an OpenCV program from command line, but it gave error like "The program can`t start because opencv_220d.dll is missing from your computer." Try reinstalling the program to fix this problem. I am using Windows 7 & Microsoft VC++ 2010. How can I run the program?

View 4 Replies


ADVERTISEMENT

Visual C++ :: OpenCV In MFC App?

Feb 5, 2014

I have a C++ app that uses OpenCV. Currently i am statically linking the OpenCV libs into my app. This is adding an extra overhead of 6+ MB.

i would like to remove some of the features that i am not using in OpenCV. The features am using are,

Capture frames from Webcam.

Face detection.

Image formats (JPEG, PNG).

Image rotation & resizing.

Is it possible to remove other features and trim down the libs?

My C++ app is developed in Visual Studio 2012.

View 1 Replies View Related

C++ :: How To Run OpenCV Program

Mar 15, 2013

I am trying to run an OpenCV program from command line, but it gave error like "The program can`t start because opencv_220d.dll is missing from your computer." Try reinstalling the program to fix this problem. I am using Windows 7 & Microsoft VC++ 2010. How can I run the program?

View 3 Replies View Related

Visual C++ :: Compare Two Histograms In OpenCV?

Mar 5, 2013

I am tying to compare two histograms, but it gives error. Here I have given my code, histogram file and error message. Histogram file 3*5 matrix(output_test.txt):

1 2 3 4 5
5 2 1 4 2
2 1 2 4 2

code:

Code:
int main(..........)
{
................................................
Mat first_histogram(1,feature_vector_size, CV_32F);
Mat second_histogram(1,feature_vector_size, CV_32F);

[Code]....

Error message: error LNK2019: unresolved external symbol "double __cdecl cv::compareHist(class cv::Mat const &,class cv::Mat const &,int)" (?compareHist@cv@@YANABVMat@1@0H@Z)

View 1 Replies View Related

Visual C++ :: Create Histogram From A Set Of Values In OpenCV?

Mar 9, 2013

I have a text file which consist of several values. These values represent distance from origin to any point in the triangle. How can I create histogram from these values? Is there any functions in OpenCV which can create histogram from these values? Below my sample values are given:

..........................

3.4 1.2 6.9 0.2 5.1 2.9

........................

View 1 Replies View Related

C++ :: OpenCV - Create A Program Which Would Calibrate Camera

Feb 1, 2013

I am doing a project, which requires me to create a program which would calibrate the camera. The code is below.

#include<opencvcv.h>
#include<opencvhighgui.h>
#include<stdlib.h>
#include<stdio.h>
#include<vector>
using namespace cv;
int main() {
int numBoards = 0;

[Code] ....

I am a beginner to opencv.

View 14 Replies View Related

C++ :: How To Compare Two Histograms Using Opencv

Mar 6, 2013

I am tying to compare two histograms, but it gives error. Here I have given my code, histogram file and error message. Histogram file 3*5 matrix(output_test.txt):

1 2 3 4 5
5 2 1 4 2
2 1 2 4 2

code:

int main(..........)
{ ................................................
Mat first_histogram(1,feature_vector_size, CV_32F);
Mat second_histogram(1,feature_vector_size, CV_32F);
for(i=0;i<count_row;i++)
{
for(j=0;j<count_row;j++)
{

[Code]...

Error message: error LNK2019: unresolved external symbol "double __cdecl cv::compareHist(class cv::Mat const &,class cv::Mat const &,int)" (?compareHist@cv@@YANABVMat@1@0H@Z)

View 5 Replies View Related

C++ :: Cannot Load OpenCV Library

Mar 22, 2014

I am trying to run a console program but for any reason it displays an error on the cv.h line.

View 5 Replies View Related

C :: OpenCV And Detecting A Person With A Webcam

Jul 2, 2013

Code:
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"

#include <stdio.h>
#include <stdlib.h>

[Code] ....

The above code is all I have so far. I got confused when I got to the part where my book on C tells me I need to use the cvCalcOpticalFlowFarneback() function to compare 2 consecutive images from the webcam and create the optical flow, and then measure movement between the frames to detect whether or not a person is moving through the room. How to do this, and the OpenCV wiki wasn't very descriptive on how to set it up for beginners. Honestly, the parameters just confused me and I didn't see a return value listed, or how you would get data from it.

View 8 Replies View Related

C++ :: OpenCV - Opening And Closing Webcam

Jan 24, 2015

I am trying to switch between 2 states, and the event that determines which state i am in is based on the key i've pressed. So in this case i want the webcam to start automatically, and when key is pressed it then turns it off. The way I've done it is like this :

bool webcam_on() {
int c = 0;
VideoCapture cap(0);
if ( !cap.isOpened() ) // if not success, exit program

[Code] .....

The problem with this method is that cin.get() blocks the video stream.. I wanted something that the webcam turned on until i press some key, which would trigger the release.. How can this be done?

View 7 Replies View Related

C++ :: How To Create Histogram From A Set Of Values In OpenCV

Mar 9, 2013

I have a text file which consist of several values. These values represent distance from origin to any point in the triangle. How can I create histogram from these values? Is there any functions in OpenCV which can create histogram from these values?

Below my sample values are given:
..........................
3.4 1.2 6.9 0.2 5.1 2.9
........................

View 2 Replies View Related

C++ :: Split Image To 3 Channels - Opencv Error

Mar 18, 2013

I am currently planning on splitting my image into 3 channels so i can get the RGB values of an image to plot a scatter graph so i can model is using a normal distribtion calculating the covariance matrix, mean, etc. then calculate distance between the background points and the actual image to segment the image.

Now in my first task, i have wrote the following code.

VideoCapture cam(0);
//int id=0;
Mat image, Rch,Gch,Bch;
vector<Mat> rgb(3); //RGB is a vector of 3 matrices
namedWindow("window");

[Code] ....

but as soon as it reaches the split function, i step through it, it causes a unhandled exception error. access violation writing location 0xfeeefeee.

I am still new to opencv, so am not used to dealing with unhandled exception error.

I tried adding items into the vector still error, either via push_back or general assignment i.e. rgb[0] = Rch or Bch still error.

View 6 Replies View Related

Visual C++ :: Program Run In Another Program

Jul 22, 2014

I want to make a program which can run in another program. My program have structures flowing:

while (1) {
check (keypressed);
{
do something;
}
}

But check(keypressed) function only active in my program, It can't run in another program.

View 7 Replies View Related

Visual C++ :: Creating DLL From Program

Jan 15, 2013

I wanna create a DLL from my C++ program. My output of my C++ program is a text file called Centre_Cartouche.txt My output is two text files called brd.txt and sym.txt

At the beginning my program was just a main which contains all development (Main.cpp). Now I created function (in _Cartouche.h and _Cartouche.cpp).

My debugger tell me that the simulation works. But my file Centre_Cartouche.txt is not create.

_Cartouche.cpp_Cartou.hbrd.txtsym.txt

View 1 Replies View Related

Visual C++ :: Program That Get Data From DAT File

Mar 5, 2014

I am currently writing a program that grabs information from a .dat file. When I go to debut I get this error.

Code:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
// function step 1 - declare the prototypes
void sort(int n); // catches an integer number from the call
void swap(string *p1, string *p2); //catches the location of data in ram

[Code] .....

View 5 Replies View Related

Visual C++ :: Running GUI Program In Background?

Apr 22, 2013

i created a windows service that will run another program. but the program i want to run has a gui and i don't want the gui to be visible, i just want the program to run in the background.

But i have to do it without editing the gui program

here's my code:

Code:
TCHAR* path = L"C:Myfile est.exe";
STARTUPINFO info = {0};
PROCESS_INFORMATION processInfo;
ZeroMemory( &info, sizeof(info) );
info.cb = sizeof(info);

[code]....

i tested this code with notepad and it runs notepad in the background without displaying the window but when i try run my program it doesn't work. i don't know why its works for one program and not the other..

View 14 Replies View Related

Visual C++ :: Program To Resize Image?

Feb 19, 2013

I am currently working on problem set 4 for Harvard's online CS50 course. I am working on a program that resizes a bmp image by a factor of N. N in entered along with an in-file and out-file in a command line argument. The program needs to calculate the header file for the out-file and write it to the out-file. It then needs to actually resize the image and, again, write to the out-file.

The first question I have relates to the header file, here is my code for calculating the header file:

bi2.biHeight = bi.biHeight *n;
bi2.biWidth = bi.biWidth *n;
int padding = (4 -(bi.biWidth * sizeof(RGBTRIPLE))%4)%4;
bi2.biSizeImage = (bi2.biWidth * sizeof(RGBTRIPLE) + padding) * abs(bi2.biHeight);
bf2.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + bi2.biSizeImage;

And here is my code for writing the new header file (bi2 and bf2) to the out-file:

fwrite(&bf2, sizeof(BITMAPFILEHEADER), 1, outptr);
fwrite(&bi2, sizeof(BITMAPINFOHEADER), 1, outptr);

At this point I need to actually resize the image. As far as I can tell there are 2 ways to go about this you either have to use an array to store each line you want to print repeatedly (and then you can just write it repeatedly) OR you have to move the pointer back in the input stream and repeat the read/resize/write process each time you need to print the row.

It is this that I am stuck on, first of all, I am not sure what system would be better for resizing the image, although I am leaning towards using an array, and regardless, I don't even know where to begin when in implementing either.

So what I am asking for is, first of all, just a "double check" to make sure my header code makes sense. And second of all, a push in the right direction for actually resizing the image. Here is my complete code:

/****************************************************************************
* resize.c
*
* Resizes a BMP piece by piece, just because.
***************************************************************************/

#include
#include
#include "bmp.h"
int main(int argc, char* argv[]) {
// ensure proper usage
if (argc != 4) {
printf("Usage: copy N infile outfile

[Code]....

View 7 Replies View Related

Visual C++ :: DLLS For Installation Program

Aug 27, 2013

I am making an installation program. The set up project I made automatically detected dependencies. Dependencies were one ocx file I am using and some *.msm files. I haven't yet tested the installation program in the target machine.

My problem is that I have no control over the location of dlls installed in the target machine. Those *.msm files, I think
will be installed in the system32 (or wowsystem64?) folder. Do my msi installation program check the version of the dlls
already available in the target machine before overwritting them?

Another way will be to find out the dependencies with "dependency walker" and manually add those dlls to the
application folder of my installation program. But this way will be really difficult one.

View 2 Replies View Related

Visual C++ :: Building A Savings Account Program?

Mar 12, 2014

#include "stdafx.h"
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

[Code].....

I need to modify the program to use annual interests rates of 3%, 4%, and 5%.

After that I need to modify the program to make it so the user enters the dollar amount of the deposit, the interest rate or rates, and the number of years.

I'm a design student at New England Tech but before we can go full design they want to make sure we know for sure if we want to be a designer or a programmer and so we need to take C++ classes

View 4 Replies View Related

Visual C++ :: MFC Execute DOS Program And Resume Code At The End

Jun 9, 2013

I have a Third Party MS-DOS program, RUN.EXE

RUN.EXE do the following:

1. Read FILE.INP as input file and run its code execution.
2. When finish, RUN.EXE will produce FILE.OUT as the output of its code execution.
3. However, if calculation made in the code execution come to unsatisfied condition, RUN.EXE will terminate without producing FILE.OUT or partially produce FILE.OUT.

I want to write a program using MFC which I can set a several input case. The program should be able to:

1. Call RUN.EXE.
2. Wait for RUN.EXE to exit.
3. Continue with other code.

I can't modified RUN.EXE. I can't have RUN.EXE callback my program to let know it finish its work.

Are there any functions to call RUN.EXE, a MS-DOS program? Are there any way for the program to check if RUN.EXE finish its work and exited?

View 4 Replies View Related

Visual C++ :: Get Program To Read From File Of 15 Scores?

Dec 10, 2014

I'm trying to get the program to read from a file of 15 scores. 10 are quizzes 5 are exams. I want my program to read from the input file the first name "or" last name and if the user puts a different name, the program Gives off an error screen message

Code:
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
const int NUM_STUDENTS = 20;
const int NUM_QUIZZES = 10;
const int NUM_EXAMS = 5;

[code]....

View 14 Replies View Related

Visual C++ :: Splitting Child Window In MFC MDI Program?

Dec 4, 2012

how to split a child window in an MFC MDI program.

Splitting Child Window in MFC MDI Program

[URL]

For my purposes, this achievement is practically useless because I cannot find a way to pass text from one CRichEditView window to another.

Given two CRichEditView windows, CInputViewView and COutputView as child windows in an MFC MDI app, my goal is to capture text in the former and print that text in the later using a button click.

Using what appeared to me to be a logical way to proceed, I tried variations of the following code:

Code:
void CMainFrame::DoSomething() {
//MessageBox(_T("Like What ?"), _T("Do Something"));
//CInputViewView * pin = (CInputViewView*) GetActiveView();
CInputViewView * pin = (CInputViewView*)m_wndSplitter.GetPane(0,0);
pin->GetWindowTextW(m_csDisplay);

[Code] ....

None of this works and even the attempt to access the pane results in an app crash in winsplit.cpp.

Code:
#ifdef _DEBUG
void CSplitterWnd::AssertValid() const {
CWnd::AssertValid();
>ASSERT(m_nMaxRows >= 1);
//..

View 4 Replies View Related

Visual C++ :: Converting Program From Struct To Class

Sep 20, 2014

I am not exactly sure how to do this and i keep running into problems. This is my code here that works.

Code:
#include<iostream>
using namespace std;
struct record {
double quiz1;
double quiz2;
double midyear, midyear_one;

[Code] .....

View 5 Replies View Related

Visual C++ :: Creating DLL That Will Be Used As Plugin In External Program Using MFC

Jan 30, 2013

This is the problem in detail:

I have a VC++ project to create a DLL that will be used as a Plug-in in an external programm. This DLL uses some MFC functions. The initial configuration of the project was:

-Use of MFC: Use MFC in a Static Library

-Common Language Runtime support: No Common Language Runtime support

-Runtime Library: Multi-threaded Debug (/MTd)

This configuration worked fine, there were no compilation errors and the resulting DLL worked correctly.

The problem came when it was necessary to add to the DLL some functions of .NET, using the namespace System and similar. To do that, I had to change the Common Language Runtime support, to Common Language Runtime Support (/clr). Then, when I tried to compile, I got this message:

'/MTd' and '/clr' command-line options are incompatible

So I changed the Runtime Library to Multi-threaded Debug DLL (/MDd). Then I got this error message:

Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version

So I also changed the Use of MFC to Use MFC in a Shared DLL.

After this, the compilation was correct. Then logically the size of the generated DLL is smaller, but this new DLL does not work correctly, the external program in which this DLL is used crashes.

I don't know what to do to fix the problem. Maybe I need to add some other DLLs or files to the directory where the DLL is located, where the external program uses it. But I would prefer to include a single DLL file, but this seems to be incompatible with the use of .NET functionality.

View 11 Replies View Related

Visual C++ :: Program That Reformat And Output Date

May 30, 2013

Write a well-commented C++ program that reformats and outputs the date. Prompt the user to input the date in the format dd/mm/yyyy and outputs it in this format month, dd, yyyy. For example, 07/06/2012 is displayed as June 07, 2012. You are provided with the file months.txt containing the months and their corresponding numbers, for example 01January 02February etc. Use getline(monthsFile,monthString) to read in a string from the file, and use the monthString.find() function to search for the number and extract the corresponding month.

-confused by the way she told me to use getline(monthsFile,monthString) => if I just do it like this I only get the first line from the txt file (01January)
-if I try putting all the months on one line in the txt file (which i'm not even sure i'm allowed to do), I'm not sure what to do for the length of my substring output. if I make it long enough to fit longer months like September, someone entering may gets both may and june in the output
-if I input all the months into separate variables, I'm not sure how to make it only output the month entered by the user

the months.txt file is as follows:

01January
02February
03March
04April
05May
06June
07July
08August
09September
10October
11Novmber
12December

View 1 Replies View Related

Visual C++ :: URLDownloadToFile Not Allowing The Program To Return Value

Jun 2, 2013

I've been writing some code and this is part of it:

Code:
...
URLDownloadToFile(NULL, _T("http://something/something.txt"), path, 0, NULL);
return 0;
}

The file gets downloaded successfully but the downloader wont exit (return value 0). So it remains active.

I am sure the problem is URLDownloadToFile()

I am using Visual Studio 2010 Express.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved