Can ordinary humans enhance blurry pictures yet ? - Page 1
Forum section: electronics / general

author: MathWizard
author_rank: Super Contributor
timestamp: March 07, 2021, 08:40:06 pm
content: I'm working on a repair , and I lost some of the notes I took when I was making a schematic. But I found some old picture of the PCB on the web. And I found a missing resistor not in my notes, but from the picture, I can just make out the resistor is actually just a jumper.But that reminds me, since the 90's as a kid, in all kinds of TV and movies, people are always making blurry pictures look better.Are we there yet ? I don't see any button in windows 10 picture viewer for it, or is some math for it actually built in?. Or can I get a freeware program for this yet

author: MikeK
author_rank: Super Contributor
timestamp: March 07, 2021, 09:34:32 pm
content: No, and we never will be. There is no information to extract from a single pixel.Alternatively, just say "Enhance!"

author: Gyro
author_rank: Super Contributor
timestamp: March 07, 2021, 09:35:03 pm
content: Ah, the old Hollywood zoom into a tiny fragment of an image and enhance.You might try importing the image into something like Gimp and trying a little sharpening and contrast enhancement, but you're not going to be able to reveal detail that isn't there, just pep it up a bit.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 07, 2021, 10:04:59 pm
content: There are plenty of ways to enhance resolution -- but doing so is increasingly questionable, statistically speaking. We can use an L1-norm interpolation for example, which gives lower noise results from surprisingly sparse inputs; we can also use neural networks to fill in what's likely missing, but this is contingent on the data the neural network was trained on -- that is, if it was trained on pictures of buildings, it's more likely to find stucco or brick or wood textures (or some hallucinogenic blend of everything!) when zoomed in, regardless of what the actual texture was (e.g., maybe it's actually a smooth metal surface, but the optical noise of the camera is being interpreted as real texture).The worst outcome is trying to speculate on something that well and truly has no information to support it. We could take a ten pixel image and expand it full screen. Obviously, the number of textures, and objects, that can be contained in that full size image, vastly exceeds that of the source image -- and just about any of them are as statistically likely as another, given that the overall colors are approximately right to match the original image when this image is reduced. Today, we can very easily create images that are a shockingly similar to a speculative organic process, as if using ones' imagination to fill in the blanks. It's like a dubious witness, testifying of a story, which they seemingly created from whole cloth; whereas the scene they were actually witness to, was perhaps a few seconds of shouting. And similarly, if we are to put too much trust in such a representation, we may find we are creating some very bad outcomes indeed (e.g. wrongfully imprisoning someone on false evidence).Okay, so going from basic image processing, to legal proceedings, is a rather abstract step, I admit; but to the extent that photographic evidence might be used in such proceedings, it's very applicable. And more broadly, we can guess that analogous processes occur within a witness's mind -- that is what I'm getting at.So -- if your image isn't very blurry, maybe an extra 20 to 100% of resolution could be drawn from it, maybe even 200 or 400% in extreme cases; but fine details will very quickly become questionable at that rate, especially if the algorithm is prone to synthesizing meaningful details (like text, or faces) where there isn't necessarily anything of the sort to begin with.As for actually trying it to see, I'm not sure offhand where you can find such a processor? There may be some online tools, worth looking around to see. I'm sure Photoshop has all manner of clever filters available. Or you could download some of the tools these are based on, which may require some degree of licensing, or building (e.g. from source code, or the tools just aren't very convenient e.g. CLI based), or cooking up utterly from scratch (you can do all manner of machine learning yourself, for free; but, it is an entirefieldto learn about, good luck -- and truly, good luck, it will surely prove very useful/profitable to put the time into, if you choose to!).Tim

author: coppercone2
author_rank: Super Contributor
timestamp: March 07, 2021, 10:09:52 pm
content: replaced with something a little more PC

author: DrG
author_rank: Super Contributor
timestamp: March 07, 2021, 10:33:42 pm
content: It is an interesting question. I rather agree with a lot of what has been said, which I would paraphrase as "you can't get something from nothing, unless you make something up".But, there are some interesting approaches. As it turns out I was just reading about these youngins and some work they are doinghttp://pulse.cs.duke.edu/It is an interesting approach to go "in the other direction" see the brief video.So, take for example a blury frame of a video from a security camera that shows a car's licence plate - not enough detail to read. Conventional enhancement is probably not going to get you where you want to go. But, what about if you construct the end product (the blurry license plate) starting from many high resolution frames of many license plates. From there, you could start to evaluate the probabilities of different alphanumeric characters, after the lowering of resolution, toward getting some useful information. Neat stuff.

author: Someone
author_rank: Super Contributor
timestamp: March 07, 2021, 11:03:02 pm
content: Quote from: T3sl4co1l on March 07, 2021, 10:04:59 pmTrue for general cases with a single source frame, but most of the impressive "forensics" enhance effects are from video source with many many frames (and possibly strong aliasing) to support the reconstruction..Quote from: MathWizard on March 07, 2021, 08:40:06 pmAll this tech is getting buried into the cameras, doing the enhance at capture time before saving the already enhanced image for your convenience (or annoyance depending on perspective). Image sensors have plateaued in performance for a while now and the image quality improvements year on year are more driven by image processing than hardware/optics/etc.

author: james_s
author_rank: Super Contributor
timestamp: March 07, 2021, 11:12:04 pm
content: Unfortunately Hollywood image enhancement is like most Hollywood things, it's a special effect, pure fabrication and fantasy and in real life almost nothing works the way it does in movies.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 07, 2021, 11:17:15 pm
content: Quote from: Someone on March 07, 2021, 11:03:02 pmYes! If you have additional information, make use of it!There's even a method to recoverlive audiofrom even rather poor quality video (e.g. < 60 FPS, low resolution webcam) -- the trick is using very small signals (down in the LSBs of pixels), over large areas, and correlating the changes across that area. The pixel count recovers your SNR, and the fact that audio waves propagate through space, over small objects in the scene -- plants, paper, wrappers, that sort of thing -- you can essentially map out oscillograms in video.As far as I'm aware... the technique isn't a general purpose, drop in and go, method -- it requires a lot of massaging to recover useful audio, and obviously is much better with higher framerate, resolution and color depth. You can appreciate, it might not be obvious how sound waves move across the objects in a visual frame. And with so little information to start with (noisy LSBs), it's not easy to solve for a correct pattern of wave propagation in the scene (essentially, I would suppose, a plot of delay and gain per pixel), let alone general angles since there might be multiple sound directions besides. But is it possible, absolutely!QuoteThe amount of CPU power that goes into a current model cell phone is incredible; they're putting neural network stuff into them, too -- not just GPU accelerated but direct NN/ML hardware too. Realtime high def augmented reality is well and truly here.Tim

author: RJSV
author_rank: Super Contributor
timestamp: March 08, 2021, 12:14:00 am
content: Uh, I'm having (friendly) doubts, first thought:What would the wavelength be, of an audio pressure wave, going across that room, on camera? It just seems way way small, and has to be in terms of displacing small surfaces, like a plant leaf.I need to check that, certainly the displaced surfaces are going to move, like zilch...But wavelength, at 1khz, I think is roughly around one foot (??).

author: RJSV
author_rank: Super Contributor
timestamp: March 08, 2021, 12:24:51 am
content: Ok, so I looked up the wavelength, it's 1.1 foot, at sea level, 1Khz sound wave. The sound extraction algorithm can look one place, for peaks, contrasted with another location, within some 1.1 foot space, to extract data in a phased manner, (but assuming you have the propagation direction to try).It's WILD, I doubt, but if I had to bet my life, it's probably something that can be, perhaps low frequencies only (below 100 Hz).

author: SilverSolder
author_rank: Super Contributor
timestamp: March 08, 2021, 12:35:53 am
content: The sample rate cannot be higher than the frame rate? so 30Hz out of a web cam? by Nyquist, we should be able to detect 15Hz!

author: Someone
author_rank: Super Contributor
timestamp: March 08, 2021, 01:09:53 am
content: Quote from: T3sl4co1l on March 07, 2021, 11:17:15 pmThere is a wealth of information hiding inside most images, but it comes down to very specific characteristics of the image sensor as you noted.Quote from: T3sl4co1l on March 07, 2021, 11:17:15 pmBut then, lol, the uninformed come out to announce theirsuperiorfundamentally incorrect understandings again.Quote from: SilverSolder on March 08, 2021, 12:35:53 amOr you could make an equally misleading performance claim about a camera at 60Hz frame (field) rate, that it has 8GS/shttps://www.photonics.com/Articles/133-MP_CMOS_Image_Sensor_Eliminates_Bulky_Optics/a57239OMG 4GHz nyquist!!!!@No, not really as the sampling is not evenly spaced in time.

author: RJSV
author_rank: Super Contributor
timestamp: March 08, 2021, 02:01:14 am
content: Ok,pls excuse, return to Enhance of images:I am aware of many examples, of course there is phantom limb, or false sense (of lost limb).For your question, human brains are ready to 'fill in' for a lost or defective sense. So the waving of the hand, across in front of the face, can cause the brain to 'fill-in', again for the missing or flakey ACTUAL view.This optical, and neurological process, I believe is termed (informally, as I am not a PRO), termed as'Visual phantom limb'.That's where the person has a vague impression or sight, blurred blob, only approximately where the actual real hand is located.So, in this case you maybe can't trust the image, but there possibly are these internal mechanisms that have more validity.In my example above, there is NO visual connection, rather all the 'input' being the motor neurons and muscle info, being used in this strange process.If you think about it, that arm of yours has moved across your field of view, many thousands or millions of times. So in absence of vision, that brain tries to supply or synthesize that view.It's a huge field, but it's interesting to study (neurology) in the context of the modern processors and image processing math.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 08, 2021, 02:23:33 am
content: Quote from: Someone on March 08, 2021, 01:09:53 amLet's just say that detecting audio by looking at images is probably in the "challenging" territory!

author: Tomorokoshi
author_rank: Super Contributor
timestamp: March 08, 2021, 04:12:17 am
content: This paper is interesting:https://www.cl.cam.ac.uk/~mgk25/ieee02-optical.pdf

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 08, 2021, 04:49:54 am
content: Quote from: Someone on March 08, 2021, 01:09:53 amYou could really stand to leave people a benefit of a doubt...I read it as sarcasm--well, I hope I read it correctly as sarcasm, at least.Tim

author: Someone
author_rank: Super Contributor
timestamp: March 08, 2021, 06:19:25 am
content: Quote from: T3sl4co1l on March 08, 2021, 04:49:54 amIf people choose to post nonsense in a public forum and think they're clever, expect to be corrected. Its about as silly as the often repeated "but scope screens only refresh 60 times per second", a measure entirely unrelated to the sampling rate of the signal acquisition, or other characteristics also measured in Hz.With a good model of the sensor we see all sorts of clever things like stabilization, rolling shutter motion compensation, flicker removal, etc. All built into the live processing path on photoandvideo cameras. Mostly proprietary stuff and completely invisible to the end user.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 08, 2021, 06:58:07 am
content: Well, fortunately, pi is exactly three.Tim

author: Syntax Error
author_rank: Frequent Contributor
timestamp: March 08, 2021, 10:39:06 am
content: OP: No and yes. There are a few tricks you can try at home such as unsharp mask, edge detection, hysteris stretching, pixel averaging and gausian blur. All of those high tech 1980s digital image 'convolve matrix' tricks have been done in photoshop since the 1990s.https://en.m.wikipedia.org/wiki/Kernel_(image_processing)Plus, there are the image stacking techniques used by astrophotographers.https://www.skyatnightmagazine.com/astrophotography/astrophoto-tips/a-guide-to-astrophotography-stacking/

author: TerraHertz
author_rank: Super Contributor
timestamp: March 08, 2021, 10:44:34 am
content: In youtube, search for "unblur image in photoshop"You'll be surprised."windows 10 picture viewer"Surely you jest?

author: jonovid
author_rank: Super Contributor
timestamp: March 08, 2021, 01:25:56 pm
content: There's more than one way to skin a cat . my apologies to all cats.butelectronic circuit you are seeking may have other ways to extract what you are seeking.if its only a missing resistor value, by deduction. looking at other known circuits of the some or similar

author: SilverSolder
author_rank: Super Contributor
timestamp: March 08, 2021, 03:10:32 pm
content: Quote from: Someone on March 08, 2021, 06:19:25 amWe are not yet seeing sound being picked out of the image... I'm looking forward to the live demonstration!

author: Syntax Error
author_rank: Frequent Contributor
timestamp: March 08, 2021, 03:40:45 pm
content: Quote from: SilverSolder on March 08, 2021, 03:10:32 pmI seem to remember --- vary vaguely --- an hypothesis that ancient sounds can be preserved in tacky surfaces in the same way that sounds are preserved in shellac cyclinders and records. Okay, I'm not sure how you would make a machine to extract those ancient sounds, ( petra-hertz? ), but in theory you might just hear the last words of the people of Pompeii.

author: grumpydoc
author_rank: Super Contributor
timestamp: March 08, 2021, 04:09:16 pm
content: Quote from: TerraHertz on March 08, 2021, 10:44:34 amUnbluring is slightly different from enlarging - in the former case the information should be in the picture, just in the wrong place and depending on how the blur is caused there are mathematically sound algorithms for recovering the correct image.Increasing the pixel resolution of an image needs new information to be extrapolated from what is there. In some (limited) cases (say a line drawing) this can be done surprisingly well but the general case is harder.

author: antenna
author_rank: Frequent Contributor
timestamp: March 08, 2021, 04:54:29 pm
content: The only way to add information and reduce noise in a photo is it have multiple frames from the same perspective (of an unmoved object, like a guy on a security camera that stood still for 12 frames) and average them such that the random noise cancels and the similar information reinforces itself. Image enhancements other than adding information also exist, but those are based of manipulating the existing data, for example, using mathematical convolution masks.

author: Someone
author_rank: Super Contributor
timestamp: March 08, 2021, 10:17:08 pm
content: Quote from: SilverSolder on March 08, 2021, 03:10:32 pmIt has been demonstrated, there is nothing preventing these methods being done live (other than funding/development effort):Quote from: antenna on March 08, 2021, 04:54:29 pmIt certainly does not require multiple images of a still/unmoved object. Reconstruction from multiple perspectives/moving scene is usually superior. Some of the details are in the above video, but "enhance" from moving objects has been the traditional use case.

author: cdev
author_rank: Super Contributor
timestamp: March 08, 2021, 10:33:56 pm
content: Inverse methods or finite element analysis is what is used. If you search on those keywords you'll find a lot of stuff.I'm pretty sure.

author: cdev
author_rank: Super Contributor
timestamp: March 08, 2021, 11:39:22 pm
content: It depends on what one wants to enhance. one needs a modern GPU with Cuda for many of the AI video enhancement processing tools.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: March 09, 2021, 12:17:59 am
content: The original posters problem, improving resolution of a single static image has some limited possibilities. As mentioned earlier various contrast enhancement techniques can improve the interpretability of the image. Since best results are somewhat subjective best results are usually a trial and error process rather than algorithmic. All of the big image processing programs have ways to manipulate the brightness histogram, usually in a variety of non-linear ways and also analogous to old darkroom dodging and burning in processes these changes can be varied over the image.If the characteristics of the camera system that generated the image are known there are possibilities in deconvolving the optical transfer function of the camera. Magic doesn't result but you can get some very noticeable improvements. If you still have the original camera the OTF can be estimated using a family of test images. Note that to get it right the camera has to be set up exactly the same way it was in the original picture (f/no, zoom and everything.).A bit of googling can give you a fair understanding of the process. Actual implementation is always a bit messy.The hollywood representations are about equally realistic as the matter transmitters on the Starship Enterprise.

author: Stray Electron
author_rank: Super Contributor
timestamp: March 09, 2021, 03:15:40 am
content: It really depends on your photographs. I use GIMP and I find that almost all pictures can be sharpened somewhat with it. But not like the nonsense that they show on television! Tweaking the Brightness and Contrast sometimes helps make certain elements in the picture more visible too. Download a copy of GIMP and try it. It uses a slider to control the Sharpness and it shows a thumbnail image of a portion of the photo and you can position that over the area of interest and then watch the sharpness increase or decrease as you move the slider. For me, I get the best results at about 66 to 80%. GIMP can be tricky if you want to save an image as a JPG since it wants to save changed images in it's own format so you have to Export the image and select JPG as the file type instead of just Saving it. GIMP is available for both Windows and Linux and Mac OS and it's free.

author: SilverSolder
author_rank: Super Contributor
timestamp: March 09, 2021, 03:56:37 am
content: Quote from: Someone on March 08, 2021, 10:17:08 pmThat is pretty impressive - I guess that with a 5602Hz frame rate (using the frame to frame recognition method), a frequency response up to 2.8Khz should be theoretically possible (Nyquist again!).Using the roller shutter is of course another step of totally awesome - wonder how much "unintended audio" has been encoded in videos across the world?

author: RJSV
author_rank: Super Contributor
timestamp: March 09, 2021, 09:07:57 pm
content: Yeah, LOL, like to see,...um, hear Tom Cruise yelling at that poor (mask less) stage-hand... (!!!)

author: MathWizard
author_rank: Super Contributor
timestamp: March 14, 2021, 04:59:37 am
content: Quote from: antenna on March 08, 2021, 04:54:29 pmI yeah some lecture, I guess rather recently, about using AI to examine pictures, and using some matrices of course, to extrapolate a more detail image ........but right, thats like the capthcha puzzle things too. So we aren't really there yet, movies have let me down again.So I should try a proper image editor, but I doesn't really matter much for the PCB picture I had, the only cap values are easy enough to deduce.

author: cdev
author_rank: Super Contributor
timestamp: March 15, 2021, 08:28:42 pm
content: Some of the old movies that have been colorized and digitally enhanced look strikingly real. On Youtube they have some old films of new york city before my birth that are very realistic looking. I used to go into the city a lot as a child and some of these videos are old enough to still contain signs and landmarks that I remember from my childhood, now long gone. Colorization/enhancement of films from the early 20th century really gives them a new life.You can also use photogrammetry to digitally reconstruct some of the geometry they show.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: March 15, 2021, 10:57:03 pm
content: The latest version of Camera Raw (a part of Photoshop) has AI that supposedly increases the resolution of pictures. Here's an article describing it...https://petapixel.com/2021/03/13/adobe-photoshops-super-resolution-made-my-jaw-hit-the-floor/

author: SilverSolder
author_rank: Super Contributor
timestamp: March 16, 2021, 03:18:14 am
content: It is fundamentally impossible to put information back in that is no longer there...But it is entirely possible to make something up that looks plausible!

author: cdev
author_rank: Super Contributor
timestamp: March 17, 2021, 01:36:37 pm
content: I know this thead isnt about web images.. but since it seemed relevant..The task of reducing graphics such as a title page, to serve as a link to another page, is often useful. Shrinking full sized pages of text or scientific graphics to their smallest legible screen representation where the text is readable. To do this I use GIMP and the Gaussian Blur function at around 1/3 of a pixel.0.33 (less than 1/2)1) resize image size downward using the best quality algorithm2) apply very subtle Gaussian Blur3) apply very subtle Unsharp Mask to taste. Not too much.Doing this you can get very good legibility for very small text. This process lends itself well to batch operations.You can always make graphics smaller much smaller (for GIF compression by posterizing them (drastic color reduction)This makes them very compressible. (Try it, you'll see what I mean) Probably because several image formats use RLE, run length encoding. (GIF and TIFF do, I think PNG may too. )

author: LaserSteve
author_rank: Super Contributor
timestamp: March 17, 2021, 05:49:16 pm
content: If you want to play with Stills download ImageJ..Then find some plug-ins and scripts for it.