parallelize curve application
This commit is contained in:
		
							parent
							
								
									67f561d1a4
								
							
						
					
					
						commit
						b5249be51e
					
				
					 1 changed files with 1 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -50,12 +50,5 @@ void applyCurve(cv::Mat image, cv::Mat curve)
 | 
			
		|||
	assert(curve.type() == CV_32FC1);
 | 
			
		||||
	assert(curve.rows == 2);
 | 
			
		||||
	
 | 
			
		||||
	for(int y = 0; y < image.rows; y++)
 | 
			
		||||
	{
 | 
			
		||||
		float* col = image.ptr<float>(y);
 | 
			
		||||
		for(int x = 0; x < image.cols; ++x)
 | 
			
		||||
		{
 | 
			
		||||
			col[x]=applyCurve(col[x], curve);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	image.forEach<float>([&curve](float &p, const int * position){p = applyCurve(p, curve);});
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue