This very interesting looking bridge is one of the first things I photographed when we came to Ottawa. The light wasn’t very special at the moment but I really liked the symmetry. (It would also be cool if the word symmetry was symmetrical)
Then we crossed it and ended up in Gatineau, Quebec. That’s why it’s locally known as Interprovincial Bridge, as well as Alexandra Bridge. Not sure why it’s not called Royal Bridge as well, but I guess two nicknames along the full name are quite enough.
It’s over 100 years old and used to hold some length records in its time but as it usually goes, someone younger came along and overthrew it. The younger chap was Quebec Bridge. Quebec now doesn’t have to share one side of the record with Ontario, I guess.
Workers had to constantly break the ice on the river when building the bridge. It’s Canada, so why I’m saying this?
Imagine approaching someone at the bar: “I’m an ice-breaker, nice to meet you!”
Again, it’s Canada so it’s 50-50 if they’d laugh at that…
Couple summers ago I saw a cool hack where a sensor, placed on the TV, detected where the emitter, placed in the glasses, was, and based on that information adjusted viewpoint of the 3D scene displayed on the TV.
Cool, right? And all you needed were these two simple devices and the right software.
Well, why use two if you can use only one? 😀
There is already a sensor mounted on your laptop screen, called a webcam, and if you’ve ever tagged someone on Facebook, you know face recognition is a real thing. That means your computer can literally “see” where you are if you teach it how to look.
It took me a couple of days to bang things up and have a proof that this is possible to achieve. It then collected dust on my hard drive for a year or two until I woke up a couple days ago with an idea how to tweak it to make it representable.
How it works
I used OpenCV library to detect faces and their location in the image webcam sees. Then I picked the closest, the biggest one, and did all the calculations with it. OpenGL is responsible for rendering the 3D image, and Qt (cute) is putty that binds them together, handling all the events and window management.
Several things influence the right viewpoint for the 3D scene:
Size of the scene you’re viewing
Angle you’re viewing the scene from
Distance from the scene
Those things depend on:
Size of the screen
Distance from the screen
Distance from the camera
Your camera lens width
Angle you’re looking the screen at
For real-life application, things can be simplified. With webcam attached to your display/laptop, distance to screen and distance to camera are very similar and oriented in the same direction.
For the demonstration, I simplified things further. Distance from the screen, for the lack of stereo vision, can be estimated.
Since I’m doing this on a laptop screen, on a table, I decided that length of 1 in OpenGL was about 1dm (decimetre), or about the size of a coffee mug. Distance from the camera and from the screen is roughly 6dm.
I had no choice with the webcam lens width and I couldn’t find any info about it online but this was enough to run the prototype and guestimate other parameters.
Position of your eyes in the image defines the x and y axis coordinates of the 3D scene viewpoint and depends on the lens width. Wider lens will have more coverage (left, right, up and down) than the more narrower lens, meaning that your face won’t appear in the same place on both cameras, even though they have the same resolution. Parameters should be adjusted accordingly.
Z axis represents the distance from the scene. You know how when you get closer to your window, the more of outside you can see?
Now imagine your screen being a window into a virtual world. It would have to do the same. That’s possible to adjust with the OpenGL camera angle. I tried to estimate distance from the screen based on the face surface size in the image. Unfortunatly, with my webcam, that proved too volatile for smooth experience. So I just used fixed distance of 6dm. This can be improved with stereo vision in the future.
First scene in the video is with laptop screen tilted to 45° angle and viewed from slightly above. I had to adjust the viewpoint manually since program is not aware of the angle. If gyroscope-like sensor was embedded in it like in most tablets and phones, it could have been done automatically.
Second scene is from the angle you would normally look your screen at.
Third scene is a screen capture of the program output with camera output overlaid on the bottom left. Blue rectangle marks the location where the face was detected. If you watch carefully, you can see how a false positive was briefly detected on my shirt. That’s why it pays to always pick the biggest detected face in the scene. Also, you can play-fight who will the program pick with a person sitting next to you 😀
Possible improvements and future work
Let’s start by saying that face detection can be CPU intensive. Especially when you do it 60 times a second. We can get that load off to GPU, and in fact OpenCV supports that kind of operation. Unfortunately for me, driver for my GPU doesn’t. Proprietary driver does, but doesn’t support extending my screen to second display. Guess which one I prefer 🙂
Another obvious solution is putting more interesting graphics inside that virtual reality window. I know boxes aren’t very interesting to look at. What would you like to see instead?
Since all the code is cross platform, it’s fairly easy feasible to port it to your phone or tablet. Putting that selfie camera to a good use, what would you do with this technology in your phone?
Technology limitations and possible improvements
I already mentioned the lack of depth adjustments to the image. Because we use a single camera, it’s hard to know the distance of the viewpoint. Using a higher resolution webcam might make guestimating smoother. Adding a second camera and calibrating them, it is possible to extract that information from the scene and adjust the viewpoint and virtual camera lens width.
Talking about stereo image, we humans naturally have two eyes, see stereo, and sense depth. It’s hard to fool your mind into thinking this 2D image is 3D unless you cover one eye 😀
That said, 3D video is here and you’ve probably experienced it. It is possible to produce a 3D video for the 3D TVs by rendering the 3D scene twice with a slight tilt of the viewpoint. To go even further, instead of detecting just face, it’s possible to detect eyes and use their individual locations in the stereo image.
That would bring your gaming experience to the next level, plus ducking when things are flying your way would actually make sense. 😀
What would you do with it? How could this technology help you?
Few days after Jasmina’s Sony Xperia Z charger broke, I had another unpleasant surprise. I woke up to a dead phone and no amount of charging, trying to turn it on, putting the battery in and out, helped…
As an Amazon Associate I earn from qualifying purchases.
How do I revive my phone’s dead battery?
Things to try before you jump start your battery
Turn the phone on by pressing/long-pressing the power button
Take the battery out. Press and hold the power button for at least 30s.
Try a new battery. Borrow from a friend who has the same phone.
Why this can help
First point is self explanatory. If your phone turned off because of a glitch or something, this turns it back on, voila!
Second point might seem a bit weird to most. You obviously won’t turn on the phone while it has no power supply. Good thing this isn’t the point here. This step discharges residue charge from your phone’s electronic components. This also works for laptops and I used it to revive quite a few of them inspiring statements like “It didn’t work before, I swear!”. I know, I believe you 🙂
Third point, tried after second, makes sure it’s a problem with battery and not the phone. You can also try your battery in your friend’s phone. I didn’t have a spare battery to try with, so I used the cable described later in article and connected the red and black directly to the appropriate pins inside of the phone. My Samsung S3 turned right on, so that ruled out problems with the phone itself. If you’re in the similar situation be careful, the right pins will depend on the phone you have. My battery’s plus and minus pads were marked so I just followed and saw witch pins in the phone they touch. You can follow the same idea to figure out where your phone’s plus and minus pins are.
Why your battery plays dead
I’m talking about lithium-ion battery (sometimes called Li-ion battery or LIB), which are most common batteries in phones these days.
They can go unstable and “boom” if they get too discharged. To prevent that doodoo, engineers put electronics in place with some smarts in them. If the battery voltage drops below a certain point, to prevent further discharge, they disconnect the cells from the battery pads completely. Thumbs up for safety!
So why can’t you charge it?
Your phone has a battery charger or else you’d have to take your battery out every time to charge it. Convenient! In order for that charger to work, it needs electricity. It gets its electricity from the battery, which currently puts out 0V.
The Hack (this is what you’re here for)
All you need is a spare USB cable and a charger (or a laptop, play station, smart TV…).
Tools (recommended, yet optional)
While you can probably do with tools you find in you kitchen, some of these tools will help a lot if you have access to them. If you don’t, they are very general tools and you can find many other uses once you get them.
although you could cut some wires with a utility knife, I wouldn’t recommend it
you can use it to skin the wires by applying little force to cut through insulation and then pulling it off with your fingers. Threads in the black and red wire are often very thin to make the cable more flexible. Unfortunately, this also makes them very easy to cut with a utility knife once they are exposed, be careful.
Checking the battery. You can test your battery voltage and polarity and get the idea if battery is the culprit. If the voltage is a lot bellow what you expect (usually 5V), it probably is and this hack might help.
Checking wire polarity. When you cut and skin the wire, their colors usually indicate what they are used for, like in the picture below. Sometimes that’s not the case. You can use a multimeter to detect plus and minus polarity of the wires. To do that, plug in the cut cable into the power supply (be careful that your bare wires don’t touch), put the multimeter in a voltage measuring setting and try different combinations until you get a positive reading around 5 volts. Wire that’s on COM of multimeter will be minus and the other one will be plus.
Depending on your access to USB charging ports, you might not need this, however, if you’re planning on using some electronic device such as laptop or TV as a power source, keep in mind you might cause damage to that device if you do something wrong.
It’s also a nice to have even if everything goes well and it goes along nicely with the charging cable from the previous point.
Ready to get your hands dirty?
Cut the USB cable.
Skin 5mm (quarter of an inch) of red and black wires.
Twist the exposed end of each wire.
Plug the cable into charger.
Place the black wire (-) to the minus of the battery.
Place the red wire (+) to the plus of the battery.
Hold in place manually for a couple of minutes.
Put the battery back into the phone.
Plug the phone into the charger.
Your phone should soon start charging. If it doesn’t, try again, make step 7 longer.
Why this works
USB gives 5V which is above the normal Li-ion battery voltage (3.7V or 4.2V). This charges the battery enough to be briefly above the cut-off voltage. That’s just enough to start your phone’s charger and allow it to continue charging the battery until full.
I’ve been using and charging my phone normally since then. I also don’t allow my phone to die from empty battery. Lesson learned 🙂
If all else fails…
…and you are really 100% sure the problem is the battery and not the phone or anything else, you may need to, sigh, get a replacement battery.
Questions from comments
Could a universal charger work instead?
Yes, if it provides 5V of the correct polarity on the battery pads, as explained in “Why this works” section.
I’m struggling to get results, what else can I do?
You can trying boosting it, as described in step 7 of “The Hack” section, longer. Try couple of minutes or more, depending on the state of the battery, or even to a full charge. It needs enough juice to be able to take care of its charging process when you use original charger. You can also try upping the voltage/current a bit.
What about in-built batteries?
How can I revive built-in batteries? Devices with built-in batteries don’t normally give direct access to battery (why would they) and you access the battery only through the charging system you’re trying to circumvent.
Solution for that would be to open the device to get to the battery. There’s a whole new set of things to watch out there, it depends on the individual device and it’s much riskier since you can break the device. Good news is the same principle applies once you have the battery in your hands.
If your device is bricked and you can’t take it to the shop, you might as well have a little fun with it and have a chance of fixing it, but be careful and don’t do anything you’re not comfortable with.
What if the wires are not the same colors as here in the picture when I cut the cord?
As mentioned in the Tools section, the best way would be to use a multimeter to determine polarity (to find out where’s the plus and where’s the minus.) If you don’t have a multimeter, you could use an LED with a resistor in series to determine polarity.
Can the mobile battery explode while jumping it?
It’s highly unlikely, but I can’t rule it out. Likelihood goes up if battery is physically damaged. Also, remember Galaxy Note 7? So, sure, but I wouldn’t bet on it.
What’s the difference between this reviving phone battery by jump-starting it, and charging it normally?
The goal here is not to replace your phone charger (although you could). The difference is bypassing phone’s charging system which refuses to charge the battery if it’s bellow a certain threshold. Charging it by wires will briefly boost the voltage (revive the battery) which will enable phone to detect it and continue charging it to full. You don’t really need to charge the battery all the way on the wires, merely boost it enough to get over the voltage that allows the phone to detect it and charge it.
Have you ever tried this? Do you have any other ways to revive dead batteries?
Have you ever found some cool looking peace just lying around the hall? What did you do with it?
I’ve found a chest with my name on it, just lingering in the corner of the hall, in a house half way across the world. Curious, as I usually get, but cautious, as I also usually get, I cleared the furniture, put the chest in the middle and set the camera on timer.
I set down against the wall, contemplating, mentally preparing myself for what can be in it. Some childhood nightmare, hidden away to allow happy memories to thrive? Hidden treasure to enable me happy life once I become of age and venture to the wonderful new world? Something must have struck a chord…
The chest lid sprang open!
A flash of bright green light illuminated the hall. I jumped from my seat and flew toward the chest to close it: “I’m not ready yet!”
My day started with Jasmina’s voice. Normally that makes me smile. With my face still in the pillow, and blanket over my head, I was trying to ignore the words:
“Zvonimir, I broke my phone charger!”
Three minutes later, I was on my laptop searching “Sony Xperia Z charging port replacement”. Relatively easy fix, requiring a bit of soldering. With all my tools left in Zagreb, next search was “Ottawa mobile phone repair”. Few phone calls later, we were pressing PRESTO cards in the bus, getting lost on the way to down-town Ottawa.
First shop was willing to fix it for $100, second told it should be about $50 but they need to see the phone first. Upon seeing the phone, they gave up since they don’t want to solder things, but told us we can order magnetic charger for $40 online.
Few hours later, back at my laptop, searching for “wireless charging Sony Xperia Z”.
One type of chargers has a dock with two pins in it. You place the phone in the dock, magnets lock the phone in place, pins touch the pads on the phone, and it starts charging.
The other type has a USB cable on one side and pins and a magnet on the other side.
So it’s really simple, getting voltage (5V) on the phone’s charging pads. Let’s finish this tutorial style:
Cut the USB cable.
Skin 5mm of red and black wires.
Twist the exposed end of each wire.
Plug in the USB cable into charger.
Place red wire on the top pad.
Place black wire on the bottom pad.
Notice that the orange charge indication LED on the top-right of the phone is on 🙂
Do you have some no-budget or low-budget hacks of your own?
This post answers the question “What camera do you use?“, plus much more. It’s been a long time coming because, frankly, I don’t use that much equipment, and equipment I currently use is not that high end. This is good news for you if you’re just starting out cause it means you don’t have to break the bank on equipment and still get results like mine and better.
As an Amazon Associate I earn from qualifying purchases. This means you’ll find links throughout this article that ease you finding products I’m talking about. If you buy things through these links, I might make a small percentage of that without costing you anything extra. I hope this is fine with you, these are here to help you ease your search.
I started with my dad’s compact Sony DSC something and experimenting with manual mode and long exposure. That lasted one summer but dad was hesitant to let me use his camera. So, long story short, getting my own camera.
After a long and tedious search and comparison, based on my desired photography genre and budget I had, I decided on Nikon D5100.
So far, D5100 has proved to be an excellent camera with sensor size of 23.6 x 15.6 mm, 16.2 effective megapixels, 14 bit raw image, ISO 100 to 6400 (up to 25600 equivalent) and a lot of other goodies. There are some deficiencies I’m overcoming with accessories and tricks. Like triggering a remote speedlight.
I bought the camera with the kit lens, Nikkor 18-55mm f/3.5-5.6 AF-S. It’s a great general purpose lens for the money. I like using 18mm side at f11 to f22 on tripod for landscapes and 55mm side at f5.6 for food and people photos. There are many exceptions to these rules of thumb but this describes the possible uses quite well.
Nikkor 18-300mm would be another awesome (better) general purpose lens, though more expensive. I’ve also missed a wide-angle lens often when shooting interesting places, so Nikkor 10-24mm would be awesome to help as well. I do a lot of food photography and sometimes people photos so 50mm prime lens you can open wide to get a shallow depth of field is also a nice thing to have.
I’ve put everything that isn’t camera or lens in this section.
Nikon SB700 is a great addition to the arsenal for food photography and people photography. I even used it to light-paint some landscapes and when I was shooting club scenes (night-life). It’s possible to remote trigger it with on-board flash on D5100, even though the camera itself doesn’t have those remote triggering features. I’ll explain how to in some later post and link it here. Remind me if I don’t 😉
OnePlus 5 is currently my main phone and a secondary camera. I use it often when I don’t have my Nikon with me. It has pretty good camera on it, but the low light performance could be a lot better. I’ve also used it to remote control D5100 instead of a remote shutter controller. I’ll explain that too.
Nexus 7 is a tablet I keep handy when going for a shoot, or often when I’m making videos with the Nikon. It’s possible to pair it wirelessly with OnePlus 5 which is connected to camera using USB OTG cable and then have live preview and camera controls on it. To be fair, 2012 version gets super slow and frustrating sometimes since the Android 5.0 update. 2013 is said to have that resolved. If I wait it out, it starts working snappier again. Also, reboot works as a fix for a while. Advice from the community is get something with more RAM.
Rechargeable AA batteries for the speedlight is a must, 2 packs of 4 preferably, if not more. Chargers for the AA batteries and camera battery.
I have a $9 tripod I borrowed from my dad and never returned it. He doesn’t use it anyway. Hopefully not because he can’t get to it 🙂
I should get a sturdy tripod with a ball head and carbon legs. That would help a lot with positioning the camera.
I also have a small Manfrotto tripod I got as a present and use it for those cool, low angle shots, and a lot of other times for placing it on furniture, walls and similar when shooting video or food photos.
HP ProBook 4540s with Intel i7 CPU and 8 GiB of RAM and 750 GB HDD. Also an external, 1TB ADATA USB 3.0 HDD for backup. I use it not only for editing but also for software development, web development and mobile apps development. It’s my main tool for work when I’m not shooting. Running Linux Manjaro and it’s super snappy.
All this stuff has to fit somewhere so it can be carried around on shoots and trips. I was lucky enough to get Vanguard Up-Rise 43 sling bag as a gift. Sling is good because the camera is easily accessible and it takes only a few seconds to get it out and shoot if you pre-set the camera settings. It’s got a lot of handy pockets and compartments, including a rain cover, who’s usefulness caught me by surprise when I needed it most.
With all this in it, it can get a little heavy on the side on long walks because of uneven weight distribution. That’s something I haven’t anticipated, but I do walk a lot. For walks like hour or two should be fine. For anything longer, I’d go for a normal backpack with camera out and on the strap if you are sight-seeing. That’s probably what I’ll go for next.
Now you know.
My bag is still not full and there are some things on my wish-list. If you are starting out, did this encourage you to get out and start shooting even with your smartphone?
What’s in your bag? What’s the basic you cannot go without?
Sometimes I take on bigger projects than anyone thinks I can handle.
Sometimes I take on projects I think are bigger than I can handle but everyone else thinks it’s a perfect fit for me. The main difference between those seems to be the amount of information people have. Or they are just cheering me up 🙂
To which I say “Thank you, you are awesome!”
Most of the times I can just take in extra amount of elbow grease and do all the work myself, but lately I’m thinking about a project that makes me feel like in the photo above.
It’s a matter of perception, really. From Earth’s and observer’s perspective, it’s just a kid (even if a very capable one) doing a handstand on a beach. But from another perspective, I’m holding the Earth.
The older wiser I get, I realise that any quest big enough, will require a team effort.
When you’re starting out (some 10 or so years ago for me), it’s easy to fool yourself that you’ll accomplish anything by just putting more time into a project. And projects grow, from a couple hours long to couple months long. Some you don’t even finish before outgrowing them. Progress.
Natural, exponential, growth takes you to estimates of years or decades from start to finish.
That’s where I found myself a couple of years ago. With multiple project ideas to take on, not knowing which one would succeed. So I tried a couple of things, even being in a startup incubator, without going all in, to test and learn. Also a couple I went all in, which turned out to be great lessons. And also great pains. All while helping other people with their projects in different stages, effectively proving what I learnt was working. That’s something I hope to continue doing.
Last couple of years I have been hanging with Jasmina, doing a lot of food related stuff, while photographing and programming on the side. Last few months to almost a year, this culminated. Not the way you’d expect, she doesn’t have (my) ring on her finger.
I’ve been practising what James Altucher would call “idea sex” (again, not what you’d expect). That ended up with a lovely baby in a form of Food + Tech + A-Problem-We-Need-Solved project.
I’ve been testing and refining the idea for months. Going from what needs to be done, through what next, to how to make money with it, and back. I’ve talked to people I trust and gathered their ideas. Filled in the gaps and gained different perspectives and wants.
That resulted in lists and sketches, pseudocodes and table designs. I was ready to start working on the minimum viable product. I didn’t take me too long to realize how different this is from any other project I’ve taken on so far. How much bigger it is.
I was supposed to make a wireless underwater camera for my dad when he goes fishing. Things went south and he most likely won’t be going fishing any time soon. Instead, it would be nice if he could just look around, see what’s going on without needing to move much (that’s what you do when you’re bed-ridden).
So I hacked my brother’s old fork lift toy. Pulled everything out of it. De-soldered wires from the controller. Added a Raspberry Pi, some transistors, relays and other electronics.
What it does
Basically, you turn it on, connect to it with your phone, tablet, computer, laptop or smart TV and then control it with your keyboard, while seeing a live feed from the camera in front of you.
Keyboards are for computers, so I made an Android app that gives you even more freedom. Now you can just touch the screen where you want it to go and it goes there while you hold down. All while displaying the video feed.
As if that wasn’t enough, your mobile device’s sensors are put to good use, so if activated, you can just tilt the device in which ever direction you want buggy to go.
Like a remote presence thingy. I might throw audio in as well.
I know it’s hackish and ugly for now (though it’s kinda beautiful :)) but I’ll fool-proof it next time I get to play with it.
Today, Cannes. Movie stars and yachts… and fancy cars… and two awesome people you already know 🙂
Super hot days continued, but luckily, you can drink from the fountains and buy a selfie-stick. Really, you can buy a selfie-stick anywhere. There’s an army of people, constantly on the run from the police, covertly selling selfie-sticks from giant bags aka portable selling booths. Gotta admire their dedication. Thinks about making a movie about it.
We met Pinocchio, did some shopping, looked around quite a bit, didn’t get any selfie sticks. Cannes is nice, but (maybe we didn’t see the real Cannes) it’s not Nice, Nice is nicer. See what I did there? I might park my yacht for a few days here, though 😉
Hot as it was, leaving Cannes for a swim in the pool seemed like a good idea.
We still had Valbonnes to visit, Cheese Guys to meet, and cheeses to taste. Only one Valbonne and one Cheese Guy, though, but many cheeses!
Cheeses called for drinks called for snacks called for friends called for food… and you got yourself an aperó (gotta love French people) 😀
Add in a photo session, music, dancing and you get a super fun evening.
Now that we’ve got that off the table, it’s night already, time to get some sleep, long drive awaits tomorrow…
Fast forward 8 hours and it’s another beautiful French morning. Last of the trip. Quick swim and packing. Took us way longer than planned cause we didn’t feel like leaving, and Lisa didn’t seem to let us leave (“Just this one more thing”).
We’re still stopping in Italy in Lago di Garda, so the trip is not really over yet.
Motor roaring, wheels turning, lake Garda, here we come!
Turns out, lake Garda is so huge it feels like a sea, with cities in Italian style and lots of boats around, I had to taste the water to convince myself it’s not salty! It fit right in between pizza and ice-cream 😀
It was hot and damp like a huge lake on a really hot day (duh). We still had a lot to tumble so we finished our dessert and hit the road.
The rest of the drive was pretty uneventful if we don’t count beautiful evening sky with great clouds, and traffic jam across the whole Slovenia.
Lots of tunnels and hills. Sign said we entered France. Yaaay! I could feel our “getting lost powers” wearing off. We were shortly in Nice. Slowing down from the highway onto the coastal road and city traffic with rolled down windows, listening to music from some local radio, taking in the atmosphere and laid back approach this warm pre-summer weather demanded was just like you’d imagine it 🙂
Sightseeing, posing, monkeying around, then food! 😀
With photos worth thousand words each, this might be my longest post ever but why describe it when I can show it to you? 🙂
Nice is super nice (so it’s exactly how it sounds) and I’d like to get back here and spend at least a few days to explore a bit more and experience more of what Nice has to offer, preferably with someone who knows the place.
Time wanted us to leave for Valbonne, so we carefully entered hot sauna, also known as our car and hit the road again. Travelling in our mobile sauna, following Lisa’s pirate-map-like instructions, at the end, 60 steps to the left of the big tree, we found paradise on Earth in form of a pool.
Sorry, yes, we first met Lisa, who was even more awesome in person. She showed us where we’ll be staying while we’re here, and then seated us by the pool and brought chips and cocktails…
She was super easy going, simple and easy to talk to. So we did a lot of that. Discussing life and some projects, current and future. Like cocktail we’ll be designing and shooting tomorrow and her upcoming “Name That Cheese” book. Time went by fast and we ate the pizza she made for us, before I got to pick up my camera. Some fast eaters… Looks at Jasmina.