Detecting Maximized Frames in v1.3

Hi
Does anybody know a method for determining whether a JFrame is in the maximized state, in JDK1.3? I know that in 1.4 there is a getExtendedState() method for Frames, but not in 1.3! We need to detect whether out main frame is in the maximized state, as when we shut down our application, we need to record its size, position, and whether it was iconized, maximized, or just in the normal state. We can determine (using Frames getState() method) whether it was iconized or not, but not whether it was maxmized.
At the moment, I can't see a way out, but really need to find one. If anyone know of a method, no matter how obscure it may seem, can you let me know please! DukeDollars are on offer for a good solution (and i'll increase the number of Dukes available if someone can come up with a great solution).
Your help is really appreciated.
Alan

Hi,
you can do it the dirty way in non 1.4. environments using java.awt.Robot to place the mousepointer over the window's maximize button and let the robot press it.
I would suggest you place this best in your Components addNotify()-method, like this:
public void addNotify() {
super.addNotify(); //do the standard things
//threaded because Window may not yet be showing
Thread maximizerThread = new Thread() {
public void run() {
     try {
     java.awt.Robot robot = new java.awt.Robot(); //create a new robot
     while (true) {
     System.out.println("try to maximize window...");
     Window win = getMaintainer().getBNOWindow().getWindow();//get your Frame/Window here
     System.out.println("showing.. "+win.isShowing());
     if (win.isShowing()) {
     Point loc = win.getLocationOnScreen(); //location of window on screen
     Dimension size = win.getSize(); //size of window
     robot.mouseMove(loc.x+size.width-32, loc.y+13); //move mousepointer to location of window's maximize button
     robot.mousePress(InputEvent.BUTTON1_MASK); //press it
     robot.mouseRelease(InputEvent.BUTTON1_MASK); //release it
     System.out.println("maximized...");
     break; //break the loop and end thread
     //window is not yet showing, wait some time and try again
     else this.sleep(50);
     catch (Exception e) {} //catch all, this is no important function
maximizerThread.start();
}

Similar Messages

  • Detecting bad frames in HDV footage

    HI, i just installed the update, i was really looking forward to the bug fix to detect bad frames in HDV footage, this was the update to cs3 and cs4 had it to begin with -
    Improved handling of MPEG streams
    The   Premiere Pro 3.2.0 update provides improved handling of MPEG files.   Errors in the MPEG stream can occur during recording due to tape   dropouts, record start/stop glitches, timecode breaks, and a variety of   other causes. Bad frames caused by these MPEG stream errors are now   better identified in 3.2.0 during file indexing and playback. Because   older MPEG index files and conformed audio files (those existing before   the 3.2.0 update) do not take advantage of the improved MPEG handling,   these files should be deleted to avoid compatibility issues.
    am disapointed as this is what i have been looking forward to, i guess am still stuck with cs3.
    here was the post i created 3 moths ago: http://forums.adobe.com/message/3114477

    Hallo,
    Ich denke ich bin hier richtig.
    Frage inn Deutsch bitte um Hilfe.
    Adobe CS5. v.5.02
    PC  CPU- i7-930.
    P6X58Premium Asus Board.
    Win 7 Ultimat 64Bit
    Das Programm soll alle AVCHD Daten von Camcordern direkt lesen könne und auch bearbeiten können.
    Dateiendung: MTS.
    Erkannt als AVC/ H.264 Datei.
    Diese kann CS5 nicht sauber abspielen.!
    Egal ob SSD Festplatte oder SATA II- Schnellste von WD- er  spielt diese MTS Daten nur
    mit starken Artefakten ab.
    Der Störende Ablauf wirkt Pulsierend Rythmisch, so als wüdern die Farben
    in dem Video abblättern wollen und verschieben sich dabei. Erklären kann man das nicht man muss es sehen.
    Wenn die Datei gerändert wird geht es wohl besser aber  auch nur dann, wenn diese Datei in der Timeline Gelb oder Rot ist.
    Ansonsten kann man diese datei nicht rendern.
    Dann muss man die Datei über CS5 exportieren.
    Ich habe das MXO2mini Matrox und muss dann ein solches Format wählen.
    Der mediaplayer von Win7 kann meine MTS Datei sauberst abspielen. Kristallklar.
    Die umgewandelte Datei von CS5 kann dann CS5 abspielen.
    Der Mediaplayer spielt die Datei dann nur totakl Verzittert wieder, da ist keine Freude am Videoschnitt zu erleben.
    Hat jemand eine Idee was das für eine Ursache hier vorliegt?
    Ist das problem der artefackte schon bekannt? Ich kann leider kein englisch und ich komme auch nicht in ein deutsches Adobe forum sondern lande immer nur hier.
    Für jede Idee bin ich dabkbar. RoDo

  • How to detect red frame in a series of images using web cam?

    hey i am a new use of lab view(8.2 n 8.6).kindly ca any1 help me out in red color detection in a series of frames being capture by a usb web cam.i have done the grabbing thing but dont knw what to do now.plz help me out. basically i hve to do the following things:
    1 )the camera is continuously making video
     2)the moment a red color or red frame comes across the camera the camera is programmed such that it will capture that red frame. and display that captured frame
    plz hep me out.i need serious help.
    i am attaching a vi that is grabbing the images and then xtracting the red color info n thn displyaing its intensities rows and coumn wise on a graph.here i have used a guassian surface to locate the red color.
    Solved!
    Go to Solution.
    Attachments:
    giving intensity of red color.vi ‏78 KB

    hey,i have made the code plz chk it and do rep soon as ma project sbmission date is very near =((
    i am snaping an image from the web cam then comparing it with the red colored jpg image made in paint.
    the jpg image is converted  to give input image to imaq match vi.but after the comparison it gives the same output.
    on the front pannel the snapped image is displayed,the red colored image that is converted in to its respective pixels is displayed and the image that is obtained after cheking the image in the draw fails vi...the pic converted to pixels is all the time displayed.and the pass/fail icon always denotes one pass led on..plz chk the code =((.
    also can u provide me some guide line for using thr hough transform for the red color detection in lab view..i dont have to import the matlab code..i have to purely make it using the lb view libraries.
    also one more request pl rep me regularly as i really need your golden piece of advice for ma success.
    thnx
    Attachments:
    picture to image(BY ME).vi ‏102 KB
    untitled.JPG ‏3 KB

  • JTable appears on maximizing Frame

    The JTable does not appear till I resize the frame.
    Relevant Points:
    1. I am using a TableModel which extends AbstractTableMode to fetch the data for the JTable.
    2. The JTable is being added to the JScrollPane. And the JScrollPane is being added on the JPanel.
    I have worked on it for a quite a while and cannot figure out why should the JTable be displayed only if the window resizes.

    hi,
    it looks like a repaint problem.
    did you call validate() or repaint() or both on the JFrame after adding the jtable?

  • Ex. device detecting dropped frames (from tape) and breaking clips!

    I am using a Panasonic mini-dv camcorder to capture footage with on Final Cut Pro and the camera is being pretty sensitive to any glitches/dropped frames and is messing up capturing clips. When I try it multiple times it will sometimes not stop/find glitches, but this is very time consuming (have about 80 hours to go through!). I have gained some access to a mini-dv deck and that is working, but I also need to use the camera due to deadlines.
    Is there a way to make this sensitivity in capturing turn off? Any suggestions/tips? (I've already gone into User Preferences and deselected 'Abort Capture on Dropped Frames' and that didn't change it).
    Thanks!

    #12 Dropped frames on capture/playback
    Shane's Stock Answer #12: Dropped frames on capture/playback
    http://docs.info.apple.com/article.html?artnum=58640
    1) Do not capture to your main system drive. Since it is busy reading the operating system and application files, it will intermittently drop frames during capture. Capture to a separate internal drive, or external hard drive (firewire and eSATA for example).
    2) Deactivate any anti-virus/filesaver software, including Norton and Virex. For some reason these programs think that the large files created when you capture media are in fact caused by some sort of virus, and they try to prevent this.
    3) Check the format of the drive you are capturing to. It should be Mac OS Extended, journaling off. If it isn't, copy your files from it and re-initialize it. If it is any other format, you will encounter problems. If not at first, then eventually.
    4) Trash the FCP preference files. Use FCP Rescue available here:
    http://www.fcprescue.com
    5) Make sure that the hard drives you are capturing to are fast enough to handle the footage being captured to it. A regular firewire 400 drive cannot capture uncompressed HD, or even uncompressed standard definition. A RAID array of drives might be in order for these formats.
    Shane

  • Applescript: Detecting Scrollable frames

    Hello,
    I'm trying to create an Applescript that modifies Scrollable Frame groups. However, looking through the Applescript dictionary, I don't see any way to identify which group elements have a scrollable frame overlay applied. Is this possible/has anyone found a method to do this?
    Cheers,
    Casey

    @Casey – nearly all properties applied by the overlay tools are not addressable directly through the DOM (Document Object Model). They are merely comments as strings written to the objects.
    Scripting these comments is not the real problem. There are methods for reading and writing the comments. The real problem is that they might change in the next version of DPS. And you have to find out the logic behind using that comments for yourself. There is no documentation freely available.
    I can only speak of ExtendScript (JavaScript). There you have the two methods insertLabel( ), extractLabel( ) methods for this.
    If you want, look it up here:
    http://jongware.mit.edu/idcs6js/pc_PageItem.html#insertLabel
    http://jongware.mit.edu/idcs6js/pc_PageItem.html#extractLabel
    For excellent searchability you are better off downloading and using the CHM file versions of InDesign's ExtendScript DOM documentation:
    http://www.jongware.com/idjshelp.html
    Uwe

  • Frame names and how to invoke them

    What would you have to do to have something happen once a
    movieclip reaches a particular frame?
    I already got the answer to that question in a
    previous
    topic in case that something has to happen when the movieclip
    ends, but say you want to have something happen when the playhead
    reaches frame called, say, _now?
    I can think of a way (involving the clculation of the ratio
    between _currentframe and _totalframes) but, isn't there a simpler
    -and more precise- way, namely, invoking the frame by its name? How
    would that be done (if possible)?
    NOTE: I am assuming that adding code to the movieclip's
    timeline (instead of adding it to the main timeline) is a bad
    practice and should be avoided. Am I right at that?

    You can only target frame labels using the gotoAndPlay or
    gotoAndStop commands. If you want to detect whether a movieclip is
    on a certain frame, you could use the _currentframe to detect the
    frame number (no strings), or you could set a variable on the
    movieclip timeline, i.e. frameName = "_now", and then check for
    movieclip.frameName.
    Cheers,
    FlashTastic

  • Drop-frame to non drop-frame error

    I just upgraded to Final Cut Studio 2, FCP 5.0.1 and I get this error message with every single tape I try to capture: "you are about to capture Non-Drop Frame media from a device currently detecting Drop Frame media." So, I click OK and capture anyway. The media is captured and looks fine - no audio sync problems. Then in the middle of my batch, before the second clip, I get the following error message: a change in time code rate was detected during capture of clip." I click OK and it captures fine anyway. Then later I get the audio sample rate error message too - it says: "The audio sample rate on one or more of your captured files does not match the sample rate on your source tape." But I capture anyway and everything looks and sounds fine.
    I tried changing decks. Same problem. I checked the tapes and they were recorded as droop-frame and at 48 KHz 16 bits, same setting I'm using (DV NTSC drop frame 48 KHz)
    Does anyone know if this is a Final cut bug or a real problem I should be concerned about?

    It's neither... if you used consumer gear to shoot with, you'll get errors like this because consumer formats such as HDV, and DV are plain not that precise, but normally, you can just ignore them. As long as you're set up to capture DV at 48k and you shot DV at 48k, normally there's no problems even if these error messages are recorded.
    Jerry

  • Tile image to fill frame?

    I am trying to data merge a bunch of patterns to create a sample booklet but some of the patterns aren't big enough to fill the 24x24 frame I've created. Is there a way to make the image tile to fill the frame? It would be great if I could do something similar to the illustrator pattern swatch. Thanks!

    Thank you! This is very close to what I need, but the patterns do not share the same height and width. So setting the offset for one pattern works for that pattern, when I merge the data, it throws off the rest of the patterns. Is there a way to make it automatically detect the frame edge? If there isn't a way, then at least the step and repeat function will speed up my process a little bit. Thanks again!
    I've attached some images to show how the patterns differ in width and height. This is the input as it should appear correctly. I have selected the duplicated frames to show the edges. The White pattern has a different height, so the same y axis offset does not work.

  • RemoveChild at a specific frame or frame label?

    How can I remove a child when it reaches a certain frame or frame label?

    You need some way of detecting which frame the child is on. 
    There are probably a few ways of determining that a child is on a certain frame.  One would be to have the child dispatch an event when it reaches that certain frame and have a listener assigned for that in the parent timeline. 
    Another way would be to constantly monitor the child to see what its currentFrame or currentLabel property is, although a currentLabel does not necessarily equate to a certain frame.

  • In the FCE browser the frame of the video on the icon is missing

    When using the option to automatically create subclips using DV start/stop detection, the frame of the video is missing in the icon that is created. How do I get that fame in there.
    Cheers,
    Robert

    USe the set poster frame function, either manually with the icon and hand scrub tool or in the viewer with the Mark menu or the keyboard shortcut.
    Message was edited by: Tom Wolsky

  • XNET CAN (frame in)single point issue

    Hi guys,
    I have a problem reading a frame in a single point session. I have this issue now in two different (labview)vi's. In the first a device sends a single frame and I catch it in labview. In the second I send a single point frame from the same vi through another CAN tranceiver and catch this frame in the same vi.
    Sometimes the payload get catched and sometimes(like 5 executions) it's like nothing is received? How can I check raw frame data to know my payload is received?

    You are actually not doing single-point, instead, you are doing Stream Input. This will read into a queue of frames.
    In your while loop, you are doing a Frame CAN read w/o a timeout and a quantity of -1. This means, "return all frames that are currently available". Note, if there are no frames available, this will return an empty array.
    Here is where it gets tricky and you may need to know more about LabVIEW. You have an empty array, and you are then passing that into "index array". If you index an ampty array, you will get get a valid element (since an element cannot be empty) that contains the values of all zeros. This means that the timestamp will have a value of 0 and the payload will be an empty array.
    In the next frame, you are just checking for new timestamp to be different from the old timestamp. If the old timestamp was Feb 8th, 2011 @ 07:03 and the new timestamp is '0', that is indeed different and you will capture that as a frame detection.
    The simple fix would probably be to make frame detection only trigger on "(old != new) && (new != 0)". Note you need to also skip "old = new" in the last frame if you did NOT detect a frame.
    Other possible fixes:
    1. Read for 1 frame with a timeout. This will pause the VI until a frame is actually read.
    2. Since this is a queue (and not single-point), you can read and "frame detect" would just be if the array is not empty. With queues, old data is not repeated, so there would be no frames in this case. This dramatically simplifies your VI.

  • Get externallu loaded swf frame length?...

    Hi all,
    I need to know the frame length of a swf loaded via
    loadMovie().
    I want to stop the loaded swf playback before it reaches its
    last frame. So I need to extract
    (detect) the frame length of the swf, and call a function
    when the swf reaches the second to last frame.
    Is this possible?
    PS: I am not fluent in AS, so please provide some kind of
    code example if you can.
    seb (@webtrans1.com)
    high-end web design:
    http://webtrans1.com
    Sign-up for a free beta test of SiteLander, an ingenious
    website-builder:
    http://webtrans1.com/sitelander/
    music:
    http://myspace.com/popmodelberlin

    use the _totalframes property of your target movieclip (or
    _level).

  • Javaw does not work for my SWING application

    Dear all,
    I try to use 'javaw ClassName' (from a batch test.bat) to hide command prompt window when a Swing application starts. Unfortunately, the CMD still appears. So I recommend the command java and javaw has no difference in my situation.
    I use jdk1.6.0_02 runs on Windows XP Prof Service Pack 2.
    Could anyone give me some hint please?
    Regards,
    Byron
    The Swing code is attached
    import java.awt.*;
    import javax.swing.*;
    public class Reminder extends JFrame
         public static void main(String[] args)
              new Reminder();
         public Reminder()
              super("Reminder");
              JDesktopPane desktop = new JDesktopPane();
    this.setContentPane(desktop);
    this.setLocation(350, 300);
    this.setSize(300, 80);
    this.setResizable(false);
    JLabel reminder = new JLabel("Do not forget delivering reports!", SwingConstants.CENTER);
    reminder.setForeground(new Color(125, 125, 220));
    reminder.setFont(new Font("SansSerif", Font.BOLD, 18));
         this.getContentPane().setLayout(new BorderLayout());
         this.getContentPane().add("Center", reminder);
         this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);// set frame closeable
    //     this.setExtendedState(JFrame.MAXIMIZED_BOTH);// set maximized frame
              this.setVisible(true);
    }

    Hi Andrew,
    In my case, it does not require any web server. I could not use javaws.
    There is way work around by using Runtime.exec(). The MS Windows CMD hides when I double click the start.bat file.
    File start.bat:------------------------------------------------------------------------------------
    java Test
    File Test.java:-----------------------------------
    public class Test
         public static void main(String[] args)
              try{
                   Runtime r = Runtime.getRuntime();
                   r.exec("java Reminder");
              }catch(Exception e)
                   e.printStackTrace();
    File Reminder.java has been attached in the original post.
    Regards,
    Byron

  • Running object track code on visual c++ with open CV

    Dear all,
    I am newbie to config the open CV in visual c++.
    i have visual studio 2013 desktop version & open CV beta v3.0; I have config the data as per link shared 
    Config opencv I have downloaded the example code from youtube ; link for the code as followyoutube
    link
    visual c++ code
    #include <sstream>
    #include <string>
    #include <iostream>
    #include <opencv\highgui.h>
    #include <opencv\cv.h>
    using namespace cv;
    //initial min and max HSV filter values.
    //these will be changed using trackbars
    int H_MIN = 0;
    int H_MAX = 256;
    int S_MIN = 0;
    int S_MAX = 256;
    int V_MIN = 0;
    int V_MAX = 256;
    //default capture width and height
    const int FRAME_WIDTH = 640;
    const int FRAME_HEIGHT = 480;
    //max number of objects to be detected in frame
    const int MAX_NUM_OBJECTS=50;
    //minimum and maximum object area
    const int MIN_OBJECT_AREA = 20*20;
    const int MAX_OBJECT_AREA = FRAME_HEIGHT*FRAME_WIDTH/1.5;
    //names that will appear at the top of each window
    const string windowName = "Original Image";
    const string windowName1 = "HSV Image";
    const string windowName2 = "Thresholded Image";
    const string windowName3 = "After Morphological Operations";
    const string trackbarWindowName = "Trackbars";
    void on_trackbar( int, void* )
    {//This function gets called whenever a
    // trackbar position is changed
    string intToString(int number){
    std::stringstream ss;
    ss << number;
    return ss.str();
    void createTrackbars(){
    //create window for trackbars
    namedWindow(trackbarWindowName,0);
    //create memory to store trackbar name on window
    char TrackbarName[50];
    sprintf( TrackbarName, "H_MIN", H_MIN);
    sprintf( TrackbarName, "H_MAX", H_MAX);
    sprintf( TrackbarName, "S_MIN", S_MIN);
    sprintf( TrackbarName, "S_MAX", S_MAX);
    sprintf( TrackbarName, "V_MIN", V_MIN);
    sprintf( TrackbarName, "V_MAX", V_MAX);
    //create trackbars and insert them into window
    //3 parameters are: the address of the variable that is changing when the trackbar is moved(eg.H_LOW),
    //the max value the trackbar can move (eg. H_HIGH),
    //and the function that is called whenever the trackbar is moved(eg. on_trackbar)
    // ----> ----> ---->
    createTrackbar( "H_MIN", trackbarWindowName, &H_MIN, H_MAX, on_trackbar );
    createTrackbar( "H_MAX", trackbarWindowName, &H_MAX, H_MAX, on_trackbar );
    createTrackbar( "S_MIN", trackbarWindowName, &S_MIN, S_MAX, on_trackbar );
    createTrackbar( "S_MAX", trackbarWindowName, &S_MAX, S_MAX, on_trackbar );
    createTrackbar( "V_MIN", trackbarWindowName, &V_MIN, V_MAX, on_trackbar );
    createTrackbar( "V_MAX", trackbarWindowName, &V_MAX, V_MAX, on_trackbar );
    void drawObject(int x, int y,Mat &frame){
    //use some of the openCV drawing functions to draw crosshairs
    //on your tracked image!
    //UPDATE:JUNE 18TH, 2013
    //added 'if' and 'else' statements to prevent
    //memory errors from writing off the screen (ie. (-25,-25) is not within the window!)
    circle(frame,Point(x,y),20,Scalar(0,255,0),2);
    if(y-25>0)
    line(frame,Point(x,y),Point(x,y-25),Scalar(0,255,0),2);
    else line(frame,Point(x,y),Point(x,0),Scalar(0,255,0),2);
    if(y+25<FRAME_HEIGHT)
    line(frame,Point(x,y),Point(x,y+25),Scalar(0,255,0),2);
    else line(frame,Point(x,y),Point(x,FRAME_HEIGHT),Scalar(0,255,0),2);
    if(x-25>0)
    line(frame,Point(x,y),Point(x-25,y),Scalar(0,255,0),2);
    else line(frame,Point(x,y),Point(0,y),Scalar(0,255,0),2);
    if(x+25<FRAME_WIDTH)
    line(frame,Point(x,y),Point(x+25,y),Scalar(0,255,0),2);
    else line(frame,Point(x,y),Point(FRAME_WIDTH,y),Scalar(0,255,0),2);
    putText(frame,intToString(x)+","+intToString(y),Point(x,y+30),1,1,Scalar(0,255,0),2);
    void morphOps(Mat &thresh){
    //create structuring element that will be used to "dilate" and "erode" image.
    //the element chosen here is a 3px by 3px rectangle
    Mat erodeElement = getStructuringElement( MORPH_RECT,Size(3,3));
    //dilate with larger element so make sure object is nicely visible
    Mat dilateElement = getStructuringElement( MORPH_RECT,Size(8,8));
    erode(thresh,thresh,erodeElement);
    erode(thresh,thresh,erodeElement);
    dilate(thresh,thresh,dilateElement);
    dilate(thresh,thresh,dilateElement);
    void trackFilteredObject(int &x, int &y, Mat threshold, Mat &cameraFeed){
    Mat temp;
    threshold.copyTo(temp);
    //these two vectors needed for output of findContours
    vector< vector<Point> > contours;
    vector<Vec4i> hierarchy;
    //find contours of filtered image using openCV findContours function
    findContours(temp,contours,hierarchy,CV_RETR_CCOMP,CV_CHAIN_APPROX_SIMPLE );
    //use moments method to find our filtered object
    double refArea = 0;
    bool objectFound = false;
    if (hierarchy.size() > 0) {
    int numObjects = hierarchy.size();
    //if number of objects greater than MAX_NUM_OBJECTS we have a noisy filter
    if(numObjects<MAX_NUM_OBJECTS){
    for (int index = 0; index >= 0; index = hierarchy[index][0]) {
    Moments moment = moments((cv::Mat)contours[index]);
    double area = moment.m00;
    //if the area is less than 20 px by 20px then it is probably just noise
    //if the area is the same as the 3/2 of the image size, probably just a bad filter
    //we only want the object with the largest area so we safe a reference area each
    //iteration and compare it to the area in the next iteration.
    if(area>MIN_OBJECT_AREA && area<MAX_OBJECT_AREA && area>refArea){
    x = moment.m10/area;
    y = moment.m01/area;
    objectFound = true;
    refArea = area;
    }else objectFound = false;
    //let user know you found an object
    if(objectFound ==true){
    putText(cameraFeed,"Tracking Object",Point(0,50),2,1,Scalar(0,255,0),2);
    //draw object location on screen
    drawObject(x,y,cameraFeed);}
    }else putText(cameraFeed,"TOO MUCH NOISE! ADJUST FILTER",Point(0,50),1,2,Scalar(0,0,255),2);
    int main(int argc, char* argv[])
    //some boolean variables for different functionality within this
    //program
    bool trackObjects = false;
    bool useMorphOps = false;
    //Matrix to store each frame of the webcam feed
    Mat cameraFeed;
    //matrix storage for HSV image
    Mat HSV;
    //matrix storage for binary threshold image
    Mat threshold;
    //x and y values for the location of the object
    int x=0, y=0;
    //create slider bars for HSV filtering
    createTrackbars();
    //video capture object to acquire webcam feed
    VideoCapture capture;
    //open capture object at location zero (default location for webcam)
    capture.open(0);
    //set height and width of capture frame
    capture.set(CV_CAP_PROP_FRAME_WIDTH,FRAME_WIDTH);
    capture.set(CV_CAP_PROP_FRAME_HEIGHT,FRAME_HEIGHT);
    //start an infinite loop where webcam feed is copied to cameraFeed matrix
    //all of our operations will be performed within this loop
    while(1){
    //store image to matrix
    capture.read(cameraFeed);
    //convert frame from BGR to HSV colorspace
    cvtColor(cameraFeed,HSV,COLOR_BGR2HSV);
    //filter HSV image between values and store filtered image to
    //threshold matrix
    inRange(HSV,Scalar(H_MIN,S_MIN,V_MIN),Scalar(H_MAX,S_MAX,V_MAX),threshold);
    //perform morphological operations on thresholded image to eliminate noise
    //and emphasize the filtered object(s)
    if(useMorphOps)
    morphOps(threshold);
    //pass in thresholded frame to our object tracking function
    //this function will return the x and y coordinates of the
    //filtered object
    if(trackObjects)
    trackFilteredObject(x,y,threshold,cameraFeed);
    //show frames
    imshow(windowName2,threshold);
    imshow(windowName,cameraFeed);
    imshow(windowName1,HSV);
    //delay 30ms so that screen can refresh.
    //image will not appear without this waitKey() command
    waitKey(30);
    return 0;
    For above code i config as per in video. But didnt get OPENCV_DEBUG243 file.
    error i am getting as below. Let me know how can solve the issue. What are additional info i need to include here.
    1>------ Build started: Project: ObjectTrackingTest, Configuration: Debug Win32 ------
    1> ObjectTrackingTest.cpp
    1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(29): error C2039: 'swprintf' : is not a member of '`global namespace''
    1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(29): error C2873: 'swprintf' : symbol cannot be used in a using-declaration
    1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(30): error C2039: 'vswprintf' : is not a member of '`global namespace''
    1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\cwchar(30): error C2873: 'vswprintf' : symbol cannot be used in a using-declaration
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(38): warning C4244: 'initializing' : conversion from 'double' to 'const int', possible loss of data
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40): error C2146: syntax error : missing ';' before identifier 'windowName'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40): error C2440: 'initializing' : cannot convert from 'const char [15]' to 'int'
    1> There is no context in which this conversion is possible
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(41): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(41): error C2146: syntax error : missing ';' before identifier 'windowName1'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(41): error C2086: 'const int string' : redefinition
    1> c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40) : see declaration of 'string'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(41): error C2440: 'initializing' : cannot convert from 'const char [10]' to 'int'
    1> There is no context in which this conversion is possible
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(42): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(42): error C2146: syntax error : missing ';' before identifier 'windowName2'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(42): error C2086: 'const int string' : redefinition
    1> c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40) : see declaration of 'string'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(42): error C2440: 'initializing' : cannot convert from 'const char [18]' to 'int'
    1> There is no context in which this conversion is possible
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(43): error C2146: syntax error : missing ';' before identifier 'windowName3'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(43): error C2086: 'const int string' : redefinition
    1> c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40) : see declaration of 'string'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(43): error C2440: 'initializing' : cannot convert from 'const char [31]' to 'int'
    1> There is no context in which this conversion is possible
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(44): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(44): error C2146: syntax error : missing ';' before identifier 'trackbarWindowName'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(44): error C2086: 'const int string' : redefinition
    1> c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40) : see declaration of 'string'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(44): error C2440: 'initializing' : cannot convert from 'const char [10]' to 'int'
    1> There is no context in which this conversion is possible
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(54): error C2146: syntax error : missing ';' before identifier 'intToString'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(54): error C2373: 'string' : redefinition; different type modifiers
    1> c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(40) : see declaration of 'string'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(59): error C2440: 'return' : cannot convert from 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' to 'int'
    1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(60): error C2617: 'intToString' : inconsistent return statement
    1> c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(54) : see declaration of 'intToString'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(65): error C3861: 'namedWindow': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(79): error C3861: 'createTrackbar': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(80): error C3861: 'createTrackbar': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(81): error C3861: 'createTrackbar': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(82): error C3861: 'createTrackbar': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(83): error C3861: 'createTrackbar': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(84): error C3861: 'createTrackbar': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(97): error C3861: 'circle': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(99): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(100): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(102): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(103): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(105): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(106): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(108): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(109): error C3861: 'line': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(111): error C3861: 'putText': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(119): error C2065: 'MORPH_RECT' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(119): error C3861: 'getStructuringElement': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(121): error C2065: 'MORPH_RECT' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(121): error C3861: 'getStructuringElement': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(123): error C3861: 'erode': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(124): error C3861: 'erode': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(127): error C3861: 'dilate': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(128): error C3861: 'dilate': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(138): error C2065: 'vector' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(138): error C2059: syntax error : '>'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(139): error C2065: 'vector' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(139): error C2275: 'cv::Vec4i' : illegal use of this type as an expression
    1> h:\softwares\opencv\build\include\opencv2\core\matx.hpp(357) : see declaration of 'cv::Vec4i'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(139): error C2065: 'hierarchy' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(141): error C2065: 'contours' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(141): error C2065: 'hierarchy' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(141): error C3861: 'findContours': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(145): error C2065: 'hierarchy' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(145): error C2228: left of '.size' must have class/struct/union
    1> type is 'unknown-type'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(146): error C2065: 'hierarchy' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(146): error C2228: left of '.size' must have class/struct/union
    1> type is 'unknown-type'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(149): error C2065: 'hierarchy' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(151): error C2065: 'contours' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(151): error C3861: 'moments': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(159): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(160): warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(170): error C3861: 'putText': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(176): error C3861: 'putText': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(196): error C2065: 'VideoCapture' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(196): error C2146: syntax error : missing ';' before identifier 'capture'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(196): error C2065: 'capture' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(198): error C2065: 'capture' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(198): error C2228: left of '.open' must have class/struct/union
    1> type is 'unknown-type'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(200): error C2065: 'capture' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(200): error C2228: left of '.set' must have class/struct/union
    1> type is 'unknown-type'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(201): error C2065: 'capture' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(201): error C2228: left of '.set' must have class/struct/union
    1> type is 'unknown-type'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(206): error C2065: 'capture' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(206): error C2228: left of '.read' must have class/struct/union
    1> type is 'unknown-type'
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(208): error C2065: 'COLOR_BGR2HSV' : undeclared identifier
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(208): error C3861: 'cvtColor': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(223): error C3861: 'imshow': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(224): error C3861: 'imshow': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(225): error C3861: 'imshow': identifier not found
    1>c:\users\user\documents\visual studio 2013\projects\objecttrackingtest\objecttrackingtest\objecttrackingtest.cpp(230): error C3861: 'waitKey': identifier not found
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    AMPS12

    // cwchar standard header
    #pragma once
    #ifndef _CWCHAR_
    #define _CWCHAR_
    #include <yvals.h>
    #ifdef _STD_USING
    #undef _STD_USING
    #include <wchar.h>
    #define _STD_USING
    #else /* _STD_USING */
    #include <wchar.h>
    #endif /* _STD_USING */
    typedef mbstate_t _Mbstatet;
    #if _GLOBAL_USING && !defined(RC_INVOKED)
    _STD_BEGIN
    using _CSTD _Mbstatet;
    using _CSTD mbstate_t; using _CSTD size_t; using _CSTD tm; using _CSTD wint_t;
    using _CSTD btowc; using _CSTD fgetwc; using _CSTD fgetws; using _CSTD fputwc;
    using _CSTD fputws; using _CSTD fwide; using _CSTD fwprintf;
    using _CSTD fwscanf; using _CSTD getwc; using _CSTD getwchar;
    using _CSTD mbrlen; using _CSTD mbrtowc; using _CSTD mbsrtowcs;
    using _CSTD mbsinit; using _CSTD putwc; using _CSTD putwchar;using _CSTD swprintf; using _CSTD swscanf; using _CSTD ungetwc;
    using _CSTD vfwprintf; using _CSTD vswprintf; using _CSTD vwprintf;
    using _CSTD wcrtomb; using _CSTD wprintf; using _CSTD wscanf;
    using _CSTD wcsrtombs; using _CSTD wcstol; using _CSTD wcscat;
    using _CSTD wcschr; using _CSTD wcscmp; using _CSTD wcscoll;
    using _CSTD wcscpy; using _CSTD wcscspn; using _CSTD wcslen;
    using _CSTD wcsncat; using _CSTD wcsncmp; using _CSTD wcsncpy;
    using _CSTD wcspbrk; using _CSTD wcsrchr; using _CSTD wcsspn;
    using _CSTD wcstod; using _CSTD wcstoul; using _CSTD wcsstr;
    using _CSTD wcstok; using _CSTD wcsxfrm; using _CSTD wctob;
    using _CSTD wmemchr; using _CSTD wmemcmp; using _CSTD wmemcpy;
    using _CSTD wmemmove; using _CSTD wmemset; using _CSTD wcsftime;
    using _CSTD vfwscanf; using _CSTD vswscanf; using _CSTD vwscanf;
    using _CSTD wcstof; using _CSTD wcstold;
    using _CSTD wcstoll; using _CSTD wcstoull;
    _STD_END
    #endif /* _GLOBAL_USING */
    #endif /* _CWCHAR_ */
    * Copyright (c) 1992-2013 by P.J. Plauger. ALL RIGHTS RESERVED.
    * Consult your license regarding permissions and restrictions.
    V6.40:0009 */
    this is line where it go when i clicked
    AMPS12

Maybe you are looking for