DOS9570
February 3, 2022, 11:41am
1
I have found this Github Project for an opencv/python based frame detection and cropping plugin.
AutoCrop.lua
-- LR imports
local LrApplication = import("LrApplication")
local LrApplicationView = import("LrApplicationView")
local LrBinding = import("LrBinding")
local LrDevelopController = import("LrDevelopController")
local LrDialogs = import("LrDialogs")
local LrExportSession = import("LrExportSession")
local LrFileUtils = import("LrFileUtils")
local LrFunctionContext = import("LrFunctionContext")
local LrLogger = import("LrLogger")
This file has been truncated. show original
Info.lua
return {
LrSdkVersion = 6.0,
LrSdkMinimumVersion = 6.0,
LrToolkitIdentifier = 'nz.co.stecman.negativeautocrop',
LrPluginName = "Negative Auto Crop",
LrExportMenuItems = {
{
This file has been truncated. show original
_README.md
# Film negative auto-crop plugin for Lightroom 6
This is a proof of concept plugin for Adobe Lightroom 6 that automatically crops
scanned film negatives to only the exposed area of the emulsion using OpenCV.
The detection works, but it could be better. Currently it does a single pass:
1. Mask out extremely bright points (eg. light coming through the sprocket holes)
2. Threshold the image starting from zero, increasing in steps
3. At each threshold, collect the rotated bounding rectangle around the largest contour/blob (larger than a minimum size)
This file has been truncated. show original
There are more than three files. show original
Maybe its possible to implement it in an upcoming version.
Cropping the Pictures is by far the worst part of all o the work.
Hope this can be helpful
Yuval
nate
February 8, 2022, 8:51pm
2
Hi,
Yes, there has been some discussion on it here: Intelligent Cropping of Negative Scans - including a post from the creator of that proof of concept.
May be worth popping back in over at the thread!
-Nate