worker backround

I'm programming in VS2008 c#.

I create a model by drawing a RIO in an image on a viwer and extracting. I have then to display this image in a viewer and break a new image and place this image in a different viewer. I click on a button and it calls a method: Search() who finds the model and draws a border around it. Here's the code for research.

public int Search()

{

CWIMAQMatchPatternOptions MatchOptions = new CWIMAQMatchPatternOptions();

MatchReport CWIMAQPatternMatchReport = new CWIMAQPatternMatchReport();

CWIMAQRectangle SearchRectangle = new CWIMAQRectangle();

CWIMAQPoint FoundPoint = new CWIMAQPoint();

Model CWIMAQImage = axCWIMAQViewer6.Image;

Picture of CWIMAQImage = axCWIMAQViewer7.Image;

int result = 0;
MatchOptions.MatchMode = CWIMAQMatchModes.cwimaqMatchRotationInvariant;

MatchOptions.MinimumMatchScore = 450;

MatchOptions.NumMatchesRequested = 1;

MatchOptions.MinimumContrast = 30;

MatchOptions.SubPixelAccuracy = false;

SearchRectangle.Left = 1F;

SearchRectangle.Top = 1F;

SearchRectangle.Width = 599F; (float) axCWIMAQViewer7.Image.Width;

SearchRectangle.Height = 469F; (float) axCWIMAQViewer7.Image.Height;

Try

{

Result = this.axCWIMAQVision1.MatchPattern2 (photo, model, MatchOptions, MatchReport, SearchRectangle);

Result = this.axCWIMAQVision1.MatchPattern2 (this.axCWIMAQViewer7.Image, this.axCWIMAQViewer6.Image, MatchOptions, MatchReport, SearchRectangle);

this.axCWIMAQVision1.Invoke (delegate (MethodInvoker) {axCWIMAQVision1.MatchPattern2 (this.axCWIMAQViewer7.Image, this.axCWIMAQViewer6.Image, MatchOptions, MatchReport, SearchRectangle) ;});})

}

catch

{

MessageBox.Show ("No image or model", "Error");

Vision.FoundPoint.X = - 1;

Returns - 1;

}

If (MatchReport.Count! = 1).

{

MessageBox.Show ("model not found.", "Error");

Vision.FoundPoint.X = 0;

Returns - 1;

}

Showing results

axCWIMAQViewer1.Image.Overlays.Item (1). Clear();

for (int I = 0; I have< matchreport.count;="">

{

Result = axCWMachineVision1.DrawPatternMatch (axCWIMAQViewer1.Image.Overlays.Item (1), MatchReport.Item (I + 1), System.Drawing.ColorTranslator.ToOle (System.Drawing.Color.Red));

CheckCameraError (w, "DrawPatternMatch");

}

axCWMachineVision1.DrawSquarePoint (axCWIMAQViewer1.Image.Overlays.Item (1), FoundPoint, 5, CWIMAQOverlayModes.cwimaqOverlayModePaint, System.Drawing.ColorTranslator.ToOle (System.Drawing.Color.Green)); return 0;

}

Well, it works fine when I call the method by clicking on the button, but now I need to have done automatically during treatment, so I put it in a background job

' Private Sub FindGlass_DoWork (ByVal sender As Object, DoWorkEventArgs e)

{

While (!.) FindGlass.CancellationPending)

{

switch (no)

{

I knew as soon as I posted this I want to understand this. The image is to be engaged in the main thread. The research focuses also on the main thread. When I click on the buttons to power on and search for research cannot be done until the snap is completed and the image was attached to the observer. By calling these same indirectly from a background async work it seems that research can be called while the image is still acquired. Nothing, nothing found.

Tags: NI Hardware

Similar Questions

  • THE CALICO CAT WINDOWS DESKTOP BACKROUND WILL BE WORK ON A VISTA ULTIMATE 32-BIT WINDOWS AND ANY SERVICE PACKS DELL INSPIRON 531?

    I have a Dell Inspiron 531 in the House. It's Windows Vista Ultimate 32 bit without service pack. Can I download wallpaper cat Calico of Windows (r) and set it as background?

    Sincerely,.

    Numbuh3wearsabutterflycoutume

    PS I went on the site of Microsoft Windows to download, but I cancelled.

    Although the calico at http://windows.microsoft.com/en-US/windows/downloads/personalize/wallpaper-desktop-background cat is technically for Windows7, I don't see that this will not work on your system (since it is, after all, just an image).  Go ahead and try it.  I don't think that you will have problems with the issue of the service pack with just a background image.  If it does not or you cannot configure it to your liking, then maybe it does not match with the theme you are using (but which is not likely or must have its size adjusted before putting the context).  But I suspect that it will work fine.

    I hope this helps (and BTW, I LOVE the photo since I am a person cat myself).

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Satellite A300D-17F it works so slow that the other portable

    Satellite A300D-17 F

    Hi friends

    Since I bought this machine, I am not happy.
    There is a problem: he works so slow than other laptops and they have inferior properties.
    I don't understand.

    I almost have to break. I've done all the tips (uninstall tempro, stop the backround programs, program viruses... etc) but it's the same.
    -J' I want to listen to an mp3 that is not open for ten seconds, watch the movie it is not open again for 9 to 10 seconds.
    -i wana to connect to a site web it freezes
    -for example the search for Messenger is taking once again for secondssssss
    -implementation of xp, it is hourssss
    but the machines of my friends who have inferior properties are so fast

    Is there someone has this machines? It has the same problems? or only I have these problems?

    Thank you very much right now.

    Could you please follow the first thread you already created on the same theme:
    http://forums.computers.Toshiba-Europe.com/forums/message.jspa?MessageID=174820

    This would prevent double posts.

  • I come to me on my computer and everything was gone. All my files, shortcuts and backround have simply disappeared. It's like I've never been on my computer before. I have nothing! How to get everything back?

    I come to me on my computer and everything was gone. All my files, shortcuts and backround have simply disappeared. It's like I've never been on my computer before. I have nothing! How to get everything back?

    You have been discharged into a temporary user account. It may be a glitch, or your user account may be damaged. First try a system restore when things worked. If it suits it, fine. If it is not then your account is damaged and the best thing to do is to create a new user account and copy your data from the old to the new. I would also like to do a Chkdsk and then some hardware diagnostics on the hard drive and RAM to make sure that the material is solid.

    CHKDSK - click here to open the computer. Right click on the hard drive you want to check, and then click Properties. Click on the Tools tab and then, under error-checking, click check now. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    To automatically repair problems with files and folders that the scan detects, select automatically fix file system errors. Otherwise, the disk check will simply report a problem, but not to fix them.

    To perform a full disk check, select search and attempt to recover bad sectors. This scan is trying to find and repair physical errors on the hard drive itself, and it may take much longer to complete.

    To check for errors file and the physical errors, select both automatically fix errors in file system and search for and attempt recovery of bad sectors.

    Click Start.

    Depending on the size of your hard disk, this may take several minutes. For best results, do not use your computer for any other tasks while it checks errors.

    Note: If you select automatically errors in file system of fix for a disc that is used (for example, the partition that contains Windows), you will be prompted, see the disk check for the next time you restart your computer.

    Hardware tests - http://www.elephantboycomputers.com/page2.html#Hardware_Tshoot

    Corrupt user account - if your single administrative user account is damaged (and therefore have what one user account is A Bad Thing), you must log on to the built-in Administrator (disabled by default in Vista) account. From there, you can create a new user account for yourself. In these cases, I prefer not to copy the whole profile to a new way to do not copy the bits corrupt. I prefer a new user account to copy the data (documents, photos, emails, etc.). Here are the instructions to do this. I assumed that you had only an administrative account, then you might want to take a look at the "general recommendations for setting Up user accounts in Vista" at the end of this post.

    All this requires a certain level of computer skills. You know better and that take the machine to a competent local computer tech (not a type of BigComputerStore/GeekSquad place) is the best solution for you.

    Activation of the built-in administrator.

    Method 1. If you have an installation of Vista DVD (not a recovery DVDs), you can start the system with it. Select the default language, then select "repair your computer". Then select "Command Prompt". At the command prompt, type:

    NET user administrator / Active: Yes [Enter]

    If you do not have a Vista installation DVD, you can either make a bootable DVD of Vista repair in the file at this link:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    Note: All the Neosmart recovery disk downloads are torrent files. There is a good explanation of the torrent on the site Web of Neosmart files. You will need a torrent as muTorrent client to get the files. Torrent client will download the .iso file with which to create the bootable DVD.

    After net user, remove the bootable CD and restart the computer. You will now see an icon for administrator on the Welcome screen. Connect to this account.

    Method 2. Or you can use NTpassword to enable the built-in administrator. In both methods, you need third-party burning software such as Nero, Roxio or the free ImgBurn (http://www.imgburn.com ) to burn the .iso image image file, not in the form of data.

    http://home.eunet.no/pnordahl/ntpasswd/

    B. create a new user account for yourself and by copying data from your damaged to her user account

    1. you are now connected to the built-in Administrator account. Go to control panel > user accounts and create a new Standard user for your daily work. Let's call it "Sheldon" for this example. Also create an administrator user, called 'CompAdmin' (or 'Tech' or similar).

    4 Ouvrezunesession 'Sheldon' once for profile files are created. Now log off 'Sheldon' and 'CompAdmin '. In "CompAdmin", disable the built-in security administrator. Do this from a command prompt:

    Start > Search > type: cmd
    When cmd appears in the above results, right-click and choose "Run as Administrator". Provide the password/OK to the UAC prompt. Now, you will get the command prompt. Type:

    NET user administrator / active: No. [Enter] and exit the command prompt.

    5. always in 'CompAdmin', you want to open two windows explore side by side. Open computer and navigate to C:\Users\old-corrupted-account. Now, do that again, but navigate to C:\Users\Sheldon. Copy the data from 'old-corrupted-account' on records in 'Sheldon '. Remember your Favorites, bookmarks (if you use Firefox) and by e-mail if you use an email like Windows Mail client.

    6. When you are finished, log in to "Sheldon. All your stuff should be there. When you are sure to have what you need, you can remove the old man-corrupted-account control panel > user accounts.

    General C. recommendations for creating users in Vista:

    You absolutely don't want to have only one user account. As XP and all the other modern operating systems, Vista is an OS multi-user with system built-in accounts such as administrator, by default, all users and guest. These accounts should be left alone because they are part of the structure of the operating system.

    In particular, you do not want one account user with administrative privileges on Vista because the administrator account integrated (normally only used in emergencies) is disabled by default. If you use as an administrator for your daily work, and this account is corrupt, things will be difficult. It is not impossible to activate the built-in administrator to rescue things, but it will take third-party tools and work outside the operating system.

    The user account that is for your daily work must be a Standard user, with the extra administrative user (call it something like 'CompAdmin' or 'Tech' or similar) only it for elevation purposes. After you have created "CompAdmin", connect to it and change your normal user account Standard. Then log on to your regular account.

    If you want to go directly to the desktop and ignore the Welcome screen with the icons of the user accounts, you can do this:

    Start Orb > Search box > type: netplwiz [Enter]
    Click continue (or provide an administrator password) when you are prompted by UAC

    Uncheck "users must enter a user name and password to use this computer". Select a user account to connect automatically by clicking on the account you want to highlight and press OK. Enter the password for this user account (when it exists) when you are prompted. Leave blank if there is no password (null). MS - MVP - Elephant Boy computers - don't panic!

  • When I login, the screen just shows my backround

    Recently while trying to partition my hard drive (for storage purposes), there is a startup error, I ran simply cranking up the repair of my recovery disk and I was back running. When I started Windows Vista I have come to the login screen, but my keyboard did not work, I connected the keyboard on the screen, once I logged all that appeared was my desktop backround. No mouse, menus records or anything like that. I can't really lose my files... (of the important things on my hardrive,) what should I do?

    Thank you

    You may have a corrupt user profile. To fix this use http://windows.microsoft.com/en-AU/windows-vista/Fix-a-corrupted-user-profile.  If that is the only available Administrator Profile (you need to be an administrator to fix this), enable the Hidden Administrator Account (HAA) using http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.windows.vista.administration_accounts_passwords&p=1&tid=d20f9db4-7b2c-48be-a087-7835dc2a9055&mid=d20f9db4-7b2c-48be-a087-7835dc2a9055.  If you don't remember the password, try nothing because that's probably what you (or seller) did during the installation.  Once that is done, don't forget to disable the HAA to save it in case it is necessary once again and for safety reasons (since people often try to hack into systems using this account).  Do NOT use the HAA as your administrator account because if you lose the only administrator on the system account or it is damaged again, then you're watered.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Why custom themes work correctly?

    When I create a custom theme and save it, it will overwrite all my other registered custom themes. Is this a bug? Honestly I don't know what to do. I've lost hard to find photos because I only set it as wallpaper, and then saved as a custom theme. Then when it creates an unsaved theme and I get a new backround, I save it. It will not only record the new theme, but it will overwrite the previous theme, that I rescued. Is there a way can I fix? I hope my explanation makes sense.

    Hi Alisia86,

    Follow the suggestions below for a possible solution:

    Method 1: You can run the aero Troubleshooter and see if it helps.

    Open the Aero Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Aero-Troubleshooter

    Method 2: Try the SFC (System File Checker) scan on the computer.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7

    http://support.Microsoft.com/kb/929833

     

    Method 3: If this does not work, create a new user account and check. If it works in a new user account, then probably your user account have been damaged and would need a fix.

    Create a user profile.

    http://Windows.Microsoft.com/en-us/Windows7/create-a-user-account

    Now search for the question.

    Follow the link provided below to fix the damaged user profile.

    Difficulty of a corrupted user profile

    http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

     

    Let us know if that helps.

  • Cannot complete the process of backround with force as an administrator. Even with administrator privileges. More details inside.

    I have a question. Im trying to kill with force an Application that is running in the backround (Skype.exe) process using the administrator command prompt using taskkill /f / pid 1580, which is the pid of the program). Whenever I try to kill the process, it gives me an error that says that "the process with PID 1580 could not be completed. Reason: Access is denied. Basically, I'm the only user on this computer and I all administrative rights that it meal. Ive, run the command prompt and the Manager of the tasks as an administrator. Ran a/scannow in command prompt. Basically, Skype is corrupted and won't let me sign in, it says "Skype is already running on this computer, disconnect and try again". I am not connected to Skype, uninstalled, re-installed with the same error. I tried to remove data from application of Hidden manually, with no success, because "a program in this folder is running" that's why I'm finishing the process Skype.exe. There are 2 current Skyoe.exe process, it is hidden and we're not. I have no idea what another o addition to restart in safe mode, and I don't even know where to begin here. Mess using the BIOS im afraid ill something upward. It's really annoying, please help.

    System Specs:
    Computer: HP Envy M6 1105-DX
    OS: Windows 8
    : A-10 AMD processor series
    RAM: 6 GB OF RAM
    GPU: AMD HD Radeon 7660g

    Yes. But I thought about it. It was taskkill/f/PID 1580 after reboot total sytem line cmd running in mode sans-echec as admin, after having used/scannow. I was then able to remove all records of hidden data app, re - install Skype and it works fine now.

  • When I plug my headphones I get backround music but no voice, what's the problem?

    A few days ago, I remove the headphone jack of my computer with my foot. Since then the headphones aren't working properly. Looks all backround sounds like music and the basic sounds of windows work but if there is no speaking voice distant and distorted sounds.

    Hi Revan,

     
    You are able to hear the sound from the speakers with no problems?

    Check if the headphone jack works fine. Check with another helmet if you are able to hear clearly.
     
    If you are using a desktop computer, then connect the headphones to the audio jack back of Panel audio jack front panel and check.
     
    Note: If there is no question about the speaker then, I suggest you to connect with another computer and look for the question, if yes, then you need to contact your manufacturer to get the headphones replaced or repaired.
     
    For more information see the mention of the article below.

    Connect one microphone, music player or other audio device to your computer
    http://Windows.Microsoft.com/en-us/Windows7/connect-a-microphone-music-player-or-other-audio-device-to-your-computer

     
    I hope this helps.

  • Bing dynamic theme has stopped working.

    I had recently installed the Bing Dynamic Theme for Windows 7. The theme worked properly and I loved. However the next day of the day where I had it installed I noticed it sitting on an image instead of change. I went to control panel to check the personalization settings when I clicked on the solid Bing Dynamic screen replaced by a black background theme. After this point, I tried to uninstall and then reinstall the Bing Dynamic theme. When I reinstalled the theme it does not allow me the RSS and everytime I tried it continues to apply only the solid black backround. After the reinstallation, I'd go to in the Desktop Backround options and could see that the location of the photo has been set on solid with selected Black color. He had an additional option in what appeared to be the injector for the dynamic bing that resembled the theme server address. However, whenever I would choose it I would get an error.

    After looking around for some answers, I found this post.

    http://social.answers.Microsoft.com/forums/en-us/w7desktop/thread/d5805d09-8479-47C5-bdf8-f4286c5af9be

    I followed these instructions, thinking I might have a similar problem. After you run the fix the theme still does not work. The only change he seemed to do, is that I have more to select the theme server in the location of the image after selecting the bureau backround.

    Sorry for the long winded post, but I thought the more detail the better.

    The long and short of it is Bing dynamic Theme worked. Then it stopped working and when you try to reinstall I no longer get the option to allow RSS feeds. Bing dynamic theme is sitting on a black background and even with reboots and waiting no image is never downloaded.

    Thanks in advance for any help.

    Bing Dynamic vs Piriform CCleaner - Community Forums:
    http://Forum.Piriform.com/index.php?showtopic=29310
    Dynamic difficulty Bing Theme after using CCleaner

    Ramesh Srinivasan . The Winhelponline Blog
    Microsoft MVP, Windows desktop experience

  • Im getting an iPhone SE of the United Kingdom, I would like to know if it works in Albania

    I want to know if this works with the carrier that I choose

    It depends, if your carrier allows you to call or text outside of your region. Your iPhone will work in any country

  • Why video does not work in safari

    The video on all Web sites IN safari has stopped working. No idea why?

    Do you get any error messages? If this is not the case, see if by double clicking the home button and drag to the top safari help. -AJ

  • USB disabled after the update of the Sierra (a short circuit and a work)

    Hi, when I bought my mbp 13 inches mid2012 (used, not new) I noticed that a USB port did not work. In the Yosemite sometimes I noticed that a USB port consumed too much energy and have been disabled. (I think because the usb port has been short-circuited. Year when it was time to update the mbp to El Capitan I had a few panic the kernel and the newspaper was shown as the last driver loaded the USB driver, so I kept the mbp with Yosemite. A few days ago, I updated for Sierra but only usb which used to work stopped working. It has enabled and turned on but Finder and disk utility does not see the drive. In an Apple dealer they said that could be established relationships with some oxide and next week will take it and see what the problem is.

    If there is someone with the same problems, please tell me what to do! I don't want to put in the trash my mac just for a flash drive... but I need!

    Hi Supermene,

    Thank you for using communities of Apple Support. Based on what you said, it appears as a USB device is not recognized in one of the USB ports. There are a few things that can cause this. I recommend you read these articles, which may be able to help solve the problem.

    macOS Sierra: If a USB device does not work

    Reset the management system (SCM) controller on your Mac.

    See you soon.

  • bought iphone7 pluse Qatar facetime doesn't work for the sim card of the India

    Hello Sir,

    I bought iphone7 pluse in qatar that the facetime doesn't work for the sim card of the India. and also before 2 years I bought the iphone 6, as well as in the same countries qatar, but that works perfectly and facetime works for me. the difference what I unbox my 6plus in indai, I unbox my 7plus in qatar and I put the sim card of sri lanka first and tried to India sim then and facetime disappear from the home screen. at the point where I insert my card sim of qatar is worrking. Please I need help. If I buy another piece of 7plus and bring it in sri lanka or India my facetime work? or what? I'm totally confused plese answer me as fast as you can

    FaceTime is forbidden by the law in Saudi Arabia and the UNITED Arab Emirates and is removed from iPhones sold in other countries of the Middle East, if they are used outside the country where they were originally sold. If you plan to use an iPhone outside the Middle East, then don't buy it in the Middle East. The one you bought there FaceTime was illegally imported from another region and sold it.

  • My App Store did not work... When I try to update or install apps it does not work. Can you please fix this?

    Can you please fix the problem? Appstore cannot update or install apps... App Store not worked yesterday.

    We cannot solve a problem for you, but we can make suggestions of troubleshooting...

    Have you tried restarting your iPhone yet?

    1. Press and hold the sleep/wake button until the Red slider appears.
    2. Drag the slider to turn off your device completely off.
    3. Once the device turns off, press and hold the sleep/wake button again until you see the Apple logo.
  • Safari does not work after installing macOS Sierra

    Safari and apple store does not work after installing macOS Sierra

    Alas, my crystal ball is in the shop for cleaning, so you will need to provide more details on what "doesn't work" and above all error messages. First of all, let's start the App Store. Provide as much information as possible for those of us who do not sit on your shoulder.

Maybe you are looking for

  • Problem with El Captain (5.1.7 server) and the management of permissions

    Hello world I have a big problem with our Mac Mini Server (El Captain) and the server program. In recent weeks, the server didn't give the permissions of a folder. for example: Mr. X had permission to read and write to a folder.Mr Y too. Mr. X has cr

  • Next page causes contextual developer tools: how to stop?

    FF 41.0.2, the Inspector of Developer Tools window appears whenever I hit Page Down. How can I stop it? I have already enabled devtools.inspector.enabled false, but this has no effect.

  • Unable to see the websites the child has visited

    Ive done everything I was told but are still unable to visit Web sites they have visited... Please help soon... THANKS... :) Original title: sorry but I am not able to view websites my child has visited... im using windows 7 can someone help...?

  • Games Sims 3 Deluxe - Windows 7

    Can Sims 3 Deluxe to run on Windows 7? Also all the Myst games work on Windows 7? I heard that only the 10th Anniversary Collection Myst and Myst 4 will run on Windows 7.   I feel that a lot of games does not say on the back of their box of which the

  • Windows Live Mail error ID: 0x8BAD0022

    Server error: 0x8BAD0022 Server: 'http://mail.services.live.com/DeltaSync_v2.0.0/Sync.aspx '. Windows Live Mail error ID: 0x8BAD0022