# Intelligent Cropping of Negative Scans

**URL:** <https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401>\
**Category:** Digital Camera Scanning\
**Created:** [July 13, 2019, 7:51am UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401 "2019-07-13T07:51:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenK](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@StephenK](https://forums.negativelabpro.com/u/StephenK)\
**Post date:** [July 13, 2019, 7:51am UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/1 "2019-07-13T07:51:01Z")

</div>

Hi there

I’m trying to work out ways to optimise my negative scanning workflow, and wonder whether anyone has any ideas on how to automatically crop scans to the edge of the scan, preferably in batches.

As it stands, I crop each scan individually, but figure that there must be some better ideas being used.

In theory, I guess it might be even possible to write code to intelligently recognise each edge of the scan and crop accordingly?

Appreciate any ideas.

Regards

Stephen

---

<div class="post-metadata">

**Author:** ![Karyudo](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@Karyudo](https://forums.negativelabpro.com/u/Karyudo)\
**Post date:** [July 14, 2019, 10:09pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/2 "2019-07-14T22:09:42Z")

</div>

I’d look at Imagemagick ([https://imagemagick.org/index.php](https://imagemagick.org/index.php)).

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [July 15, 2019, 1:14pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/3 "2019-07-15T13:14:16Z")

</div>

It’s possible that I’ll add something in the future that can auto-crop the negatives if there is enough interest in this…

There’s a free script and plugin here that is proof of concept (not my creation): [https://gist.github.com/stecman/91cb5d28d330550a1dc56fa29215cb85](https://gist.github.com/stecman/91cb5d28d330550a1dc56fa29215cb85)

It’s pretty basic in terms of what it can do, is easily thrown off, and installing it right now is definitely not for the average user. But shows a working method for how it can be done.

It uses [OpenCV](https://opencv.org/), which I think is much better suited to this task than ImageMagick.

-Nate

---

<div class="post-metadata">

**Author:** ![Olli99](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@Olli99](https://forums.negativelabpro.com/u/Olli99)\
**Post date:** [August 16, 2019, 8:06pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/4 "2019-08-16T20:06:51Z")

</div>

Auto Cropping in an intelligent way would be great.

---

<div class="post-metadata">

**Author:** ![MattiMalandro](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@MattiMalandro](https://forums.negativelabpro.com/u/MattiMalandro)\
**Post date:** [August 17, 2019, 10:52am UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/5 "2019-08-17T10:52:39Z")

</div>

Is there a doc how to integrate this to LR for Windows - Step by step?

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 20, 2019, 2:41pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/6 "2019-08-20T14:41:37Z")

</div>

No, just the directions in the github repository. It is definitely not for the average user to attempt, and would require a pretty good knowledge of things like linux, bash, and installing open source packages. Be prepared to do a lot of googling and a decent amount of banging your head against the wall 😉

---

<div class="post-metadata">

**Author:** ![MattiMalandro](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@MattiMalandro](https://forums.negativelabpro.com/u/MattiMalandro)\
**Post date:** [August 20, 2019, 2:46pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/7 "2019-08-20T14:46:38Z")

</div>

😃 So I am out here 😃

---

<div class="post-metadata">

**Author:** ![Digitizer](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Digitizer](https://forums.negativelabpro.com/u/Digitizer)\
**Post date:** [December 24, 2019, 2:00pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/8 "2019-12-24T14:00:45Z")

</div>

@nate, auto-crop functionality would be very welcome indeed…

On the other hand, I tested NLP with uncropped photos that included both white and black borders and as far as I see, NLP works well with my test copies - when I set border tolerance to 25%

---

<div class="post-metadata">

**Author:** ![stecman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/stecman/32/1024_2.png) [@stecman](https://forums.negativelabpro.com/u/stecman)\
**Post date:** [June 15, 2020, 10:55pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/9 "2020-06-15T22:55:05Z")

</div>

Hey, slightly old thread, but I’m the author of that proof-of-concept auto-cropping plugin linked above. There’s been quite a bit of interest in this recently, so I’m currently packaging it up for easy installation. I’ll give an update here when it’s available.

I’ve also been working on a significantly improved detection algorithm. If anyone wants to provide sample, uncropped negative images, it would help me test this against a variety of setups and tune the software. 1500px JPGs are all that’s needed. The edge of the exposure needs to be intact, but the majority can be covered or heavily blurred if you prefer. For example:

 ![example_MG_3895](https://canada1.discourse-cdn.com/flex029/uploads/negativelabpro/original/2X/0/067815450ba9d14f5919002a9415f76007e521f1.jpeg)

[Email me](https://stecman.co.nz) if you don’t want to post publicly / spam the thread with images 👍

---

<div class="post-metadata">

**Author:** ![bshams](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bshams](https://forums.negativelabpro.com/u/bshams)\
**Post date:** [October 20, 2020, 3:13pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/10 "2020-10-20T15:13:11Z")

</div>

This is great, I’ll be emailing you with my samples shortly. Thanks for providing this software and I hope to use it in the future.

---

<div class="post-metadata">

**Author:** ![lagrange.max](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@lagrange.max](https://forums.negativelabpro.com/u/lagrange.max)\
**Post date:** [October 21, 2020, 7:51pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/11 "2020-10-21T19:51:10Z")

</div>

Hey Nate,  
is there already an update on this topic? Will there be auto cropping function in the future?  
Bests,  
Max

---

<div class="post-metadata">

**Author:** ![Sam\_St.John](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Sam\_St.John](https://forums.negativelabpro.com/u/Sam_St.John)\
**Post date:** [January 17, 2021, 1:50am UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/12 "2021-01-17T01:50:07Z")

</div>

Also really keen for an intelligence driven crop tool. Is there a board where we can vote on this functionality being added?

I’ve come to the world of negative scanning after inheriting multiple boxes of prints and negatives after a close family member passed away.

Having worked through the prints first, i currently have around 5000 camera scans of the prints. I have just started working with the negatives and NLP and will soon amass a similar number of scans.

If there was any way that the intelligent crop and straighten tool could also be used with the scanned prints, that would be amazing.

Thank you in advance.

Sam

---

<div class="post-metadata">

**Author:** ![Sam\_St.John](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Sam\_St.John](https://forums.negativelabpro.com/u/Sam_St.John)\
**Post date:** [January 17, 2021, 1:52am UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/13 "2021-01-17T01:52:02Z")

</div>

Hey Stephen, really keen on this functionality. Would love to see it as a plug in.

Sam

---

<div class="post-metadata">

**Author:** ![hms](https://avatars.discourse-cdn.com/v4/letter/h/e274bd/32.png) [@hms](https://forums.negativelabpro.com/u/hms)\
**Post date:** [January 17, 2021, 7:48pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/14 "2021-01-17T19:48:52Z")

</div>

The best way would be to ensure that you scan every negative at the same position. You can then batch crop them. Or you crop beforehand, so only the negative is being shot. Before each batch you can take a picture with the border if you want to use whitebalance.

---

<div class="post-metadata">

**Author:** ![Snowii](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@Snowii](https://forums.negativelabpro.com/u/Snowii)\
**Post date:** [April 23, 2021, 12:46pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/15 "2021-04-23T12:46:02Z")

</div>

hello guys, any progress on this? either as a part of the NLP or the standalone plugin mentioned by stecman (btw great job! would love to see this streamlined for the avg user usability)

thank you!

---

<div class="post-metadata">

**Author:** ![Artem](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Artem](https://forums.negativelabpro.com/u/Artem)\
**Post date:** [April 25, 2021, 1:46pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/16 "2021-04-25T13:46:49Z")

</div>

Very useful plug-in! Too bad it was never finished.  
Does anyone know similar software that can work in Windows?

---

<div class="post-metadata">

**Author:** ![pthurston](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pthurston](https://forums.negativelabpro.com/u/pthurston)\
**Post date:** [February 10, 2022, 3:58pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/18 "2022-02-10T15:58:14Z")

</div>

Would love to see autocrop functionality in NLP

---

<div class="post-metadata">

**Author:** ![dneuman](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@dneuman](https://forums.negativelabpro.com/u/dneuman)\
**Post date:** [July 20, 2022, 2:47pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/19 "2022-07-20T14:47:15Z")

</div>

Are you still thinking of including this in an update? It would be very useful.

---

<div class="post-metadata">

**Author:** ![pviolette92](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pviolette92](https://forums.negativelabpro.com/u/pviolette92)\
**Post date:** [January 12, 2024, 5:26am UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/20 "2024-01-12T05:26:45Z")

</div>

Any news on this? I have thousands of film captures I have to do this to.

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [January 22, 2024, 4:43pm UTC](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401/21 "2024-01-22T16:43:06Z")

</div>

**Yes! This is something I’ve been exploring in more depth recently and am working to incorporate in a future release for Negative Lab Pro v3.x…**

I’ve played around quite a bit with techniques that involve existing edge detection methods, and could not get it to a place that accurate enough for what I want to do with it.

**So instead, I’m training a neural network to recognize the capture area of a film scan.**

To make sure that the training includes all kinds of scans and situations, it would be helpful if anyone wanted to contribute their own uncropped scans…

**To submit uncropped scans to be included in the training data:**

1. **In Lightroom, make sure you reset any previous cropping you might have done on the photo.** If you don’t want to impact any previous settings you have on a photo, you can also make Virtual Copies of all the photos you want to share, then on the virtual copy, reset all the settings in Lightroom so that it appears like it did when you first imported the image.
2. **Export as a JPEG with max length set to 1024 pixels**
3. Upload to this [dropbox file request link](https://www.dropbox.com/request/hgLchnUqQBM91avtlPD1)

-nate

[Next page](https://forums.negativelabpro.com/t/intelligent-cropping-of-negative-scans/401.md?page=2)
