Trending February 2024 # Use The Raspberry Pi As A Diy Surveillance Camera # Suggested March 2024 # Top 9 Popular

You are reading the article Use The Raspberry Pi As A Diy Surveillance Camera updated in February 2024 on the website Eastwest.edu.vn. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested March 2024 Use The Raspberry Pi As A Diy Surveillance Camera

Although people have been toying with USB webcams on the Raspberry Pi for some time now, the release of the official camera module has reinvigorated interest in video related projects.

The official Raspberry Pi camera module is a Full HD camera that plugs into the Raspberry Pi via the Camera Serial Interface (next to the Ethernet port) on the device. The sensor on the camera is a 5MP with fixed focus lens. It can shoot still images with a maximum resolution of 2592×1944 as well as Full HD 1080p video @ 30 FPS and 720p video @ 60 FPS.

And you get all this in a module that’s only 25x20x9mm in size and weighs just 9 grams! This makes it ideal for projects that require a small steady camera, like surveillance.

Enable camera support

Before you attach the camera, locate the CSI and then pull the tab gently up. Now push the camera module’s ribbon cable into the slot, with the silver contacts on the cable facing away from the Ethernet port. Remember not to push the cable in very deep. Now hold it in place with one hand and push the CSI tab back down with the other hand to lock the camera’s ribbon. Checkout the video below for visual instructions

With the hardware in place, it’s now time to setup the software. Assuming you are using the Raspbian distro on the Raspberry Pi, boot the distro and log in.

Before enabling the camera, make sure you are running the latest version of the Raspberry Pi firmware with these commands:

sudo

apt-get update

sudo

apt-get upgrade

Depending on how outdated your Rasbian installation is, and the speed of your Internet connection, these commands could take over half an hour to complete.

Once it’s completed, launch the “raspi-config” script helps you to configure your Pi:

Once you’ve restarted the Raspberry Pi, you can now use the two command-line utilities, raspistill and raspivid to capture still images and videos respectively. Both tools have extensive options and are well documented.

Capture motion

You can use the popular command-line Motion software to detect motion and capture video. Another option is to use the light-weight motion detection Python script written by Raspberry Pi community members.

The script relies on the Python Imaging Library which is a library for analyzing and manipulating images, so make sure you have it installed:

sudo

apt-get install

python-imaging-tk

Now grab the script and make it executable:

chmod

+x chúng tôi script is designed to store images in a directory named “picam” under your home directory, so make sure to create it before executing the script:

mkdir

~

/

picam

You’re now all set. Now run the script:

.

/

picam.py

The script will turn on the red LED on the camera and start taking low-resolution images. It’ll then compare them and look for movement by comparing the pixels in the images. If it detects changes, the script will capture a higher-resolution image.

The script is very efficient and will automatically remove the low-res images it captures for comparison and only store the high-res images that have captured the motion. These images are saved in the ~/picam folder.

You’ll need to adjust some aspects of the script to make sure it works for you. For example, as per the default configuration, the script will even detect minute changes caused by wind.

To edit the script, open it in a text editor. The script is well documented so you shouldn’t have any issues in editing it. If you are using the camera to detect change in a windy area, set the “threshold” variable to a higher value than the default.

Start at boot

To run the script at boot, you’ll need to an init script that runs the “picam.py” script and kills it before shutting down the Raspberry Pi.

Again, the community has done all the leg work for you. Just grab their script:

sudo

mv

~

/

picam_init

/

etc

/

init.d

/

picam

sudo

chmod

+x

/

etc

/

init.d

/

picam

Lastly, make the boot system aware of this script:

sudo

update-rc.d picam defaults

That’s it! The script will now start and shutdown along with the Raspberry Pi. You can also manually control it like any other daemon. For example /etc/init.d/picam stop will stop the script and /etc/init.d/picam start will start it.

Use Motion

We are big fans of Motion here at MTE and have previously featured an extensive tutorial on the utility. Motion offers several features over the Python script, such as the ability to monitor it from the local network.

If you decide to use the motion app instead of the Python script, remember that the standard motion packages doesn’t yet work with the Raspberry Pi camera. You’ll instead have to use a special binary, called “motion-mmal”, specially created for the Raspberry Pi by a community member.

To begin with, you’ll have to fetch a lot of dependencies:

sudo

apt-get install

-y

libjpeg62 libjpeg62-dev libavformat53 libavformat-dev libavcodec53 libavcodec-dev libavutil51 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev

Once they are all installed, download the modified version of motion and extract it:

tar

-zxvf

chúng tôi will extract the motion app as well as a configuration file. You can now run the extracted motion app along with its configuration file using:

.

/

motion

-n

-c

motion-mmalcam.conf

While motion is running, you can watch the streaming video on another computer in the network over the 8081 port. So assuming the IP address of your Raspberry Pi running motion is 192.168.3.100, you can watch the video stream by entering the address 192.168.3.100:8081 on another computer in your network.

Again, just like the Python script, it’ll do you a lot of good to spend some time reading through the “motion-mmalcam.conf” configuration file and tweak it as per your environment. Also remember to take a look at our Motion guide to understand the various configuration parameters in this file.

Image credit: zigazou76

Mayank Sharma

Mayank Sharma has been writing on Linux for over a decade and is a regular contributor to Linux Format magazine.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

You're reading Use The Raspberry Pi As A Diy Surveillance Camera

Home Automation: Inside A Diy Smart House

Imagine a house where your appliances run themselves, where lights adjust without you having to get up, and where your snail-mailbox would send you a message when you get a package. It sounds like something out of The Jetsons, but thanks to some nifty home-automation technology, this is all possible today. (Talk about living in the future!)

Home automation (also known as “smart home”) technology is the integration of electrical devices and one or more computer. These systems are often controlled remotely–you can use a smartphone or tablet, for instance. Most people use home automation for either added comfort or security, or to be more energy efficient.

Numerous companies offer to automate your home for a (sometimes hefty) fee. Home automation doesn’t have to cost thousands to install, though: With the right equipment and a little know-how, you too can assemble your very own home automation system.

Grad School Digital Imaging student Sam Cox from the United Kingdom has a great example of how beneficial home automating can be. He began automating his home from scratch a year ago to increase his home’s security. Since, he has found himself adding more features to his system for both convenience and energy savings.

“On the security front I wanted something cheap, flexible and scalable, all without paying a monthly fee. Leaving electrical equipment on standby wastes an enormous amount of energy, so having your home automatically turn these appliances off when you go sleep and back on again when you wake up ultimately saves you money.”

At present, his home-automation system can perform a multitude of tasks. His custom-built security alarm system runs a set of IP webcams installed throught the house. The alarm can project audible warnings to the intruder, as well as record footage and email a still image.

Sam built other convenient home improvements, such as a system that wakes you up, gives you weather information for the day ahead, and alerts you of incoming email. In addition, his system lets him stream music into any room, turn on appliances, and dim lights. Sam used his old Mac Mini as a command system for his chúng tôi Mac Mini controls all of the home automation systems, andSam can access it from anywhere in the house using his iPhone and TouchaTag, an off-the-shelf Web-based RFID system.

“RFID is one area that I’ve worked hard on. It works in such a way that my home knows who’s in and can adjust any settings such as the type of music being played or optimum light level accordingly.”

Using apps such as iAutom8, Sam can use his iPhone to control switches from anywhere in the house, as well as stream live footage from the webcams.

Sam adds: “Many home automation systems communicate through X10, this one’s slightly different. The system I use is called HomeEasy, which is a wireless (433MHz) interface. Singles are generated from an RFXCom Ethernet transmitter. Using Ethernet means that requests like turning your washing machine on can be sent from anywhere in the world.”

One of the biggest challenges of setting up home automation is coding all the appliances to work together, and Sam’s project is no different. Sam learned how to code everything as he went along, using other people’s AppleScript for similar projects, then adjusting them accordingly.

“Coding the morning wakeup alarm was the most complex as this basically wakes up the house–including me–with the current time and date, weather forecast, new emails, and leaving me with the radio streaming into any rooms I’m in.”

Although automating his house has cost Sam around $1200 so far, the end result has been worth the time and money. In Sam’s case, his house won’t let him forget to reply an email or a calendar event, or let him burn his dinner. He also has the invaluable piece of mind from an apt security system.

Of course, there are also shortcomings. The Mac Mini can be quite slow due to its age. The IP webcams are also sometimes too sensitive, so even a change in natural light can trigger a false alarm.

Sam points out that in the near future he’ll be working on voice recognition, curtains that can open and close automatically, and improved “text-to-speech” functions.

“Just mess around and have fun.”

Like this? You might also enjoy…

Get your GeekTech on:

Twitter

Facebook

RSS

Tip us off

Apple Patent Shows Landscape Ipad Use As The New Normal, But With A Notch

Landscape iPad use seems to be gradually emerging as the new normal. While Apple persists in making them with the logo oriented for portrait use, we’ve recently seen signs that the company has now woken up to the reality that the devices are more often used horizontally.

The 2023 Smart Keyboard Folio, for example, finally swaps a vertical Apple logo for a horizontal one. The upcoming Magic Keyboard likewise has the logo in landscape format …

Patently Apple spotted that an Apple patent published today shows the front-facing camera and Face ID sensors moved to the horizontal side.

Today the U.S. Patent and Trademark Office officially published a granted patent for Apple that illustrates an iPad with its TrueDepth camera set in landscape mode. This would be more natural for using Face ID on an iPad Pro in Notebook mode.

While Apple’s iPhone X was first to receive the new TrueDepth camera with a notch, Apple’s latest granted patent illustrates Apple’s plan to add the TrueDepth camera to an iPad and more particularly, to an iPad in landscape mode as noted in patent figure 6 below.

As someone who almost always uses my iPad in landscape mode, it’s long struck me as bizarre that Apple has continued to orient the front-facing camera and logo for portrait use even as it increasingly positions the iPad and keyboard as ‘a computer.’

Moving the Face ID sensor makes particular sense, as it’s very easy to accidentally cover the camera when picking up the iPad in landscape orientation.

One less-welcome element seen in the patent is a notch for the camera. Since there is no difference in the bezel size on long and short sides of current-generation iPad Pros, that would seem entirely unnecessary.

However, the actual text of the patent does say that a notch is just one option, and that the electronics may equally be hidden in the bezels.

The display may have an active area that is bordered by an inactive area. The active area contains pixels and displays images. The inactive area does not contain any pixels and does not display images.

The inactive area may have a layer of black ink or other masking material to block internal components from view. The active area may have an opening that contains an isolated inactive area region or may contain a notch or other recess into which a portion of the inactive area protrudes. An electrical component such as a speaker, camera, light-emitting diode, light sensor, proximity sensor, strain gauge, magnetic sensor, pressure sensor, force sensor, temperature sensor, or other sensor, button, touch-sensitive component, microphone or other audio component, or other electrical device that produces output and/or gathers input, may be mounted in a portion of the inactive area that protrudes into the recess or that is located in the opening of the active area.

The inactive area may have a main region such as a rectangular region that displays images and may have one or more extended regions that extend from the main region. The extended regions may, for example, include first and second elongated rectangular extended regions that lie between the main rectangular region and the inactive border. The first and second extended regions may be located on opposing sides of a camera or other electrical component in a protruding portion or island-shaped portion of the inactive region. Icons or other information may be displayed on a black background in the extended regions, giving the display a continuous unbroken appearance.

FTC: We use income earning auto affiliate links. More.

How To Use Your Android Tablet As A Secondary Display

If you own an Android tablet, you probably get most of your real work done on a desktop or laptop PC, and use your tablet primarily for casual Web browsing and content consumption. But you can use your tablet to improve your productivity, too. Since a tablet is essentially a portable touchscreen, why not repurpose it during work hours as a secondary display?

For the purposes of this guide, I’m going to focus on how to set up the least-expensive screen-extension application we could find; it’s called Redfly ScreenSlider, and at of the time of this writing it was available for $1. (We tried to find a suitable free alternative, but had no luck. If you can find a better free alternative, share it with other readers in the Comments section below.) Alternatives such as Air Display or iDisplay are available for about $3 to $5, so even if you require a different app for your particular setup, it shouldn’t break the bank.

What You Need

To use your Android tablet as a secondary PC display, you need a few things aside from the tablet and PC apps. First, you need a compatible tablet running Android 3.01 or newer (or a smartphone running Android 2.2 or newer) and Windows XP (32-bit) or Windows 7 (32 or 64-bit). For demonstration purposes we’re using an app that works over a Wi-Fi connection, so the tablet and PC must be connected to the same network and reside on the same subnet.

Once you have downloaded the necessary apps, and you’re sure that the tablet and PC are connected to the same network, the installation and configuration processes are pretty straightforward. Keep in mind that although I’m focusing on Android, Windows, and ScreenSlider here, the processes are very similar with the other apps I mentioned earlier. Typically you have to download the app to your tablet, download a companion “connector” app to your computer, pair the two devices, and then tweak a couple of settings to your liking.

Install the Tablet App, and Give Your Tablet a Name

The first step is to install the Redfly ScreenSlider app, which you can download from the Google Play store.

Install the Companion App on Your PC

With the tablet setup mostly complete, it’s time to move on to your PC. The PC connector app is available for download on the ScreenSlider website. Install the ScreenSlider companion application using the default setup options. When the procedure is done, a ScreenSlider icon will appear in the system tray.

Connect to Your Tablet

Tweak the Settings

ScreenSlider’s default configuration puts the tablet in extended desktop mode and assumes that the tablet will be located to the right of the primary display. To change those settings, launch the ScreenSlider menu on the PC and choose Settings from the menu. In the resulting window, you can change a few basic options, such as the tablet’s position or whether you want the program to launch with Windows and to check for updates. You also can set the tablet to mirror the PC’s desktop; however, for the mirror function to work properly, you cannot set the PC’s resolution higher than the resolution of the tablet’s screen.

A Few Drawbacks

Using a tablet as a secondary display is definitely convenient, and it could be a real productivity booster, but it’s not all good news. Although the quirks and incompatibilities of such a setup are different from app to app, ScreenSlider has a few worth mentioning. Windows 7 Aero effects are disabled when ScreenSlider is active and a tablet is connected. In addition, audio from your PC will not play on the tablet should you drag over a window that’s playing audio, though the sound will continue to play normally through your PC’s speakers.

In addition, the performance of such applications is highly dependent on the speed of your wireless network. On a slower or congested wireless network connection, you’ll notice lag when dragging windows to and from the tablet’s screen, and video playback will most likely drop frames. A few applications may not render properly either, but we had an issue only with Internet Explorer 9. Other browsers worked fine.

How To Use The Camera To Translate Text With Google Translate On Android

If you’re abroad, in a country where you don’t speak, or are not fluent in the language, you’re likely to run into a situation where you want to translate something. While translation dictionaries and phrasebooks can be effective, they can often be slow to use. These translation tools are especially slow when you want to translate a block of text at once, such as a sign, or a menu.

Translation apps, such as Google Translate are particularly helpful here, as you can relatively quickly type in what you want to be translated. If you’re abroad in a country that uses a different alphabet, however, it can be difficult to type as you may not know or recognize the characters very well. This is where the camera translation feature of Google Translate comes into its own.

Camera translation allows you to take pictures of text in a large and increasing variety of languages and translate it directly from the image. With many languages, you can automatically translate in real-time as you hold the phone. With some languages, you may need to take a photo and then highlight the text in the image that you want to be translated. The feature works through a combination of optical character recognition, the translation algorithm, and image processing.

To launch the camera translation feature, just tap the “Camera” icon on the left under the standard translation box.

Tip: Before switching to the camera mode, it’s helpful to ensure that your language selections are correct.

In languages where instant translations are available, this option will be selected by default. All you need to do is point the camera so that the screen shows the text you want to be translated.

Tip: For the best results you should ensure adequate lighting, that the text is correctly orientated and that the text is flat on to the phone, rather than crumpled.

The process of instant translation can be a little slow, especially on older phones. Google Translate will, however, automatically translate the text on the screen and overlay the translation on top of the original text.

If instant translation isn’t available in the language you need, you will generally be able to take a still image of the text you want to be translated with the “Scan” mode. Google translate will then highlight text it can identify with blue boxes. Highlight the text you want to be translated by swiping over it or tap “Select all” at the bottom of the screen.

Tip: If you want to enter this mode manually, tap the “Scan” icon in the bottom centre of the screen when in the instant translation mode.

The words you’ve highlighted and their translation will be displayed at the top of the screen in the white and blue boxes respectively. If your selection is more than a few words, however, this will likely extend off the edge of the screen. To see the full translation, tap the arrow on the right of the blue box to copy the text and translation back to the standard view.

Tip: If you’ve already taken a picture that includes text that you want to translate, you can import it by tapping the “Import” icon at the bottom-right of the camera translation views.

Diy Pinboard With Watercolor Swatches

Sharing is caring!

Share

Tweet

This DIY pinboard is made from affordable foam board insulation, which comes in 4′ x 8′ sheets at hardware stores. It’s so easy to make a giant pinboard with this easy to find material. Plus, it’s so lightweight and easy to hang!

You might also like this DIY dry erase calendar.

This post contains affiliate links. By purchasing an item through an affiliate link, I earn a small commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases.

I’m in the finishing stages of my craft room and needed a focal point by my art desk. After a lot of thought, I came up with this concept which is also functional.

This pinboard is filled with my watercolor swatches, which allows me see all of my colors at a glance. It should help with future watercolor purchases because now I can see which colors I already own a ton of.

Best of all, my giant pinboard also serves as a large piece of art and I’m super excited to share it.

See the finished craft room here!

How to Make a DIY Pinboard Supplies Needed:

Insulation foam board

Utility knife

Fabric

Staple gun

Nails (make sure they’re longer than the insulation board is thick)

Cut your insulation foam board to size using a utility knife.

Iron your fabric.

Lay the fabric right side down.

Place the insulation board on top of the fabric, leaving about 3″ extra to wrap around the edges.

Cut away any excess fabric.

Wrap fabric and staple, one on each edge, pulling the fabric taut.

Continue stapling around the edges, keeping the fabric tight.

Fold the fabric at the corners and staple.

Hanging the DIY Pinboard

Have someone help with this part, since it’s so big.

You don’t want to attach the pinboard with screws because the screws will twist up the fabric and ruin it.

If you plan on hanging heavier objects on the pin board, be sure to attach the pinboard to studs.

Place the pinboard in place, making sure that it’s level.

Use nails to attach the pinboard at each corner.

Add more nails in the top and bottom centers.

How to Make Watercolor Swatches Supplies Needed:

*The whole purpose of this project was for me to be able to see my watercolor paint colors at a glance, so I didn’t buy paint for this project.

If you don’t have watercolors or other paints to use, I really like this set of watercolors. It’s affordable, but the colors are vibrant and beautiful.

Cheaper paints will give you chalky results when the paint dries, so it’s worth buying nicer paints, especially if you love painting.

For reference, I used these brands: Holbein, Windsor and Newton Cotman Series, Kuretake and Daniel Smith.

Cut the watercolor into squares using a paper cutter. Since the paper was 9″ x 12″, I cut the paper into 3″ squares.

Use a waterproof pen to draw about an inch from the top of each square. (I used the popsicle stick as a straight edge so I wouldn’t have to measure.) This is to show how transparent the watercolor paint is.

Use the pen to write each watercolor paint name and brand on the paper. You can use the color codes if available. I also specified tube vs pans for brands that I have both versions.

Add water to each color. If you’re using a pan set, give it a few minutes for the water to soak in.

Use a brush to paint the color at the top at the brightest strength possible.

Add a bit of water to the brush and paint some more, dragging color from the part you already painted.

Add a bit more water to dilute the paint and fill the card.

Let the cards dry.

Use tacks to hang the watercolor swatches in place.

Watercolor Tips

If you add too much water and it pools up, it can be removed by using a dry brush to soak up the excess paint.

Mistakes can be removed with a clean paper towel.

Some watercolor brands and types are brighter than others.

If you only have a few colors, try mixing your own colors.

If your paper curls up, let it dry and sit a few heavy books on top of it for a few hours.

You might also like:

Pin for Later!

Emy is a vintage obsessed mama of 2 DIYer who loves sharing affordable solutions for common home problems. You don’t need a giant budget to create a lovely home. Read more…

Update the detailed information about Use The Raspberry Pi As A Diy Surveillance Camera on the Eastwest.edu.vn website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!