Download OpenCV Computer Vision Application Programming Cookbook 2nd Edition Robert Laganiere ebook file with all chapters
Download OpenCV Computer Vision Application Programming Cookbook 2nd Edition Robert Laganiere ebook file with all chapters
https://ebookultra.com/download/learning-opencv-2nd-edition-computer-
vision-in-c-with-the-opencv-library-adrian-kaehler/
https://ebookultra.com/download/multiple-view-geometry-in-computer-
vision-2nd-edition-richard-hartley/
https://ebookultra.com/download/multiple-view-geometry-in-computer-
vision-2nd-edition-richard-hartley-2/
https://ebookultra.com/download/fundamentals-of-computer-and-
programming-2nd-edition-e-balagurusamy/
Template Matching Techniques in Computer Vision Roberto
Brunelli
https://ebookultra.com/download/template-matching-techniques-in-
computer-vision-roberto-brunelli/
https://ebookultra.com/download/computer-vision-a-modern-approach-
david-a-forsyth/
https://ebookultra.com/download/programming-concepts-in-c-2nd-edition-
robert-burns/
https://ebookultra.com/download/a-computer-science-tapestry-exploring-
programming-and-computer-science-with-c-2nd-edition-owen-l-astrachan/
https://ebookultra.com/download/maya-programming-with-python-
cookbook-1st-edition-herbez/
OpenCV Computer Vision Application Programming
Cookbook 2nd Edition Robert Laganiere Digital Instant
Download
Author(s): Robert Laganiere
ISBN(s): 9781782161486, 1782161481
File Details: PDF, 6.79 MB
Year: 2014
Language: english
OpenCV Computer Vision Application
Programming Cookbook Second Edition
Table of Contents
OpenCV Computer Vision Application Programming Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Playing with Images
Introduction
Installing the OpenCV library
Getting ready
How to do it…
How it works…
There’s more…
Using Qt for OpenCV developments
The OpenCV developer site
See also
Loading, displaying, and saving images
Getting ready
How to do it…
How it works…
There’s more…
Clicking on images
Drawing on images
Running the example with Qt
See also
Exploring the cv::Mat data structure
How to do it…
How it works…
There’s more…
The input and output arrays
The old IplImage structure
See also
Defining regions of interest
Getting ready
How to do it…
How it works…
There’s more…
Using image masks
See also
2. Manipulating Pixels
Introduction
Accessing pixel values
Getting ready
How to do it…
How it works…
There’s more…
The cv::Mat_ template class
See also
Scanning an image with pointers
Getting ready
How to do it…
How it works…
There’s more…
Other color reduction formulas
Having input and output arguments
Efficient scanning of continuous images
Low-level pointer arithmetics
See also
Scanning an image with iterators
Getting ready
How to do it…
How it works…
There’s more…
See also
Writing efficient image-scanning loops
How to do it…
How it works…
There’s more…
See also
Scanning an image with neighbor access
Getting ready
How to do it…
How it works…
There’s more…
See also
Performing simple image arithmetic
Getting ready
How to do it…
How it works…
There’s more…
Overloaded image operators
Splitting the image channels
Remapping an image
How to do it…
How it works…
See also
3. Processing Color Images with Classes
Introduction
Using the Strategy pattern in an algorithm design
Getting ready
How to do it…
How it works…
There’s more…
Computing the distance between two color vectors
Using OpenCV functions
The functor or function object
See also
Using a Controller design pattern to communicate with processing modules
Getting ready
How to do it…
How it works…
There’s more…
The Model-View-Controller architecture
Converting color representations
Getting ready
How to do it…
How it works…
See also
Representing colors with hue, saturation, and brightness
How to do it…
How it works…
There’s more…
Using colors for detection – skin tone detection
4. Counting the Pixels with Histograms
Introduction
Computing the image histogram
Getting started
How to do it…
How it works…
There’s more…
Computing histograms of color images
See also
Applying look-up tables to modify the image appearance
How to do it…
How it works…
There’s more…
Stretching a histogram to improve the image contrast
Applying a look-up table on color images
See also
Equalizing the image histogram
How to do it…
How it works…
Backprojecting a histogram to detect specific image content
How to do it…
How it works…
There’s more…
Backprojecting color histograms
See also
Using the mean shift algorithm to find an object
How to do it…
How it works…
See also
Retrieving similar images using the histogram comparison
How to do it…
How it works…
See also
Counting pixels with integral images
How to do it…
How it works…
There’s more…
Adaptive thresholding
Visual tracking using histograms
See also
5. Transforming Images with Morphological Operations
Introduction
Eroding and dilating images using morphological filters
Getting ready
How to do it…
How it works…
There’s more…
See also
Opening and closing images using morphological filters
How to do it…
How it works…
See also
Detecting edges and corners using morphological filters
Getting ready
How to do it…
How it works…
See also
Segmenting images using watersheds
How to do it…
How it works…
There’s more…
See also
Extracting distinctive regions using MSER
How to do it…
How it works…
See also
Extracting foreground objects with the GrabCut algorithm
How to do it…
How it works…
See also
6. Filtering the Images
Introduction
Filtering images using low-pass filters
How to do it…
How it works…
There’s more…
Downsampling an image
Interpolating pixel values
See also
Filtering images using a median filter
How to do it…
How it works…
Applying directional filters to detect edges
How to do it…
How it works…
There’s more…
Gradient operators
Gaussian derivatives
See also
Computing the Laplacian of an image
How to do it…
How it works…
There’s more…
Enhancing the contrast of an image using the Laplacian
Difference of Gaussians
See also
7. Extracting Lines, Contours, and Components
Introduction
Detecting image contours with the Canny operator
How to do it…
How it works…
See also
Detecting lines in images with the Hough transform
Getting ready
How to do it…
How it works…
There’s more…
Detecting circles
See also
Fitting a line to a set of points
How to do it…
How it works…
There’s more…
Extracting the components’ contours
How to do it…
How it works…
There’s more…
Computing components’ shape descriptors
How to do it…
How it works…
There’s more…
Quadrilateral detection
8. Detecting Interest Points
Introduction
Detecting corners in an image
How to do it…
How it works…
There’s more…
Good features to track
The feature detector’s common interface
See also
Detecting features quickly
How to do it…
How it works…
There’s more…
Adapted feature detection
Grid adapted feature detection
Pyramid adapted feature detection
See also
Detecting scale-invariant features
How to do it…
How it works…
There’s more…
The SIFT feature-detection algorithm
See also
Detecting FAST features at multiple scales
How to do it…
How it works…
There’s more…
The ORB feature-detection algorithm
See also
9. Describing and Matching Interest Points
Introduction
Matching local templates
How to do it…
How it works…
There’s more…
Template matching
See also
Describing local intensity patterns
How to do it…
How it works…
There’s more…
Cross-checking matches
The ratio test
Distance thresholding
See also
Describing keypoints with binary features
How to do it…
How it works…
There’s more…
FREAK
See also
10. Estimating Projective Relations in Images
Introduction
Image formation
Calibrating a camera
How to do it…
How it works…
There’s more…
Calibration with known intrinsic parameters
Using a grid of circles for calibration
See also
Computing the fundamental matrix of an image pair
Getting ready
How to do it…
How it works…
See also
Matching images using a random sample consensus
How to do it…
How it works…
There’s more…
Refining the fundamental matrix
Refining the matches
Computing a homography between two images
Getting ready
How to do it…
How it works…
There’s more…
Detecting planar targets in an image
See also
11. Processing Video Sequences
Introduction
Reading video sequences
How to do it…
How it works…
There’s more…
See also
Processing the video frames
How to do it…
How it works…
There’s more…
Processing a sequence of images
Using a frame processor class
See also
Writing video sequences
How to do it…
How it works…
There’s more…
The codec four-character code
See also
Tracking feature points in a video
How to do it…
How it works…
See also
Extracting the foreground objects in a video
How to do it…
How it works…
There’s more…
The Mixture of Gaussian method
See also
Index
OpenCV Computer Vision Application
Programming Cookbook Second Edition
OpenCV Computer Vision Application
Programming Cookbook Second Edition
Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: May 2011
Second edition: August 2014
Production reference: 1200814
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78216-148-6
www.packtpub.com
Cover image by Mathieu Paquette (<[email protected]>)
Credits
Author
Robert Laganière
Reviewers
Walter Lucetti
Anton Sukhinov
Tao Wu
Commissioning Editor
Usha Iyer
Acquisition Editors
Usha Iyer
Neha Nagwekar
Content Development Editor
Amey Varangaonkar
Technical Editors
Indrajit A. Das
Pooja Nair
Humera Shaikh
Copy Editors
Dipti Kapadia
Stuti Srivastava
Project Coordinator
Leena Purkait
Proofreaders
Simran Bhogal
Maria Gould
Ameesha Green
Paul Hindle
Indexer
Hemangini Bari
Graphics
Sheetal Aute
Disha Haria
Production Coordinator
Manu Joseph
Cover Work
Manu Joseph
About the Author
Robert Laganière is a professor at the School of Electrical Engineering and Computer
Science of the University of Ottawa, Canada. He is also a faculty member of the VIVA
research lab and is the co-author of several scientific publications and patents in content-
based video analysis, visual surveillance, object recognition, and 3D reconstruction.
Robert authored OpenCV2 Computer Vision Application Programming Cookbook, Packt
Publishing, in 2011 and co-authored Object Oriented Software Development, McGraw
Hill, in 2001. He co-founded Visual Cortek in 2006, an Ottawa-based video analytics
startup that was later acquired by iWatchLife (www.iwatchlife.com) in 2009, where he
also assumes the role of Chief Scientist. Since 2011, he is also Chief Scientist at Cognivue
Corp, which is a leader in embedded vision solutions. He has a Bachelor of Electrical
Engineering degree from Ecole Polytechnique in Montreal (1987) and MSc and PhD
degrees from INRS-Telecommunications, Montreal (1996). You can visit his website at
www.laganiere.name.
I wish to thank all my students at the VIVA lab; I learn so much from them.
About the Reviewers
Walter Lucetti, known on the Internet as Myzhar, is an Italian computer engineer with a
specialization in Robotics and Robotics Perception. He received a Laurea degree in 2005
while studying at Research Center “E.Piaggio” in Pisa (Italy). He wrote a thesis on the 3D
mapping of the real world using a 2D Laser tilted using a servo motor, fusing 3D with
RGB data. During the writing of his thesis, he got introduced to OpenCV for the first time.
It was early 2004 and OpenCV was at its larval stage.
After the Laurea, he started working as a software developer for low-level embedded
systems and high-level desktop systems. He deeply improved his knowledge about
Computer Vision and Machine Learning as a researcher at Gustavo Stefanini Advanced
Robotics Research Center in La Spezia (Italy), which is a spinoff of PERCRO Laboratory
of the Scuola Superiore Sant’Anna of Pisa (Italy).
Now, he is working in the industry, developing firmware for embedded ARM systems and
intelligent algorithms for video surveillance systems.
He is also working on a personal project: MyzharBot. MyzharBot is a tracked ground
mobile robot that uses stereo vision to detect obstacles and analyze and explore the
environment.
You can find more information about Walter, his project, and a lot of tutorials on computer
vision at www.robot-home.it and http://myzharbot.robot-home.it.
Anton Sukhinov graduated from Moscow Institute of Physics and Technology. He has a
PhD degree in Physics and Mathematics.
Anton has experience in mathematical modeling, numerical simulation, image processing
and analysis, machine learning, and electronics.
During the reviewing of this book, Anton was a senior developer in CVisionLab, which is
a small Russian R&D firm dedicated to image processing, analysis, machine learning, and
related fields.
Currently, he works as a research scientist at Skolkovo Institute of Science and
Technology (Russia).
Tao Wu graduated from University of Maryland with a PhD degree in Electrical
Engineering in 2013. He received his MS and BE degrees in Electrical Engineering from
Tsinghua University, Beijing, in 2008 and 2005, respectively.
He has more than 7 years of experience in C/C++ and OpenCV. His research interests
include computer vision, pattern recognition, machine learning, and image and video
processing.
Currently, he is working for Microsoft.
www.PacktPub.com
Support files, eBooks, discount offers, and
more
You might want to visit www.PacktPub.com for support files and downloads related to
your book.
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as
a print book customer, you are entitled to a discount on the eBook copy. Get in touch with
us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and offers on Packt books
and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt’s online digital
book library. Here, you can access, read and search across Packt’s entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine entirely free books. Simply use your login credentials for
immediate access.
Preface
OpenCV (Open source Computer Vision) is an open source library that contains more than
500 optimized algorithms for image and video analysis. Since its introduction in 1999, it
has been largely adopted as the primary development tool by the community of
researchers and developers in computer vision. OpenCV was originally developed at Intel
by a team led by Gary Bradski as an initiative to advance research in vision and promote
the development of rich vision-based, CPU-intensive applications. After a series of beta
releases, Version 1.0 was launched in 2006. A second major release occurred in 2009 with
the launch of OpenCV 2 that proposed important changes, especially the new C++
interface that we use in this book. In 2012, OpenCV reshaped itself as a nonprofit
foundation (http://opencv.org/) that relies on crowdfunding for its future development.
This book is a new edition of OpenCV Computer Vision Application Programming
Cookbook. All the programming recipes of the previous editions have been reviewed and
updated. We also have added new content to provide readers with even better coverage of
the essential functionalities of the library. This book covers many of the library’s features
and shows you how to use them to accomplish specific tasks. Our objective is not to
provide detailed coverage of every option offered by the OpenCV functions and classes,
but rather to give you the elements you need to build your applications from the ground
up. In this book, we also explore fundamental concepts in image analysis, and we describe
some of the important algorithms in computer vision.
This book is an opportunity for you to get introduced to the world of image and video
analysis. However, this is just the beginning. The good news is that OpenCV continues to
evolve and expand. Just consult the OpenCV online documentation at http://opencv.org/ to
stay updated on what the library can do for you. You can also visit the author’s website at
www.laganiere.name for updated information about this Cookbook.
What this book covers
Chapter 1, Playing with Images, introduces the OpenCV library and shows you how to
build simple applications that can read and display images. It also introduces the basic
OpenCV data structures.
Chapter 2, Manipulating Pixels, explains how an image can be read. It describes different
methods for scanning an image in order to perform an operation on each of its pixels.
Chapter 3, Processing Color Images with Classes, consists of recipes that present various
object-oriented design patterns that can help you build better computer vision applications.
It also discusses the concept of colors in images.
Chapter 4, Counting the Pixels with Histograms, shows you how to compute image
histograms and how they can be used to modify an image. Different applications based on
histograms are presented, and they achieve image segmentation, object detection, and
image retrieval.
Chapter 5, Transforming Images with Morphological Operations, explores the concept of
mathematical morphology. It presents different operators and informs you how they can be
used to detect edges, corners, and segments in images.
Chapter 6, Filtering the Images, teaches you the principle of frequency analysis and image
filtering. It shows how low-pass and high-pass filters can be applied to images and
presents the concept of derivative operators.
Chapter 7, Extracting Lines, Contours, and Components, focuses on the detection of
geometric image features. It explains how to extract contours, lines, and connected
components in an image.
Chapter 8, Detecting Interest Points, describes various feature-point detectors in images.
Chapter 9, Describing and Matching Interest Points, explains how descriptors of interest
points can be computed and used to match points between images.
Chapter 10, Estimating Projective Relations in Images, explores the projective relations
that exist between two images of the same scene. It also describes the process of camera
calibration and revisits the problem of matching feature points.
Chapter 11, Processing Video Sequences, provides you with a framework to read and write
a video sequence and process its frames. It also shows you how it is possible to track
feature points from frame to frame and how to extract the foreground objects moving in
front of a camera.
What you need for this book
This Cookbook is based on the C++ API of the OpenCV library. Therefore, it is assumed
that you have some experience with the C++ language. In order to run the examples
presented in the recipes and experiment with them, you need a good C++ development
environment. Microsoft Visual Studio and Qt are two popular choices.
Who this book is for
This Cookbook is appropriate for novice C++ programmers who want to learn how to use
the OpenCV library to build computer vision applications. It is also suitable for
professional software developers who wish to be introduced to the concepts of computer
vision programming. It can be used as a companion book for university-level computer
vision courses. It is an excellent reference for graduate students and researchers of image
processing and computer vision.
Conventions
In this book, you will find a number of styles of text that distinguish between different
kinds of information. Here are some examples of these styles, and an explanation of their
meaning.
Code words in text, folder names, filenames, file extensions, pathnames, dummy URLs,
and user input are shown as follows: “Very conveniently, this check is encapsulated inside
the create method of cv::Mat.”
A block of code is set as follows:
// use image with a Mat_ template
cv::Mat_<uchar> im2(image);
im2(50,100)= 0; // access to row 50 and column 100
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or may have disliked. Reader feedback is important for us to
develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>, and
mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help
you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased from
your account at http://www.packtpub.com. If you purchased this book elsewhere, you can
visit http://www.packtpub.com/support and register to have the files e-mailed directly to
you.
Another Random Scribd Document
with Unrelated Content
and an incision made as long as that in the skin and muscles. Now
kneel down in close contact with the cow’s back and insert the arm,
passing the hand within the brim or cavity of the pelvis. By so doing
both ovaries can be secured and detached. This ended, the
operation of uniting the abdominal muscles follows by means of
stitches and sutures.
Great care is necessary in having the instruments boiled and
washed in antiseptics, and in having the fingers, hands, and arms
severely clean and well saturated with a strong antiseptic solution.
The operation should be made out in the open where neither dirt
nor dust are to be found. Extreme care about germs will remove
much of the risk associated with the operation.
In spaying a sow, she is laid on an inclined board with the
hindquarters up. The operator stands at the back of the sow. The
hair is first clipped from the skin where the incision is to be made,
high up in the flank and midway between the haunch and the last
rib. The incision needs to be just large enough to admit the two
fingers. Ovaries are located, pulled through the opening in the flank,
and removed by tearing off with the fingers. The flank incision is
then closed by the necessary number of stitches.
This operation is sometimes performed in mares. But being rather
uncommon the process is less understood. In this case it is best to
call your veterinarian or someone in the community well skilled in
the operation. In all cases of spaying let severe cleanliness be the
rule and practice, from the very beginning to the very end.
—Splints occur more commonly in the heavier breeds of horses than
in those that are light in the bone below the knee. It is rare that
splints occur anywhere except on the inside of the front cannon
bone, although they are sometimes seen on the outside of both the
front and hind legs. Any enlargement of the bone occurring on the
inside of the leg between the knee and fetlock comes under the
name of splint. The usual cause is concussion, that is, the impact of
the foot on the hard road. It may be the result of other causes, such
as a blow, a twisting strain or faulty conformation. Some animals are
more liable to splints than others. It is, after all, to a certain extent,
dependent upon heredity. At first the splint is hard to detect. If you
SPLINTS.notice a young horse going lame while
doing road work, it is well to examine for splints.
While working there seems to be no lameness at all,
and when standing there seems to be no pain, but
when put to a trot the horse shows lameness and
may raise and lower his head.
If taken in time, a splint can be cured. The first
thing to do with an animal suffering from a splint is
to give the animal rest and place in such quarters
where there is a soft floor, preferably the ground,
and when so quartered one very frequently effects a
complete cure. The application of cold water
bandages acts well. If treatment of this sort fails,
apply a blister of red iodide of mercury, 1
tablespoonful to 2 tablespoonfuls of lard. This blister
should be applied with rubbing every day from two
to four days, or until the area is well blistered. Then
wait until the little scabs fall off, and if the animal is
still lame, repeat the application of this blister. To
SPLINT apply the blister, clip off the hair over the
enlargement and wash with vinegar to remove
grease, then rub in blister with ends of fingers. Keep the animals
tied short for two to four days in order to prevent rubbing or biting
the leg. Four days after the last application of blister, wash carefully
with warm water and soap and over it apply every day or so a little
lard, to prevent drying and also to loosen the scabs.
SPRAINS.—Injuries to the ligaments of joints, tendons, or
muscles. They are caused by violence, as twisting, or from over-
exertion; also sprains are often the result of overwork. If an animal
is worked until tired or exhausted he is unable to use the proper
muscle force, and more strain has to be borne by the ligaments,
resulting in sprains, which often occur in young horses or even in old
horses, when put to work after long periods of rest. Swelling, heat,
soreness, and partial or complete loss of the use of the part, which
is shown by the degree of lameness, characterize the disorder.
Sprains are most common in the legs, at the fetlock joint, in the
tendons just back and above the fetlocks, but may occur in any part.
The first and most important thing in the treatment of sprains is
rest, as sprains are a long time in making a complete recovery. In
the early stages, that is, before swelling has taken place,
applications of cold water should be used, applications of hot water,
or hot packs of water, 1,000 parts, and bichloride of mercury 1 part,
are very good. This will relieve the pain and reduce the swelling.
Applications of liniments are also very good. Should there be great
heat and soreness in the part, it is well to use cold applications.
Never blister in the early stages. A blister may be used after the
swelling has gone down, and the part has become cold, from two to
four weeks after the injury occurred. This should be followed by rest
for some time after all lameness has disappeared.
STAGGERS.—Staggers in horses is an affection of the brain
showing itself usually in one of two forms—sleepy or stomach
staggers and blind or mad staggers. In the first form the stomach is
at fault. Sudden change of feed, moldy or dirty food heavy work or
fast driving right after a heavy meal or severe exposure is liable to
cause indigestion in the stomach and this is reflected to the brain,
causing the animal to act dull or sleepy, sometimes showing
symptoms of serious colic, with gas forming from the fermentation
of the food, frequently resulting in death.
Blind or mad staggers is an inflammation of the brain and may
affect any of the lower animals. In the beginning of this form the
symptoms closely resemble those in the stomach form, but as the
inflammation progresses the animal becomes blind and violent and
may roll, paw, kick, wander around in a circle, usually going only one
way, either to the left or right, or it may walk or run in a straight line
as near as possible for hours at a time—paying no attention to
injuries received in its travels. In either case the animal may be
drenched once daily with a quart of raw linseed oil or a pound of
Glauber salts, dissolved in water, which sometimes gives relief.
Staggers in Sheep is mostly caused by the young stage of a
tapeworm which infests sheep dogs. The dog eats the infected brain
of the sheep and the sheep eats the egg of the tapeworm after it
has passed through the dog. After the egg hatches in the stomach of
the sheep the young worm passes through the bowels and other
organs or tissues or circulates through the blood and reaches the
brain, where it develops and causes an inflammation, resulting in
disease. It is most common in young animals, rarely occurring in
sheep after their second year.
Prevention is about the only practical way of handling this trouble.
The grounds should be thoroughly drained, allowing the animals only
pure, fresh water to drink. It may be necessary to change pastures
for a year or two. The brains of all sheep killed and the heads of all
dying with the disease should be burned.
STOMACH AND INTESTINAL WORMS IN SHEEP.—If a box of
salt is kept covered in some place frequented by the sheep, to which
they are allowed to help themselves, and if said salt is saturated
with spirits of turpentine in proportions of a gill to every four quarts
of salt, it will wonderfully help to keep the worms from multiplying.
It is well, also, to have another box of larger size, where sheep can
help themselves at will, filled with tobacco stems. These stems
should be cut up in inch lengths and from time to time a quantity of
wheat bran should be put on top of the stems. When this is done
the sheep soon instinctively learn to use tobacco, and no young
intestinal worm or stomach worm, except the tapeworm, can stand
the diet. This will not kill mature worms. It will only prevent the
worm family multiplying to the extent of injuring the health of sheep.
TWISTED STOMACH WORMS
A common attitude observed when sheep are
afflicted with twisted stomach worms. The animal
loses in flesh, and unless relief is found in time, dies.
The parasite is shown in the illustration.
TEXAS FEVER
The annual loss to the South, because of the
cattle tick, extends into many millions of dollars.
Investigations show that a complete
extermination can be effected at a cost of $6 per
farm.
TEXAS OR TICK FEVER.—The earliest accounts that we have of
this disease date back to 1814. It was found that cattle driven from
a certain district in South Carolina to other parts of the state would
infect others with the disease, while they themselves seemed to be
in perfect health. The disease is known by various names in the
different sections of the country. It is often called red water, Spanish
fever, Australian tick fever, and murain.
After getting into the body, tubercle bacteria multiply in the tissues
to which they have been carried and produce the changes in them
which we find on the examination of an animal suffering with
tuberculosis. Tuberculosis, therefore, is simply the outcome of the
growth of the tubercle bacteria in the organs.
Where Tubercles Are to Be Found.—Tuberculous areas may be
found in almost any part of the infected animal, but the organs that
are usually affected are the lymphatic glands, either in the throat,
the bronchial glands or those about the intestines and on the liver;
the lungs; the liver; the kidneys; intestines; udder and generative
organs. The membrane covering the lungs (pleura), the heart
(pericardium), and intestines (peritoneum), are frequently affected.
It often happens that a large mass, or masses, of tuberculous tissue
grow over one or more of these membranes. The most peculiar
thing about bovine tuberculosis is the fact that frequently an animal
will appear to be perfectly well, but when slaughtered will be found
to have a large number of tuberculous areas or masses on the
membranes or in its organs. The reason for this is that the diseased
area is not at a vital point.
The organ or membrane affected depends upon the one to which
the germ is carried. Usually animals are infected in but one organ in
the beginning, and from this diseased area the germs spread
through the blood vessels or lymph channels to other organs. When
the diseased area is restricted to one organ or part, it is called
“localized” tuberculosis, because it appears at the point where the
seed or germ was first planted. When the germs spread through the
circulation from this first or primary diseased area to other organs
and set up new tuberculous growths, the condition is called
“generalized” tuberculosis. When cattle are slaughtered for food, if
they are found to be afflicted with localized tuberculosis, the flesh is
considered to be fit for food, but if the disease is generalized the
carcass is condemned.
The Symptoms of Tuberculosis vary according to the location
of the disease. If it is in the glands of the throat it is suggested by
their enlargement. If it is in a gland about the lungs, which, because
of its enlargement, presses on the œsophagus (gullet), there might
be bloating. If the disease is in the lung tissue there would be, after
it is sufficiently advanced, coughing and perhaps difficult breathing.
If the disease is in the liver, it cannot be readily distinguished until it
is far advanced. If the disease is in the udder it manifests itself
usually by the organ becoming firm or hard, and when the tissues
are sufficiently broken down the milk from that quarter will be
changed in appearance; sometimes it is thick, containing pus,
sometimes thin and watery. It is very difficult to diagnose
tuberculosis from the symptoms, as many other causes may give rise
to similar manifestations.
As tuberculosis is caused by a specific germ, the disease is spread
by the germs escaping from the diseased animals and getting into
the bodies of healthy ones. The tubercle bacteria escape from the
infected animal with some one or more of the natural discharges of
the body. For example, if the cow has a bad tuberculous area in the
lung, the bacteria may be discharged into one of the air tubes and
coughed up into the mouth. Some of them will escape with the
saliva and infect mangers or pastures. Some of them may be
swallowed and escape from the body with the feces. If the disease is
in the udder the germs will escape with the milk. There are some
observations which indicate that sometimes the bacteria will escape
with the milk where the udder is not affected. After the bacteria
leave the diseased animal and are left in the manger, or in the
pasture, or on the surface of water in the drinking trough, they can
be readily taken up by healthy cattle that eat or drink after them. If
they escape with the milk, calves and pigs that are fed with it readily
become infected. After the germs get into the body of the healthy
animal they will multiply and produce the disease, just as the seed
of a noxious weed will, if blown into a new field, germinate and
produce the weed there. Tuberculosis spreads from animal to animal
on the same principle that weeds spread from one field to another.
In order to prevent the spread of tuberculosis it is simply
necessary to prevent healthy animals from coming in contact with
the diseased ones or eating or drinking after them.
As tuberculosis cannot be readily detected by a physical
examination until the disease is far advanced in the organs affected,
it is necessary, in order to determine which animals have the
disease, to apply some test or to find the germs of the disease in
their excretions. The simplest test that has thus far been discovered
is the action of tuberculin. When tuberculin is injected under the skin
of the animals affected with active tuberculosis the animals respond
by a rise of temperature, which follows a somewhat definite curve.
By means of this test it is possible to pick out the infected individuals
so that they can be separated from the healthy ones. The test
should be repeated in from six months to a year in order to detect
any new cases which might have developed from latent or arrested
ones. We cannot always get all of the infected animals with the first
test any more than we can always remove every weed from the
garden by one hoeing.
The Bang Method for the Control of tuberculosis consists in
separating the animals that are infected from the well ones and
keeping them for breeding purposes. The calves are removed from
their dams as soon as born and fed with the milk of healthy cows, or
the pasteurized milk of the infected ones. It has been found that but
a small percentage of calves that are raised under proper
precautions from such animals have tuberculosis. By this means a
sound herd of cattle may be developed from tuberculous animals.
This method was introduced by Prof. Bang of Copenhagen, and it
has been found to be very effective in Denmark and other countries
in Europe. It has been applied with much success in a large number
of individual herds in the United States. Its success depends entirely
upon the care which is taken in keeping tubercle bacteria away from
the calves.
In purchasing cattle for dairy or breeding purposes it is important
that they should be taken from herds that are free from tuberculosis.
The sound herd is the unit to be dealt with. Animals from such herds
are far more reliable than non-reactors from tuberculous herds.
TUMORS.—Abnormal growths of tissues. There are many kinds of
tumors. They are named from the kind of tissue of which they are
composed, as fibrous and fatty. Just why tumors should develop is
not known. Treatment is in the direction of direct removal; this
means they are to be cut out with a knife. Another method is to tie a
strong cord around the stem of the tumor, thus shutting off the
blood supply. As soon as this is effected, there will be a sloughing
away, with a sore remaining, which is to be treated as in an ordinary
wound. Some tumors are burnt off with caustics. Arsenic or
corrosive sublimate are commonly used, either singularly or
combined. Better consult a veterinarian about the removal of tumors
on valuable animals.
TUMORS IN PIGS AFTER CASTRATION.—Bunches form on
the cords of pigs after castration as a result of infection from dirty
instruments or hands during the operation; or from leaving the cord
too long, thus increasing the liability of its becoming infected. These
tumors continue to grow, and in the worst cases attain the size of a
man’s head. Cut down on a tumor the same as in a simple case of
castration. Separate the skin from the tumor and then swallow up
the cord with the hands. Cut the cord off as high up as possible. The
wound may be healed by the use of any of the common
disinfectants. A teaspoonful of carbolic acid in a quart of water may
be used once daily until the pigs are healed. Pigs should be kept in a
clean pen after the operation.
WARBLES.—These are lumps in the skin of cattle, caused by
grubs or warbles. A simple treatment is to cut the skin and squeeze
out the grubs where the lumps are noticed. If all the grubs are killed
in this way, there will be no mature flies to cause trouble later on.
See article on Bot Flies.
WARTS.—The cause of these little tumors of the skin is not
definitely known. They occur on all domestic animals, appearing
most frequently on horses and cattle. Pure acetic acid, dropped on
the wart until it is saturated and softened, destroys in the early
stages. Warts about which a small cord may be tied are most easily
treated in that way. After they have sloughed off, apply a little
terchloride of antimony with a feather or cotton. When the scab
forms, remove it and apply the chemical again. With a couple of
applications the spot will be lower than the surrounding skin. Now
use an ointment, made of 4 tablespoonfuls of oxide of zinc and 8
tablespoonfuls of lard. Apply this daily until the sore spot is healed.
Sometimes a form of warts suddenly appears on colts and calves
and scatter themselves about the lips, nose and face. They are
common and appear and disappear suddenly. No treatment is
necessary.
WATER IN THE BRAIN.—Dropsy in the brain. A condition
characterized by an accumulation of fluid in the brain. The disease is
either congenital or arises during the first years of life. When it
occurs the best thing is to kill the young individual at once.
WATER IN THE CHEST.—Often after a case of pleurisy a
reaction comes and a very large quantity of water settles in the
chest cavity, anywhere from two to four pailfuls. When the disease
comes on the animal has difficulty in breathing; takes in the breath
quickly. There is a constant biting at the flanks; the pulse increases
to a hundred beats a minute. If you place your ear over the chest
you will likely hear no sound at all. Best treatment is wholesome
food, boiled flaxseed, and blisters for both sides of the chest. Use
strong mustard plasters. A good medicine to use is one-fourth of a
pound of saltpeter or nitrate of potash, one fourth of a pound of
ground gentian and one-fourth of a pound of sulphate of iron. These
should be mixed and then 1 teaspoonful given every four hours. You
had better consult a veterinarian. Other complications set in so
readily that help may be secured in other ways. Some veterinarians
puncture the chest so as to draw off the surplus water that has
accumulated.
WHITE SCOURS OF CALVES.—Calves of several days or weeks
old suffer from indigestion, which is indicated by thriftlessness, and
then scouring. The discharges are white, sour, curdled and frequent
at first and then become watery, greenish and offensive, passing in
stream often. Calves live some days and fast lose flesh, showing all
the symptoms of ill health.
One of the commonest causes is feeding dirty, souring or
decomposing factory skim milk in large quantities at long intervals;
even sweet skim milk so fed may produce the trouble. To prevent
scours give calves a perfectly clean, airy, sunny pen and yard
attached. Separate any calf that scours. Avoid dirty, dark, damp,
poorly ventilated pens in which scouring calves have been. Give all
food from clean, scalded, sun-dried vessels. Feed small quantities of
food often; and in milk mix lime water freely two or three times a
week as a preventive; and daily when scouring has been
experienced. Also see that the udders of cows nursing calves do not
become contaminated with manure or other filth.
Wash udders with a two per cent solution of coal tar disinfectant
before any calf is allowed to suck for the first time, and then repeat
to keep the udders clean. Also disinfect the navel of each calf at
birth with a 1⁄500 solution of corrosive sublimate and repeat the
application twice a day until the navel is perfectly healed over. At the
first sign of scours give castor oil shaken up in milk. Two to 6
tablespoonfuls is the dose according to the size and age of the calf.
Follow two or three times daily with a 1 to 2-teaspoonful dose of a
mixture of one part of salol and two parts of subnitrate of bismuth in
milk or water. For calves scouring on skim milk mix in each pint of
milk 1 teaspoonful of a mixture of half an ounce of formaldehyde in
151⁄2 ounces of distilled water, to be kept in an amber-colored bottle.
WIND COLIC.—See Colic.
WIND PUFFS.—An accumulation of synovia in the cavities
between the tendons of the legs, especially between the back
tendons and the bone just above the fetlock joint. The bulging out is
on each side of the tendon. Horses subjected to severe exertions,
like hard work on the roads, are most frequently affected. The puffs
or galls seldom cause lameness or interfere with the usual work.
Unless treated the puffs will become thicker and harder and
sometimes solidified. When this happens lameness occurs. In the
early stages, pads and bandages, if applied so as to cause pressure,
will tend to remove the galls. If this treatment is not sufficient, then
use a teaspoonful of biniodide of mercury, and 4 tablespoonfuls of
lard. When mixed, these should be rubbed on with the fingers. After
24 hours remove with water and soap and repeat every other week
until the puffs disappear.
WIND SUCKING.—See Cribbing.
WORMS.—See Intestinal Worms in Horses and Sheep; and
Stomach Worms.
WORMS IN HOGS.—Hogs with worms in the intestines run down
in condition, become very thin and lank, back is arched, eyes dull,
refuse feed, walk stiffly, and appear lifeless. The worms may be very
numerous, in bad cases completely filling the intestines. The pigs die
if not treated. To secure the best results, affected hogs should
receive individual treatment. Twenty-four hours before administering
treatment very little feed should be given them. Then give the
following medicine as a drench to each 100-pound hog; larger or
smaller hogs should receive a dose in proportion: 4 tablespoonfuls of
oil of turpentine, one-half teaspoonful of liquor ferri dialysatus and 6
ounces of raw linseed oil. If necessary, repeat the dose in four days.
Index
Page
Abortion, 101
Abscesses, 103
Aconite, 69
Actinomycosis, 104
Afterbirth, 106
Aloes, 69
Alum, 69
Animal Body a Collection of Cells, 11
Animal Body, How Formed, 9
Animals, Caring for Sick, 99
Animal Diseases, Learn to Recognize, 4
Animals, Examining in the Stables, 42
Animals, Out of Doors Test, 44
Anthrax, 108
Antimony, 71
Apoplexy, 111
Anemia, 107
Aniseed, 70
Arnica, 70
Arsenic, 70
Azoturia, 111
Back, 47
Bandage, How to Make It, 57
Barrenness, 113
Belladonna, 70
Big Head, 113
Big Jaw of Cattle, 114
Big Knee, 114
Big Leg, 114
Bile, 26
Biniodide of Mercury, 71
Bitter Milk, 114
Blackhead, 114
Blackleg, 115
Blackleg Vaccine, 116
Bladder, 67
Bladder, Stone in, 117
Blind Staggers, 117
Blistering, 98
Bloating in Cattle, 117
Blood, 12
Blood Poisoning, 120
Bloody Milk, 121
Bloody Urine, 121
Body, 47
Body Tissues, 12
Bog Spavin, 122
Bone Spavin, 123
Bot Flies, 123
Bots, 126
Breeze Flies, 123
Broken Wind, 126
Bromide of Potassium, 71
Bronchitis, 126
Bruises, Treating, 60
Bunches, 128
Burns, 128
Caked Bag, 128
Caked Udder, 128
Calculi of Urinary Organs, 140
Calf Cholera, 128
Calf Scours, 129
Camphor, 72
Cancer, 129
Cantharides, 72
Capped Elbow, 130
Capped Hock, 130
Capped Knee, 131
Carbolic Acid, 72
Castration, 131
Catarrh, 133
Cattle Scab, 134
Cattle, Special Type in, 44
Caustic Potash, 74
Cell Division, 10
Cell, Nature of, 9
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookultra.com