<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>image-processing on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/image-processing/</link>
    <description>Recent content in image-processing on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 22 Mar 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/image-processing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Things I Learned - 22 Mar 2026</title>
      <link>https://www.s-anand.net/blog/things-i-learned-22-mar-2026/</link>
      <pubDate>Sun, 22 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-22-mar-2026/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Psychological operations in design by &lt;a href=&#34;https://www.linkedin.com/in/narendraghate/&#34;&gt;Narendra Ghate&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;When lights are dimmed people speak softer. So, dimming lights reduces sound levels in noisy offices.&lt;/li&gt;
&lt;li&gt;Rather than reduce the size of shampoo sachets (which customers and business both hate), include 2 shampoos in one sachet, tearable in the middle.&lt;/li&gt;
&lt;li&gt;Price saches at 95p with a 5p deposit for the sachet - which rag-pickers can collect and return to the retailer.&lt;/li&gt;
&lt;li&gt;People think of stains like wounds on cloth. So a &amp;ldquo;stain band-aid&amp;rdquo; where you stick a strip, and remove it after 5 min to remove the stain, is catchy.&lt;/li&gt;
&lt;li&gt;A mechanical wind-up fish that stirs the water in the bucket while clothes are soaking speeds up the process.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Senthil &amp;amp; Amutha, founders of &lt;a href=&#34;https://www.payir.org/&#34;&gt;Payir&lt;/a&gt; demonstrated a &lt;a href=&#34;https://thinaistore.myinstamojo.com/product/fabric-calendar-hanging-model-reusable&#34;&gt;re-usable fabric calendar&lt;/a&gt; that converts into a bag for re-use. Pretty clever! Their message at the &lt;a href=&#34;https://www.chennaidesignfestival.com/&#34;&gt;Chennai Design Festival&lt;/a&gt; was that good design can be &lt;em&gt;for&lt;/em&gt; the masses and &lt;em&gt;by&lt;/em&gt; the masses to reclaim their time, energy, and joy.&lt;/li&gt;
&lt;li&gt;The urinary bladder works based on &lt;em&gt;involuntary&lt;/em&gt; muscular contractions towards the end, to clear out the last bits of fluid. It&amp;rsquo;s not fluid flow, it&amp;rsquo;s muscle contractions. (Oh, the things I learn!) &lt;a href=&#34;https://gemini.google.com/share/87351b16e4b6&#34;&gt;Gemini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Indigo bans ghee in cabin baggage. Also coconuts, pickles, oily foods, gooey cakes, spices (masala, powders), strong-smelling food. &lt;a href=&#34;https://chatgpt.com/share/69bc0652-bdbc-8003-9326-b48a91d5bd2c&#34;&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;New skill unlocked: how to demo without knowing what you&amp;rsquo;re demo-ing. STEP 1: Copy-paste all demo pages as Markdown. STEP 2: Tell AI &amp;ldquo;Here is a demo I&amp;rsquo;ll be showing. (Add context.) Tell me how I should explain this and what I should point out as specific examples. Use concise bullets.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;We&amp;rsquo;ve learnt not to do things we don&amp;rsquo;t know how to (until we learn it). When AI is doing things, this is a bottleneck. Get out of the way. Stop filtering for what YOU can do. Stop learning what IT can do. Ask for it. That&amp;rsquo;s faster. Learning can come later.&lt;/li&gt;
&lt;li&gt;I keep forgetting that QR codes need a white border for them to work.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/JamesLMilner/terra-draw&#34;&gt;TerraDraw&lt;/a&gt; provides a unified API across multiple mapping libraries. (In the vibe-coding era, this is not as useful.)&lt;/li&gt;
&lt;li&gt;To create desktop apps declaratively on Linux, Slint, Flutter, QML(Qt) and GTK4 are options. Slint and Flutter seem to be cross platform. Slint is newer, less mature but compiles to small fast binaries and might be a good option to explore. Flutter seems more mature and fairly popular. &lt;a href=&#34;https://claude.ai/share/183cd28a-be7e-4857-a6ff-6c919e3a9c15&#34;&gt;Claude&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pytorch.org/blog/automated-trace-collection/&#34;&gt;PyTorch Tracing&lt;/a&gt; watches one forward pass and freezes the path into a portable recipe. But it silently ignores branches your example didn&amp;rsquo;t take. &lt;a href=&#34;https://claude.ai/share/7d970eff-56a5-4502-9afd-3fcf8648df2a&#34;&gt;Claude&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Internet is forking into a human internet vs an agent web &lt;a href=&#34;https://www.linkedin.com/posts/saamnaghshineh_automate-faster-activity-7431817567536627712-vkLz/&#34;&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://samgeo.gishub.org/&#34;&gt;SamGeo&lt;/a&gt; is a Python Package for geospatial image processing. While &lt;a href=&#34;https://allenai.org/olmoearth&#34;&gt;OlmoEarth&lt;/a&gt; provides geospatial embeddings, SamGeo can convert geospatial data to vector data! So you can do things like:
&lt;ul&gt;
&lt;li&gt;Create the outer boundary of all apartments with swimming pools in a city&lt;/li&gt;
&lt;li&gt;Extract the shape of all lakes across the years to find out how they&amp;rsquo;re changing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Terence started Foundation for Science and AI Research (SAIR) to use AI in science research. Verifiable proofs (e.g. &lt;a href=&#34;https://lean-lang.org/&#34;&gt;LEAN&lt;/a&gt;) are a big part of this.&lt;/li&gt;
&lt;li&gt;Since AI needs to run on phones and that needs GPUs, a lot of phones might need replacement in the next few years.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Automated image enhancement</title>
      <link>https://www.s-anand.net/blog/automated-image-enhancement/</link>
      <pubDate>Mon, 22 Nov 2010 12:10:38 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/automated-image-enhancement/</guid>
      <description>&lt;p&gt;There are some standard enhancements that I apply to my photos consistently: auto-levels, increase saturation, increase sharpness, etc. I’d also read that &lt;a href=&#34;http://www.petapixel.com/2009/05/19/sharpening-your-photos-like-flickr/&#34;&gt;Flickr&lt;/a&gt; &lt;a href=&#34;http://colorspretty.blogspot.com/2007/01/flickrs-dirty-little-secre_117020899505299548.html&#34;&gt;sharpens&lt;/a&gt; uploads (at least, the resized ones) so that they look better.&lt;/p&gt;
&lt;p&gt;So last week, I took 100 of my photos and created 4 versions of each image:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The base image itself (&lt;a href=&#34;http://www.s-anand.net/phototest/048-base.jpg&#34;&gt;example&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;A sharpened version (&lt;a href=&#34;http://www.s-anand.net/phototest/048-sharpen.jpg&#34;&gt;example&lt;/a&gt;). I used a sharpening factor of 200%&lt;/li&gt;
&lt;li&gt;A saturated version (&lt;a href=&#34;http://www.s-anand.net/phototest/048-saturate.jpg&#34;&gt;example&lt;/a&gt;). I used a saturation factor of 125%&lt;/li&gt;
&lt;li&gt;An auto-levelled version (&lt;a href=&#34;http://www.s-anand.net/phototest/048-autocontrast.jpg&#34;&gt;example&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I created a &lt;a href=&#34;http://www.s-anand.net/phototest/&#34;&gt;test&lt;/a&gt; asking people to compare these. The differences between these are not always noticeable when placed side-by-side, so the test flashed two images at the same place.&lt;/p&gt;
&lt;p&gt;After about 800 ratings, here are the results. (Or, &lt;a href=&#34;https://spreadsheets.google.com/ccc?key=0Av599tR_jVYgdEtmeWNMYUNFamNWZ05oaEQ5NXd6b1E&amp;amp;hl=en_GB&#34;&gt;see the raw data&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sharpening clearly helps&lt;/strong&gt;. 86% of the sharpened images were marked as better than the base images. Only 2 images (&lt;a href=&#34;http://www.s-anand.net/phototest/000-base.jpg&#34;&gt;base&lt;/a&gt;/&lt;a href=&#34;http://www.s-anand.net/phototest/000-sharpen.jpg&#34;&gt;sharp&lt;/a&gt;, &lt;a href=&#34;http://www.s-anand.net/phototest/012-base.jpg&#34;&gt;base&lt;/a&gt;/&lt;a href=&#34;http://www.s-anand.net/phototest/012-sharpen.jpg&#34;&gt;sharp&lt;/a&gt;) received a consistent feedback that the sharpened images were worse. (I have my doubts about those two as well.) On the whole, it seems fairly clear that sharpening helps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Saturation and levels were roughly equal, and somewhat unclear&lt;/strong&gt;. 69% of the saturated images and 68% of auto-levelled images were marked as better than the base images. And almost an equal number of images (52%) showed saturation as being better than the auto-levelled version. For a majority of images (60%), there’s a divided opinion on whether saturation was better than levelling or the other way around.&lt;/p&gt;
&lt;p&gt;On the whole, sharpening is a clear win. When in doubt, sharpen images.&lt;/p&gt;
&lt;p&gt;For saturation and levelling, there certainly appears to be potential. 2 in 3 images are improved by either of these techniques. But it isn’t entirely obvious which (or both) to apply.&lt;/p&gt;
&lt;p&gt;Is there someone out there with some image processing experience to shed light on this?&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.flickr.com/photos/yorkjason/&#34;&gt;Jason&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;14 Feb 2011 11:27 am&lt;/em&gt;:
Depending on your settings in Photoshop (i assume that&amp;rsquo;s what you&amp;rsquo;re using since you refer to it as &amp;ldquo;levels&amp;rdquo;), when you adjust levels to increase contrast (when either the left or right sliders are moved toward each other), the saturation is also increased. You can click &amp;ldquo;preserve tones&amp;rdquo; or something like that, to help keep the saturation unchanged but I don&amp;rsquo;t due to some reason I can&amp;rsquo;t recall right now.
Anyway, so when you hit Auto-Levels, it moves the sliders closer toward each other (since they start out farthest away from each other). This increases the contrast and ALSO increases the saturation. You&amp;rsquo;ll also notice this effect with the dodge/burn brushes: the saturation is also effected in the applied area. Now, your test results seem similar between the &amp;rsquo;levels&amp;rsquo; group and the &amp;lsquo;saturation&amp;rsquo; group because both groups are seeing photos with saturation increases.
Note that the converse is not true: changes made only to saturation do not yield a change in contrast. The fact that hues will now stand out more from each other sorta gives the affect of &amp;ldquo;contrast&amp;rdquo; in a sense though, even if it isn&amp;rsquo;t reflected accurately in the histogram.
I would still expect people to prefer the photos with Auto-Levels applied, since those photos will have greater detail and less of a hazy look in the mid-ranges, but whatever. People are hard to predict. I prefer the auto-leveled photos over the saturated photos. In fact, I almost always adjust levels, and when I do, I often decrease saturation a tiny bit depending on the subject.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Ganesh&lt;/strong&gt; &lt;em&gt;6 Mar 2011 3:44 am&lt;/em&gt;:
Sharpening is always better because it is non-destructive in nature and does not add any new details unlike the the saturation and levels.
In a way it is illusory but it works. It basically works on the edges and emphasize them. Internally, it can be assumed as a 2 step process, the first step is to blur the image slightly and the second step is to compare the original with blur version one pixel at a time &amp;amp; emphasize them. If original pixel is brighter than the blurred version, then lighten; if original is darker than the blur version, then darken. The objective is to increase the contrast between each pixel and its neighbours&amp;hellip;
Sharpening works well on images that has slight blur originally, inherently due to the way in which pictures are taken&amp;hellip; casually on the move, non-sturdy hands etc&amp;hellip; Hence, it appears to work on most of the pictures
Advanced photo editing tools provide feature called Unsharp Masking, where it is possible to control the &amp;lsquo;radius&amp;rsquo; - amount of blur and &amp;lsquo;Threshold&amp;rsquo; - difference in value between original and blur when it exceeds certain value sharpening is applied&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Software that builds on hunches</title>
      <link>https://www.s-anand.net/blog/software-that-builds-on-hunches/</link>
      <pubDate>Sun, 26 Mar 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/software-that-builds-on-hunches/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.wired.com/news/technology/0,70388-0.html&#34;&gt;Software that builds on hunches&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;hellip; is a filter for images that allows a naive user to improve digital photos without understanding complex tools like Adobe Photoshop, by choosing from mutations of the picture to make it better. &amp;ldquo;My grandmother doesn&amp;rsquo;t know anything about improving pictures,&amp;rdquo; says Bonabeau, &amp;ldquo;but she knows which pictures of her grandchildren she likes.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Wired News tried out the photo selector. After loading the photograph you want to improve, the application shows you nine mutant versions. In the case of a dark photo, it&amp;rsquo;s easy enough to pick a lighter version and move it to the seed area so that it becomes the foundation of the next crop of mutation pictures. You can keep selecting and mutating indefinitely. When you find the version you like, you save it. In a photo of a dark house and a moon, seven iterations were enough to lighten the photograph adequately.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is from &lt;a href=&#34;http://icosystem.com/&#34;&gt;Icosystem&lt;/a&gt;, who&amp;rsquo;re doing some cool work like using ants&amp;rsquo; logic to route BT&amp;rsquo;s telecom traffic or Fedex&amp;rsquo;s packages.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Converting Black-and-White to Colour</title>
      <link>https://www.s-anand.net/blog/converting-black-and-white-to-colour/</link>
      <pubDate>Sun, 09 Oct 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/converting-black-and-white-to-colour/</guid>
      <description>&lt;p&gt;How to &lt;a href=&#34;http://www.swedesignz.com/photoshop.html?id=115&#34;&gt;convert a black &amp;amp; white photo into colour&lt;/a&gt; using Photoshop. The result looks remarkably good.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Scantips</title>
      <link>https://www.s-anand.net/blog/scantips/</link>
      <pubDate>Wed, 13 Feb 2002 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/scantips/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.scantips.com/&#34;&gt;Scantips&lt;/a&gt;. Ways to improve your scanning.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
