Added all remaining gists.
This commit is contained in:
1
convertExposureTime.c/README.md
Normal file
1
convertExposureTime.c/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Exposure time conversion between two f-stops.
|
||||
15
convertExposureTime.c/convertExposureTime.c
Normal file
15
convertExposureTime.c/convertExposureTime.c
Normal file
@@ -0,0 +1,15 @@
|
||||
/* A function to convert the exposure time between two f-stops.
|
||||
* Usefull for pinhole cameras. See http://www.pinhole.cz/en/pinholecameras/exposure_01.html
|
||||
*
|
||||
* Parameters:
|
||||
* *) f_from: The f-stop to convert from.
|
||||
* *) f_to: The f-stop to convert to.
|
||||
* *) exp_time: The exposure time for the aperture f_from.
|
||||
*
|
||||
* Return:
|
||||
* The exposure time for aperture f_to.
|
||||
*/
|
||||
float convertExposureTime(int f_from, int f_to, float exp_time){
|
||||
float aux = (float)f_to / (float)f_from;
|
||||
return time * (aux * aux);
|
||||
}
|
||||
Reference in New Issue
Block a user