public void move() throws Exception {
			
			rightPressed = false;
			View.count++;
			int timer = 100;
			int result = 0;
			int divider = 0;

			System.out.println("Dragged method running");
			OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0);
        	grabber.start();
			//Create canvas frame for displaying webcam.
			//CanvasFrame canvasW = new CanvasFrame("Webcam");
       
			//Set Canvas frame to close on exit

			IplImage orgImg = grabber.grab();
		  	//Set canvas size as per dimentions of video frame.
		 	//canvasW.setCanvasSize(grabber.getImageWidth(), grabber.getImageHeight());
		  	// threshold the captured image using the lower and upper thresholds
		  	// defined above
                //  see end of the code for explanation on contours                          		        
        
			outerloop:
			while ((orgImg = grabber.grab()) != null) {
				timer --;
				if(timer == 0) {
					break outerloop;
				}
			  // threshold the captured image using the lower and upper thresholds
			  	IplImage thresholdImage = hsvThreshold(orgImg);
			  	CvMemStorage mem = CvMemStorage.create();
			  	CvSeq contours = new CvSeq(orgImg);

			    contours = cvCreateSeq(0, sizeof(CvContour.class),
				sizeof(CvSeq.class), mem);

				cvFindContours(thresholdImage.clone(), mem, contours,
				Loader.sizeof(CvContour.class), CV_RETR_CCOMP,
				CV_CHAIN_APPROX_SIMPLE, cvPoint(0, 0));
		        
		        while (contours != null && !contours.isNull()) {
					divider++;
					System.out.println(divider);
		        	// define a 2D rectangle structure that will be the bounding box of the contour of the object
					CvRect br = cvBoundingRect(contours, 1);
					// draw a GREEN rectangle around the contour (of the object detected)
					cvRectangle(orgImg, cvPoint(br.x(), br.y()),
					cvPoint(br.x() + br.width(), br.y() + br.height()),
					CvScalar.GREEN, 3, CV_AA, 0);
				
					if(divider%2==0) 
					{
						result = result - br.x();
		        		if(result > 0)
		        		{
		            		clockViewCard.displayedTime.add(Calendar.HOUR_OF_DAY, 3);
							System.out.println("add 3");
							break outerloop;
		        		}
	
				        else if(result < 0)
		        		{
		            		clockViewCard.displayedTime.add(Calendar.HOUR_OF_DAY, -3);
							System.out.println("minus 3");
							result = 0;
							break outerloop;
		        		}
						//else if(result ==0) System.out.println("Nothing");
					}
					else result = br.x();
					cvWaitKey(2);
		            // do all of the above for the next contour
					contours = contours.h_next();
				}  		
				 // show the detected 'coloured' objects with rectangles drawn on on the initially captured image        
				 //canvasW.showImage(orgImg);  			
			  }
		grabber.stop();
		//canvasW.dispose();
     	clockViewCard.repaint();	      
	}