Skip to content

Commit

Permalink
version 2018-02-24 alpha
Browse files Browse the repository at this point in the history
- change name from `modified doLCE` to `lenticular`
  • Loading branch information
retokromer committed Feb 23, 2018
1 parent 6684ed9 commit 0d86079
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 69 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Joakim Reuteler and Rudolf Gschwind ([Digital Humanities Lab](http://dhlab.uniba

## Work-in-Progress Source Code

An alpha of a [modified code](lenticular/README.md) is available for testing purpose. And contributions are very welcome!
An alpha of a modified code, named [lenticular](lenticular/README.md), is available for testing purpose. And contributions are very welcome!

### Copyright, Licence and Disclaimer

Expand Down
8 changes: 4 additions & 4 deletions lenticular/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ CC = gcc
CFLAGS = -Wall -std=c99

OBJ = imageHandling.o imageProcessing.o
BIN: doLCE inStudy frameCropper
BIN: lenticular inStudy frameCropper

doLCE: lenticularFilmColorReconstruction.o $(OBJ)
$(CC) $(CFLAGS) -ltiff lenticularFilmColorReconstruction.o $(OBJ) -o doLCE
lenticular: lenticular.o $(OBJ)
$(CC) $(CFLAGS) -ltiff lenticular.o $(OBJ) -o lenticular

inStudy: interpolationStudy.o $(OBJ)
$(CC) $(CFLAGS) -ltiff interpolationStudy.o $(OBJ) -o inStudy
Expand All @@ -14,7 +14,7 @@ frameCropper: frameCropper.o $(OBJ)
$(CC) $(CFLAGS) -ltiff frameCropper.o $(OBJ) -o frameCropper

obj: $(OBJ)
$(CC) $(OBJ) -c tools $(OBJ)
$(CC) $(OBJ) -c $(OBJ)

.PHONY: clean
clean:
Expand Down
22 changes: 11 additions & 11 deletions lenticular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ Thank you!

### Short-term goals of the project

- Any idea for a better name than `doLCE` for the modified version?
- Any idea for a better name than `lenticular`?
- I was told that a logo would be important.
- Understand and document the parameters.
- Upload test files on GitHub. Who can provide some for public usage?
- Fix error handling. In particolar avoid the `Segmentation fault: 11` message, most probably due to wrongly set arrays’ indices.
- Fix error handling. In particular avoid the `Segmentation fault: 11` message, most probably due to wrongly set arrays’ indices.
- Allow full path for both the input and the output folder. In particular, the output folder has not to be nested inside the input folder, but can be chosen freely, e.g. on another hard-disk drive.
- Allow to choose the name of the output files.
- Add flags for mandatory parameters and allow free input order.
- Allow the file extensions `.tiff`, `.TIF` and `.TIFF` as well.
- Allow more TIFF flavours to be processed, _in primis_ `rgb48le`, because currently only `gray16le` is supported in `doLCE`. However, the additional `inStudy` tool does work with `rgb48le`. Therefore this should not be too hard to implement.
- Allow more TIFF flavours to be processed, _in primis_ `rgb48le`, because currently only `gray16le` is supported in `lenticular`. However, the additional `inStudy` tool does work with `rgb48le`. Therefore this should not be too hard to implement.
- Determine automatically the regex for parsing the greyscale frames of the input folder.
- The number of the first and of the last frame to process is needed only for testing a subset of the frames in the folder. If these parameters are not provided, then parse in ascending order all the files in the folder.
- Change the behaviour of the `-highRes` flag: replace with a resolution parameter and set the default to high resolution.
Expand Down Expand Up @@ -53,11 +53,11 @@ Thank you!

1. open the terminal
1. `cd` into the folder
1. run `./doLCE`
1. run `./lenticular`

### Homebrew and Linuxbrew

Alternatively, you can install the modified `doLCE` tool by using Homebrew or Linuxbrew. Just run the command:
Alternatively, you can install the modified `lenticular` tool by using Homebrew or Linuxbrew. Just run the command:

```
brew install amiaopensource/amiaos/lenticular
Expand All @@ -66,10 +66,10 @@ brew install amiaopensource/amiaos/lenticular
Once installed, run the main tool by the command:

```
doLCE
lenticular
```

Brew installation and `doLCE` have been successfully tested on the following operating systems:
Brew installation and `lenticular` have been successfully tested on the following operating systems:

- **Linux:** Ubuntu 16.04.3 LTS and 14.04.5 LTS; Slackware 14.2; Debian 7.11
- **Mac:** macOS 10.13.3 and 10.12.6, OS X 10.11.6 and 10.10.5;
Expand All @@ -78,9 +78,9 @@ Brew installation and `doLCE` have been successfully tested on the following ope
### Parameters

```
modified doLCE 2018-02-18 alpha
lenticular 2018-02-24 alpha
doLCE [-help] [-highRes] [-profileRelThickness (float)]
lenticular [-help] [-highRes] [-profileRelThickness (float)]
[-profileRelPosY (float)] [-relaxRaster]
[-rasterSpacing (float)] [-troubleshoot]
'inputDir' 'inputBaseName' 'startNo' 'endNo' 'outputDir'
Expand Down Expand Up @@ -142,7 +142,7 @@ inStudy
which should give:

```
modified inStudy 2018-02-18 alpha
modified inStudy 2018-02-24 alpha
RGB image pixel column interpolation study
inStudy [--help] 'inputFileName'
Expand Down Expand Up @@ -172,7 +172,7 @@ which should give:


```
modified frameCropper 2018-02-18 alpha
modified frameCropper 2018-02-24 alpha
crop center part of RGB frames
frameCropper 'width' 'height' 'inputBaseName' 'startNo' 'endNo' 'outputDir'
Expand Down
9 changes: 3 additions & 6 deletions lenticular/frameCropper.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* frameCropper.c
* - crop center part of RGB frames
*
* This file is part of doLCE (do Lenticular film Color rEconstruction).
* This file is part of 'lenticular'.
*
* Copyright (c) 2012 Joakim Reuteler
* Copyright (c) 2018 AMIA Open Source
Expand All @@ -12,10 +12,6 @@
* under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* HISTORY
* 2018-02-05 purge code
* 2018-02-11 delete unused variables, unify syntax
*
******************************************************************************/


Expand All @@ -34,7 +30,7 @@ int main( int argc, char *argv[] ) {

// constants
char greetingText[128] = "";
sprintf( greetingText, "\nmodified frameCropper 2018-02-18 alpha\n crop center part of RGB frames\n\n" );
sprintf( greetingText, "\nmodified frameCropper 2018-02-24 alpha\n crop center part of RGB frames\n\n" );
char helpText[] = "frameCropper 'width' 'height' 'inputBaseName' 'startNo' 'endNo' 'outputDir'\n\n";
char inputImageName[128] = "";
char inputBaseName[128] = "";
Expand Down Expand Up @@ -157,5 +153,6 @@ int main( int argc, char *argv[] ) {
delete_rgbImage( &inImg );
printf( "### freed memory 'inImg.memState = %d'\n", inImg.memState );
}

return status;
}
Loading

0 comments on commit 0d86079

Please sign in to comment.