kopia lustrzana https://github.com/villares/sketch-a-day
				
				
				
			__main__.PVector instead of Processing.core.PVector
via @GoToLoop suggestion: https://discourse.processing.org/t/main-pvector-vs-processing-core-pvector/22940main
							rodzic
							
								
									025ce1eeda
								
							
						
					
					
						commit
						62dc6c246d
					
				|  | @ -15,13 +15,15 @@ def draw(): | |||
|     image(video, 0, 0) | ||||
|     stroke(255,0,0); strokeWeight(1) | ||||
|     opencv.drawOpticalFlow() | ||||
|     ave_flow = opencv.getAverageFlow() | ||||
|     scale_up = 20 | ||||
|     ave_flow = PVector().set(opencv.getAverageFlow()) | ||||
|     ave_flow *= 20 | ||||
|     stroke(255); strokeWeight(3) | ||||
|     line(video.width / 2, | ||||
|          video.height / 2, | ||||
|          video.width / 2 + ave_flow.x * scale_up, | ||||
|          video.height / 2 + ave_flow.y * scale_up) | ||||
|          video.width / 2 + ave_flow.x, | ||||
|          video.height / 2 + ave_flow.y) | ||||
|     print type(ave_flow) | ||||
| 
 | ||||
|      | ||||
| def captureEvent(c): | ||||
|     c.read() | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Alexandre B A Villares
						Alexandre B A Villares