numpyHDR/readme.md

62 lines
1.8 KiB
Markdown
Raw Normal View History

2023-03-20 23:35:57 +01:00
# numpyHDR
2023-03-24 19:33:28 +01:00
* Micro Library for HDR image creation using the Mertens Fusion Alghoritm
2023-03-24 19:16:41 +01:00
* Optional Raspicam integration with picamera2 lib
* CLI Application "makehdr.py"
* Processing time on raspi zero ca 15 min with full res 12MP files.
2023-03-20 23:35:57 +01:00
## Intention
2023-03-24 19:16:41 +01:00
- numpy and PIL, picamera2 for Raspicam funtionality.
2023-03-20 23:35:57 +01:00
- Whenever dependencies of other bigger image librarys aren´t satisfyable.
- 32-bit armv6 or oudated Kernels etc.
## Function
2023-03-24 19:16:41 +01:00
*Use makehdr.py CLI app for testing before implementation*
- Captures an exposure bracket stack from the raspicam as fast as possible
- Alternatively from image sequences form file
- Either direct processing or save files in between
2023-03-20 23:35:57 +01:00
- Uses a conversion of the Mertens Fusion alghoritm
- Stretches Information to the full spectrum like Contrast or compression
- Lifts the shadows softly with an envelope.
- Clips to Image range and saves via PIL
## Setup
2023-03-24 19:33:28 +01:00
- Download and install dependencies from requirements.txt into env
- `pip install -r requirements.txt`
- Install picamera2 and libcamera
- `pip install picamera2`
- `pip install libcamera`
2023-03-20 23:35:57 +01:00
## Usage
2023-03-24 19:33:28 +01:00
- Start makehdr.py
- `python3 makehdr.py`
- Follow commandline instructions
- Be patient on Raspi zero
- Example on how to use the library can be found in makehdr.py
2023-03-20 23:35:57 +01:00
2023-03-24 19:33:28 +01:00
## Using the library
*Import numpyHDR modules*
- `import file_utility as file`
- `import numpyHDR as hdr`
- `import picamburst as pcb`
2023-03-20 23:35:57 +01:00
2023-03-24 19:33:28 +01:00
*Get image arrays from raspicam*
- `stack = pcb.get_exposure_stack()`
2023-03-20 23:35:57 +01:00
2023-03-24 19:36:00 +01:00
*OR*
2023-03-24 19:33:28 +01:00
*Get image arrays from files*
- `stack = file.openImageList(path_list, True)`
2023-03-20 23:35:57 +01:00
2023-03-24 19:33:28 +01:00
*Process HDR with mertens fusion and post effects*
- `result = hdr.process(stack, 1, 1, 1, True)`
2023-03-20 23:35:57 +01:00
2023-03-24 19:33:28 +01:00
*Save Result to File*
- The filename gets extended by ".jpg" and "_hdr" automatically
- `file = file.saveResultToFile(result, 'hdr/result', 75)`
2023-03-20 23:35:57 +01:00