[myimage] add timestamp member to image
This commit is contained in:
		
							parent
							
								
									09a3a5e3b1
								
							
						
					
					
						commit
						e4a2c2856a
					
				| @ -1,4 +1,5 @@ | ||||
| #include "myimage.h" | ||||
| #include <chrono> | ||||
| 
 | ||||
| MyImage::MyImage() | ||||
| {} | ||||
| @ -14,6 +15,8 @@ bool MyImage::setFrame(Pylon::CGrabResultPtr ptr) { | ||||
|       img_width = ptr->GetWidth(); | ||||
|       img_height = ptr->GetHeight(); | ||||
|       memcpy(&buffer, ptr->GetBuffer(), ptr->GetImageSize()); | ||||
|       auto t = std::chrono::system_clock::now(); | ||||
|       timestamp = std::chrono::system_clock::to_time_t(t); | ||||
|     } | ||||
|   return valid; | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user