wichmann-lab / teamproject-photography Goto Github PK
View Code? Open in Web Editor NEWIn the team project summer term 2021, students are working on automating image manipulation using professional photography software.
License: MIT License
In the team project summer term 2021, students are working on automating image manipulation using professional photography software.
License: MIT License
Every function of the plugin should be controllable through a configuration file in the JSON format.
This makes the configuration permanent modifications reproducible, which is important in the scientific context.
The plugin can - in addition - show UI elements for important configuration options. The UI should be a subset of the config file options (if an option is available through the file, but not the UI this is fine. The other way round is not ok). Changes from the UI should be saved back to the config file.
This is how the config file could (!!!) look at the end of the teamproject:
{
"name": "SSFD",
"processing": [
{
"name": "Create all combinations",
"op": "matrix-develop",
"config": {
"saturation": [
0.1,
0.5,
0.9
],
"contrast": [
0.3,
0.7
]
}
},
{
"name": "Reduce size",
"op": "crop",
"config": {
"width": "500px",
"height": "500px",
"origin_x": "50%",
"origin_y": "50%",
"anchor_x": "50%",
"anchor_y": "50%"
}
}
],
"export": {
"format": "png",
"image_name": "{image_name}",
"structure": "groupby-image"
},
"metadata": {
"last_export_date": "2021-...",
"last_modified": "2021-..."
}
}
The plugin should apply the processing steps in the defined order.
We need at least two basic processing operation. develop
, which applies image manipulations, and crop
, which crops the image. In addition, there should be two advanced operation strategies, indicated by prepended matrix-
or random-
(they should work with develop
and crop
). In these advanced strategies, lists of parameters instead of scalars should be defined. Then random or all possible (matrix) combinations of these should be applied to the image.
Bonus for crop
: Support absolute (pixel) and relative (percentage) coordinates.
name
should be an optional parameter everywhere. If it is missing, choose a reasonable default (e.g. "Processing step 5").
The export section can provide options for the image format, patterns for the exported image names, and the created directory structure.
Bonus: Notice, if the user modified the config file. Then do not overwrite it, but post a warning and ask before.
A plugin for lightroom, that allows to batch modify a set of images.
The modifications shall be defined in a configuration file.
When manipulating multiple images, different values of the same sign for a setting result in the same outcome.
For example: Enter {"export_format":"PNG", "Settings":{"Contrast":[-100, -50, 0, 50, 100]}}
in imageIteratorSettings.json
, open Lightroom, select multiple Images (I tested it with 10 images) and apply the Plugin. The resulting images for Contrast -50, 0 and 50 will look different; But the result for Contrast -50 will be the same (i.e. all pixel values are the same) as for -100, and the result for 50 the same as for 100. This problem does not occur if you select only one image.
Example: I want to modify saturation and contrast of my images. saturation = [20%, 50%], contrast = [10% 80%]
matrix-modification should export all images in multiple modifications (here 4x all images). One folder of images with saturation=20%, contrast=10%. One folder of images with saturation=50%, contrast=10%, ...
See #4
Do not mix lightroom classic (desktop) and lightroom (website)!
Download SDK:
https://nc.mlcloud.uni-tuebingen.de/index.php/s/JMdiEn5aKcxZsPT
Currently just a subset of Lightroom's photo manipulations are available in the plugin, but it would be great have more available.
Lightroom is separated into a catalog view, where the photo library is shown, and a develop view, where a single photo is manipulated. The plugin uses the catalog view, where just the quick develop manipulations are available. With Adobe's poor API documentation, I am not sure whats the best way to extend the plugin.
I see two possible ways:
preset = LrApplication.addDevelopPresetForPlugin( plugin, presetName, {'texture': 100} )
) and apply it on all photos (photo.applyDevelopPreset(preset, plugin)
).LrDevelopController.setValue( param, value )
).The presets is my preferred solution. It might be helpful to search on github for applyDevelopPreset
and LrApplication.addDevelopPresetForPlugin
to find tips and tricks for their usage.
In addition to the config JSON #4 , it would be helpful for reproducible science if we have a machine readable file, that documents how each modified image file was created. This file should be created during export, should include some metadata (e.g. date, version of plugin and lightroom, ...) and all operations that were applied to every exported image.
This could look like the following file:
{"ops": ["Step 1: Matrix develp", "Step 2: Crop"],
"images": {
"image1-1.png": {
"file": "image1.png", op: [
{"develop-saturation": 0.1}, {"develop-contrast": 0.3}, {"crop": {"width": ...}}
]
},
},
"_metadata": {
"lightroom_version": "....",
...
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.