fix: better img loader.
Now the name could be at the wanted size
This commit is contained in:
		
							parent
							
								
									3ceb80edc4
								
							
						
					
					
						commit
						e991fffdb1
					
				| @ -45,7 +45,6 @@ const DEBUG: bool = true; | ||||
| pub enum Sequence { | ||||
|     //TODO: avoir le meme nombre d'image en mode capture ET en mode replay
 | ||||
|     FirstState, | ||||
|     WaitSpace, | ||||
|     BackGround, | ||||
|     UpBorder, | ||||
|     LeftBorder, | ||||
| @ -54,6 +53,7 @@ pub enum Sequence { | ||||
|     ReadDir, | ||||
|     ComputeArea, | ||||
|     Finish, | ||||
|     WaitSpace, | ||||
| 
 | ||||
|     WaitQ, | ||||
| 
 | ||||
| @ -176,7 +176,7 @@ impl Qualibration { | ||||
|                 }; | ||||
|             } | ||||
|         } | ||||
|         println!("sequence: {:?}", self.id); | ||||
|         //println!("sequence: {:?}", self.id);
 | ||||
|         self.frame_prev = self.frame.clone(); | ||||
|         Ok(()) | ||||
|     } | ||||
| @ -506,9 +506,10 @@ impl Qualibration { | ||||
|         for entry in paths { | ||||
|             let dir = entry?; | ||||
|             let path = dir.path(); | ||||
|             let a: Vec<_> = path.to_str().unwrap().to_string().chars().collect(); | ||||
|             let b: String = a[27..(a.len() - 4)].iter().collect(); | ||||
|             let img_id: i32 = b.parse()?; | ||||
|             let c: Vec<&str> = path.to_str().unwrap().split("/").collect(); | ||||
|             let d: Vec<_> = c[c.len()-1].chars().collect(); | ||||
|             let e: String = d[4..d.len()-4].iter().collect(); | ||||
|             let img_id: i32 = e.parse()?; | ||||
|             let path = format!("{path:?}"); | ||||
|             let path = path[1..(path.len() - 1)].to_owned(); | ||||
|             let img: Mat = imread(&find_file(&path, false, false)?, IMREAD_COLOR)?; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user