When I Think Of Croatia

I think of sea. A peaceful summer morning before people crawl out of their beds. Sound of seagulls in the distance blending in with fade fog raising above the glass-like surface. Early rays of woken-up sun, reminding you it’s gonna be a hot day.

I remember early mornings, lugging sand with my dad, on a small cart, along a narrow, curvy path from far away parking lot, that was the closest place a truck could deliver it, to build a concrete deck so we wouldn’t have to sit in the dirt. That transitioned into being a house and took 12 full summers to build.

And a bumblebee, always passing by just around our second round. He would go his usual round circling the flowers in the same order and then land on my arm. He would stick around long enough to say “Hi!” and “What’s up, my favorite giant?”, and move along to the next patch of flowers.

“It’s all but a memory, never to be repeated again.”, I realize as I sit in our modern, Markham, Ontario, apartment, equipped with gadgets I built to (semi-)automate it. Life is now startups, Fortune 500s, electric cars, Mars shots, and building cool things out of nothing.

Croatia was never the things I remember about it. I’m in touch with everyone who wanted to stay in touch with me. It’s not always easy, but we make it work.

I remember pushing through the bushes with my brother and another friend. “Let’s get to the other side of the island in the straightest line possible”, I said, “it may took as a day but it’s gonna be super interesting”. Around lunchtime, we found ourselves on the top of the island, with a bird-eye view of a tourist-filled sandy beach. Boats floating in mid-air like dreamland, only anchors holding them down from escaping the earth. Standing on a patch of rocks, in the sea of thick green bushes, holding a piece of bread, pancetta and tomato, having lunch with a view.

This year seems exceptionally hard. Everybody, and their brother, is visiting Croatia. I’d like to think we did a great job promoting it. They ask me for tips. “How do I get most of my trip?” “Where should I visit?” “What is ______ like?”
And I answer them, provide them insights, help them have a fun, enjoyable trip and a great vacation. All the while knowing they are missing the point. They are visiting places I’ve never been to, eating food in restaurants I wasn’t able to afford. Croatia is party with a view.

It’s a figment of my imagination, the .1% time, serenity within insanity, never to repeat again, but possible to imitate. Maybe.

So if you visit Croatia this summer, go on a walk before the sun comes up and humans crawl out, along the rocky shore where no-one usually goes, after a non-drunk night, and wait for the sunrise. Look at the glass-like sea. See the mist raising close to the surface. Hear the seagulls in the distance and crickets on the top of the hill. Get drunk on Croatia I remember. And tell me I’m crazy.

Royal Alexandra Interprovincial Bridge

Royal Alexandra Interprovincial Bridge

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…

Virtual Reality With Webcam

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:

  1. Size of the scene you’re viewing
  2. Angle you’re viewing the scene from
  3. Distance from the scene

Those things depend on:

  1. Size of the screen
  2. Distance from the screen
  3. Distance from the camera
  4. Your camera lens width
  5. 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?

How To Jump-Start Phone Battery (No-Budget Hack)

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…

Things to try before you jump start your battery

  1. Turn the phone on by pressing/long-pressing the power button
  2. Take the battery out. Press and hold the power button for at least 30s.
  3. Try a new battery. Borrow from a friend who has the same phone.

Why this can help

Fist 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…).

  1. Cut the USB cable.
  2. Skin 5mm of red and black wires.USB cable wires
  3. Twist the exposed end of each wire.
  4. Plug the cable into charger.
  5. Place the black wire (-) to the minus of the battery.
  6. Place the red wire (+) to the plus of the battery.
  7. Hold in place manually for a couple of minutes.
  8. Put the battery back into the phone.
  9. Plug the phone into the charger.

Your phone should soon start charging. If it doesn’t, try again, make step 7 longer.

Jump starting a phone battery

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 πŸ™‚

 

Found A Treasure Chest!

Found a Treasure Chest

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!”

Camera timer went off…

What do you think happened next?

Sony Xperia Z – No-Budget Charging Hack

Head in pillowMy 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.

_DSC2271

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”._DSC2270

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:

USB cable wires

  1. Cut the USB cable.
  2. Skin 5mm of red and black wires.
  3. Twist the exposed end of each wire.
  4. Plug in the USB cable into charger.
  5. Place red wire on the top pad.
  6. Place black wire on the bottom pad.
  7. Enjoy πŸ™‚

 

Charging Sony Xperia Z

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?

What’s In My Bag

What's In My Bag

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.

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.

Camera

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.

Lens

The Perfect EndingI 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.Apero Food 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. Β 

Lens wish-list

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.

Accessories

I’ve put everything that isn’t camera or lens in this section.

Speedlight

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 πŸ˜‰

Gadgets

Samsung S3 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 controler. 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 Samsung S3 which is connected to camera using USB OTG cable and then have live preview and camera controls on it. I also use it to edit photos taken with S3 since Snapseed is currently stalling when processing photos on S3. No idea why.
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.

Tripod

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.


Laptop

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 Mageia and it’s super snappy.

Bag

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.

Conclusion

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?

Holding The Earth

Holding The Earth

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 need a team.

 

Photo: Jasmina Brozović, Edit: Zvonimir Fras

RBuggy – Remote Presence Device

Things I do when I’m not around…

RBuggy

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.

French Riviera Adventure – France Sweet France

You’d imagine we had a good night sleep after a great dinner and an all in all awesome day in France and now were eager to see what else France has to offer, but…

No buts really, you’d be right. πŸ˜€

Today, Cannes. Movie stars and yachts… and fancy cars… and two awesome people you already know πŸ™‚Drinking Water In Cannes

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.

Pool Jump 2

Refreshingly Icy Peach Prosecco Spritzer

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.

This glass here is the drink of the evening, and of the summer 2015.Β  Get yourself one over at Lisa’s where she tells you how to make one πŸ˜‰

Cherry Tomatos And Mozarella With Fresh Basil

Apero Food

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!

Lago Di Garda

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.Traffic Jam

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.

Home sweet home?