Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kikoso

@kikoso
About
Posts
12
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Linking Error
    K kikoso

    mmmm... I would say is basically the same :S

    C / C++ / MFC debugging help

  • Problem with Win32 Threads
    K kikoso

    Hello, I finally found the problem. The code for the Thread Function was inside the ref class, so that made it managed code. I finally put outside it, and now is working fine :) Thank you.

    C / C++ / MFC data-structures c++ security help question

  • Linking Error
    K kikoso

    Check if you added to the Visual Environment, as a first step, the correct configuration for external libreries: * Open Visual * Choose menu "Tools" and select "Options" * In "Projects and Solutions" and go to "VC++ Directories" * Show directories for "Library Files" and "Include files" * Add your libraries and includes you need for your project. This is the most common error while linking ;)

    C / C++ / MFC debugging help

  • Problem with Win32 Threads
    K kikoso

    Thank you HimanshuJoshi. I was reading in zig-zag the doc, so I didn´t realize about it. I still have some problems. After changing it, I have a problem accessing the memory. This is the error I got (after using 0 instead of CREATE_SUSPENDED,: Unhandled exception at 0x003628c2 in OpenCV Win32.exe: 0xC0000005: Access violation reading at position 0x0000000c. I´ve been thinking about sending the 3 parameter as (LPTHREAD_START_ROUTINE)&OpenCVWin32::Form1::Threadi, But I got a different error: error C3374: Address of "OpenCVWin32:: Form1:: Threadi" can only be adopted if a delegate instance is created. I will appreciate any suggestions. Thank you :)

    C / C++ / MFC data-structures c++ security help question

  • Problem with Win32 Threads
    K kikoso

    Hello! Thank you! I didn´t though that passing the parameters will be compulsory. But nevermind, I put it on my code.

    C / C++ / MFC data-structures c++ security help question

  • Problem with Win32 Threads
    K kikoso

    Hello all, I´m trying to multithread an application by using CreateThread function. So far I´ve done the following:

    //Here I initialize the Thread
    LPDWORD iID;
    HANDLE hThread; // array of thread handles
    hThread = CreateThread (
    0, // Security attributes
    0, // Stack size
    (LPTHREAD_START_ROUTINE)OpenCVWin32::Form1::Threadi,
    NULL,
    CREATE_SUSPENDED,
    iID);
    }

    //Called function
    static DWORD WINAPI Threadi()
    {
    System::Windows::Forms::MessageBox::Show("Hi there!");
    return 0;
    }

    When I launch the application, the thread is not created, as I cannot go inside the Threadi function. I´m right now using VC++ 2008. Does anyone has a suggestion on why this could be happening? Thanks

    C / C++ / MFC data-structures c++ security help question

  • Performance on VC++ Application
    K kikoso

    Thank you Miguel, So far the application seems to compile when I declare the threaded function as static, but I have some memory violations problem (could be solved by using Mutex?). I will read the documentation you suggested me, and try to post if I find a solution. Cheers.

    C / C++ / MFC c++ performance help question

  • Performance on VC++ Application
    K kikoso

    Hola Miguel, and thank you for answering Basically, I´ve the following problems: Following this manual: http://support.microsoft.com/?scid=kb%3Ben-us%3B815805&x=13&y=8[^] Everytime I try to switch to (/clr:oldSyntax), instead of just /clr, I´m getting so many errors with my application (like using public, private, etc :P). Following this manual: http://hemswell.lincoln.ac.uk/~slawson/napier/CO42018/labs/lab06.html[^] The line that says:

    hThreads[0] = CreateThread(NULL,0,MyThread,"T1",NULL,&iID[0]);

    Drop me this error (translated from German to English): error C3867: "OpenCVWin32::Form1::ExampleFunction": The function call is missing argument list. Use "& OpenCVWin32:: Form1:: ExampleFunction" to create a pointer to the member. So I use the mentioned syntax. And then: error C3374: Address of "OpenCVWin32:: Form1:: ExampleFunction" can only be adopted if a delegate instance is created. So at this point I´m really blocked :S

    C / C++ / MFC c++ performance help question

  • Performance on VC++ Application
    K kikoso

    Hello all, I developed a VC++ application. Basically I extract some data from the webcam, process it and give the results to a formular. When I initiate the data processing, the GUI does not respond anymore. The data processing is still going on, because I can check with breakpoints that the analysis has not crash. But as the computer seems to be bussy on the data processing, I can not display it on the Windows. I was considering using Threads, but I´m having some problems with the Threads provided by VC++, so I might move to pthread instead. Does anyone have faced this problem before? Is there any recomendation or suggestion? Thank you, and best regards, Enrique

    C / C++ / MFC c++ performance help question

  • Integration of WinForm and Visual C++
    K kikoso

    Found a solution (and a new problem) to this. I just post the solution in case anyone check it in the future :) I basically transform the IplImage into Bitmap, and then paint it over a Form element. void IplImageToTBitmap (IplImage* image){ System::Drawing::Bitmap^ bitmap = gcnew Bitmap(image->height,image->width * image->nChannels,System::Drawing::Imaging::PixelFormat::Format24bppRgb); int numberOfLines= image->height; int numberOfColums= image->width ;//* image->nChannels; int step= image->widthStep; unsigned char* data=reinterpret_cast<unsigned char*>(image->imageData); for(int i=0; i<numberOfLines; i++){ for(int j=0; j<numberOfColums; j+= image->nChannels){ bitmap->SetPixel(j/3,i,Color::FromArgb(data[j],data[j+1],data[j+2])); } data+= step; } this->panel2->BackgroundImage = bitmap; } Using the sentence this->panel2->BackgroundImage = bitmap; I manage to write the image to a Panel Object (and definitely every object able to support bitmaps). Now I´m trying to work just with the frames from OpenCV not displaying the video (that means, commenting the line cvNamedWindow( "video", 1 );) Nevertheless, the program gets frozen and I´m not able to use it. I´m thinking about doing some stuff with Threads (using a Thread for OpenCV and a different one for the GUI), but any advice will be welcome :) Regards

    C / C++ / MFC c++ help question csharp json

  • Integration of WinForm and Visual C++
    K kikoso

    Hello Superman, and thank you for your response. OpenCV has not such an ActiveX. Just provide the basics image analyzing algorithms, and a basic Windows system based on Win32 API. After some days checking for it on the internet I have not found a response. There are some clues using MFC, but using just the standard Forms of Visual C++ doesn´t seem possible (or at least obvious). Nevermind, thank you for your interest. If a get a solution I will share it here (and if anybody has more clues, I´ll be pleased of hear them) Cheers, Kikoso

    C / C++ / MFC c++ help question csharp json

  • Integration of WinForm and Visual C++
    K kikoso

    Dear all, I might ask for help regarding this issue in the list, because I´m pretty sure someone dealt with this in the past. I´ve searched in this forum. There is one similar question, but the solution involves MFC (which does not apply for me) I have coded an application for Visual C++ Express. It basically consists on a VC++ Form and a OpenCV windows displaying video. At some point I recollect the information from the OpenCV Video Window, and I reflect it on the VC++ Form. After finishing the first draft of the application, I was considering improving the interface. The first natural step will be to integrate both OpenCV Window and VC++ Form. I´ve checking the code for cvNamedWindow, and it uses Win32 API (as expected). I´ve looking on the internet, and most of the solutions came by using MFC (which I do not use) or moving to .NET (so late). Does anyone of you have faced this problem? Does anyone has solutions or guidances? Best, Kikoso

    C / C++ / MFC c++ help question csharp json
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups