sample of automatically generated comics

Read Your Movies As Automatically Generated Comic Books

A research paper from Dalian University of Technology in China and City University of Hong Kong (direct PDF link) outlines a system that automatically generates comic books from videos. But how can an algorithm boil down video scenes to appropriately reflect the gravity of the scene in a still image? This impressive feat is accomplished by saving two still images per second, then segments the frames into scenes through analysis of region-of-interest and importance ranking.

movie to comic book pipeline diagram

For its next trick, speech for each scene is processed by combining subtitle information with the audio track of the video. The audio is analyzed for emotion to determine the appropriate speech bubble type and size of the subtitle text. Frames are even analyzed to establish which person is speaking for proper placement of the bubbles. It can then create layouts of the keyframes, determining panel sizes for each page based on the region-of-interest analysis.

The process is completed by stylizing the keyframes with flat color through quantization, for that classic cel shading look, and then populating the layouts with each frame and word balloon.

The team conducted a study with 40 users, pitting their results against previous techniques which require more human intervention and still besting them in every measure. Like any great superhero, the team still sees room for improvement. In the future, they would like to improve the accuracy of keyframe selection and propose using a neural network to do so.

Thanks to [Qes] for the tip!

How Laser Headlights Work

When we think about the onward march of automotive technology, headlights aren’t usually the first thing that come to mind. Engines, fuel efficiency, and the switch to electric power are all more front of mind. However, that doesn’t mean there aren’t thousands of engineers around the world working to improve the state of the art in automotive lighting day in, day out.

Sealed beam headlights gave way to more modern designs once regulations loosened up, while bulbs moved from simple halogens to xenon HIDs and, more recently, LEDs. Now, a new technology is on the scene, with lasers!

Continue reading “How Laser Headlights Work”

Cursed USB-C: When Plug Orientation Matters

One of the selling points of the USB-C plug is that supposedly there is no way to incorrectly insert it. As [Pim de Groot] shows with a ‘Cursed USB-C 2.0 Device‘, reality is a bit more complicated when it comes to USB 2.0 compatibility in USB-C. He made a PCB that elegantly demonstrates the simplicity of the problem, featuring two LEDs. Only one orientation of the USB-C plug will cause one of the LEDs to light up green, with the other orientation leaving both LEDs blinking red.

Sigil on the back of the cursed USB-C 2.0 device, by Pim de Groot.

The reason for this behavior is simple: as [Pim] explains, although the USB-C plug has only a single pair of data lines (D+/-) for USB 2.0 connectivity, the receptor duplicates these on either side of its pins, leading out two pairs of D+/- lines. Normally you would connect the matching lines in these pairs together to ensure consistent behavior no matter the plug orientation, but you don’t have to.

By leading each USB 2.0 data pair to its own SAMD11C MCU, only one of the MCUs would be connected to USB, resulting in the connected MCU blinking the LEDs. With a bit more circuitry it’s possible to detect which way around the plug is inserted and use this information in a single MCU system, altering its behavior. While at first glance this seems little more than a fun party trick, but it also offers insight in a possible failure mode of USB-C 2.0 devices where only one plug orientation works, due to broken traces or pads.

Board view of [Pim]’s Cursed USB-C 2.0 Device.

(Heading image: Cursed USB-C 2.0 Device, by Pim de Groot)

Bringing Some Coulter To The Bench: Measuring Tiny Particles With Nanopore Sensing

We’ve all been there: you’re sitting at your bench, with a beaker full of some conductive fluid with a bunch of tiny particles suspended in it, and you want to measure the sizes of each particle.

Okay, maybe this isn’t a shared experience we’ve all had, but It’s at least an ordeal Hackaday alum [Nava Whiteford] has been through, and he was able to carry out the measurements in question using a neat apparatus known as a Coulter counter.

Imagine a container full of a conductive fluid. If you place an electrode at each end, the fluid will carry a current. Now, drop an insulating divider in the middle of the container, and the current will stop flowing. Finally, poke a small hole (or nanopore) in the divider. Huzzah! The current is flowing again… but how does this let us measure particle sizes? Well, now think about a tiny particle moving through the hole in the divider. As the particle passes through, the hole will be partially blocked, and the current flow will be partially interrupted. It turns out, the resulting dip in current is proportional to the volume of the particle — a fun property known as the Coulter principle.

[Nava] built a great demo of the system with a macropore in place of the nanopore. The pore in question was a hole melted into a bottle cap, which was suspended in a beaker by two toothpicks. [Nava] used small chips of Acrylic as the particles to be measured, which they pipetted into the solution of KCl. They then passed a current through the solution and used an oscilloscope to sense the interruptions. Be sure to check out their write up for a video of the system in action!

Of course, this technique has a much wider range of applications than measuring little bits of plastic — obtaining blood cell counts, for one. We’ve seen particle counters for use in the air before, but it’s great to see that there’s a way to measure particles in an aqueous solution —  you know, in case we ever find ourselves in such a situation.

PCB Reflow With A PCB

We wonder if [Carl Bugeja] was looking at a 3D printer’s heated bed when he got the idea to create a PCB reflow heater using a PCB. He tried a quick test to heat up a standard PCB and made it self-reflow. That worked, though it obviously wouldn’t be practical for all boards. But it proved he could make it work.

To improve the heating performance, he laid out a metal core PCB, along with some custom control electronics. The board’s resistance didn’t quite perform to calculations, but luckily, it was too high so a shunt wire was able to reduce the overall resistance. One important thing to consider is that the heater board needs to use higher temperature solder so it doesn’t desolder its own components

We were glad to see [Carl] use a metal core board as standard PCB material can get cranky at high temperatures over 130C. Even so, it would be good to check the boards you plan to use this way to make sure they are rated for the kind of temperatures required.

We’ve seen lots of reflow heat sources. Halogen lights come to mind. Or, raid the toy closet and find an Easy Bake oven.

Continue reading “PCB Reflow With A PCB”

WebSerial: Browser Based Development For Your Boards And Electronic Badges

For years, one of the most accessible and simplest-to-implement methods of talking to a dev board has been to give it a serial port. Almost everything has serial in some form, so all that’s needed is to fire up a terminal. But even with that simplicity, there are still moments when the end user might find a terminal interface a little daunting. Think of a board aimed at kids for example, or an event badge which must be accessible to as many people as possible.

We’ve seen a very convenient solution to this problem in the form of WebUSB, but for devices without the appropriate USB hardware there’s WebSerial, an in-browser API for communicating with serial ports including USB-to-serial chips. [Tom Clement] argues that this could serve as the way forward for event badges. Best of all it can be a retro-fit to enable in-browser development for older badges or dev boards with a serial port.

The boards on which he demonstrates the technique are the series of event badges running the badge.team firmware platform including his own i-Pane from CampZone 2019 and going right back to the SHA 2017 badge, but there’s no reason why the same technique can’t be extended to other boards.

There’s a snag with all this though, sadly only browsers in the Chrome family support it at the time of writing, with no plans from Mozilla and apple, and silence from Microsoft. So things look likely to stay that way. It is however inevitable that in time there will be commercial products taking advantage of it via the use of cheap USB to serial chips, so perhaps the case to incorporate it will make itself.

Header: Mobius, Public domain.

Hackaday Links Column Banner

Hackaday Links: March 21, 2021

If you think you’re having a bad day at work, pity the poor sysadmin at Victoria University of Wellington in Australia New Zealand, who accidentally nuked the desktops of pretty much everyone at the university. This apparently happened last week and impacted everyone connected to the university network with a Windows machine, which had any files stored on their desktops deleted and also appears to have reset user profiles to the default state. This caused no end of consternation, especially among those who use their desktop folder to organize work in progress; we’d imagine more than one student at VUW is hating life right now for not storing work on a backed-up network drive. The problem seems to have started with an attempt to clean up files and profiles left behind by former students; how that escalated to nuking files on the desktop will require some ‘splaining.

Speaking of mea culpas, there was quite a dustup this week in the Cricut community. It started when the maker of CNC cutting machines announced its intention to limit uploads to their online design software unless the user signs up for a $10 a month account. After getting an earful from the users, the CEO of the company announced that these changes would be delayed until the end of 2021. That decision still didn’t sit well with the community, which includes a fair number of users designing PCBs, and two days later, the CEO announced that they were throwing in the towel on the whole plan, and that everything was going back to status quo ante. Story over? We’ll see — it seems like Cricut has tipped its hand here that they’re looking to extract more money from the users, and the need for that likely hasn’t gone away just because they relented. As Elliot Williams pointed out when we discussed the whole debacle, it’s easy to see how Cricut could start adding new features to the paid version of their software, basically abandoning the free user base. We’ll have to see how the obviously vociferous community responds to something like that.

Much interesting news from Mars this week, where the Perseverance rover is getting used to its new home and getting itself ready to roll. Late last week, Perseverance successfully dropped the “belly pan” that was covering the sensitive instruments under the rover, including the Adaptive Sample Caching system that will seal up Martian core samples and drop them out onto the surface for later pickup. This seemingly simple task was a critical one; had the pan not cleanly separated, the mission could have been severely impacted. Perseverance also did a little test drive this week, and recorded what it sounds like to drive on Mars. The audio clip is 16 minutes long, and the noises coming from the billion-dollar rover are just awful at times. We hear clunks and clanks and squeals galore, and while we’re sure they all have a good explanation and will provide valuable engineering data, they sound somewhat alarming to us.

But not so alarming as the sounds that must have come from a Jeep that suffered a bad tow job recently. The cringe-making story starts with a brand-new Jeep being towed on its wheels behind a motorhome, which allows the RV owners to park their rig and still have something to drive around in while they camp. The towed vehicle, or “pusher”, is normally equipped with a manual transmission, as towing with the wheels on the ground for extended distances is easier with them. Unfortunately, the Jeep’s owner set up the shift levers wrong and left the transmission in first gear, with the transfer case in low range. The linked article estimates the gearing ratios meant that the poor Jeep’s engine was being spun at something like 54,000 RPM; chances are good the engine exploded long before that point. The damage shown in the video accompanying the article is just brutal — the oil pan and bell housing are gone, the bottom of the crankcase is blown out, and at least two pistons and their share of the crankshaft are missing in action. We feel sorry for the owner, but really wish the Jeep had had a belly cam like the one on Perseverance.