Methods for Wild Pig Identifications from Moving Pictures and Discrimination of Female Wild Pigs based on Feature Matching Methods

Methods for wild pig identifications and discrimination of female wild pigs based on feature matching methods with acquired Near Infrared: NIR moving pictures are proposed. Trials and errors are repeated for identifying wild pigs and for discrimination of female wild pigs through experiments. As a conclusion, feature matching methods with the target nipple features show a better performance. Feature matching method of FLANN shows the best performance in terms of feature extraction and tracking capabilities. Keywords—OpenCV; Canny filter; Template matching; Feature matching


I. INTRODUCTION
Wildlife damage in Japan is around 23 Billion Japanese Yen a year in accordance with the report from the Ministry of Agriculture, Japan.In particular, wildlife damages by deer and wild pigs are dominant (10 times much greater than the others) in comparison to the damage due to monkeys, bulbuls (birds), rats.Therefore, there are strong demands to mitigate the wildlife damage as much as we could.It, however, is not so easy to find and capture the wildlife due to lack of information about behavior.For instance, their routes, lurk locations are unknown and not easy to find.Therefore, it is difficult to determine the appropriate location of launch a trap.
The purpose of this research work is to identify the wildlife, in particular, wild pigs for mitigation of wildlife damage.In particular, it is effective to capture female wild pigs (wild boar lays the child) for mitigation of wildlife damage.Therefore, there are very strong demands of capturing female wild pigs.
In order to identify the wild pigs and discriminate female wild pigs from the moving pictures acquired with Near Infrared: NIR camera, computer vision of technologies are utilized.First, target of wild pigs is attempted to extract from the moving pictures.Contour extraction and edge extraction are attempted.Secondly, background and target are attempted to separate.Using a template of nipple image (a small portion of image), discrimination of female wild pigs is attempted.
Then feature matching methods are used for female wild pig discriminations with nipple features acquired from the moving pictures.
The following section describes research background followed by the proposed methods for wild pig identification and discrimination of female wild pigs.Then experiments are described followed by conclusion with some discussions.

Ecological
Impacts to ecosystems can take the form of decreased water quality, increased propagation of exotic plant species, increased soil erosion, modification of nutrient cycles, and damage to native plant species [1]- [5].

Agricultural Crops
Wild pigs can damage timber, pastures, and, especially, agricultural crops [6]

Forest Restoration
Seedlings of both hardwoods and pines, especially longleaf pines, are very susceptible to pig damage through direct consumption, rooting, and trampling [10]- [12].

Disease Threats to Humans and Livestock
Wild pigs carry numerous parasites and diseases that potentially threaten the health of humans, livestock, and wildlife [13]- [15].
There also are some lethal techniques for damage managements.One of these is trapping.It is reported that an intense trapping program can reduce populations by 80 to 90% [19].Some individuals, however, are resistant to trapping; thus, trapping alone is unlikely to be successful in entirely eradicating populations.In general, cage traps, including both large corral traps and portable drop-gate traps, are most popular and effective, but success varies seasonally with the availability of natural food sources [20].Cage or pen traps are based on a holding container with some type of a gate or door [21].

A. Proposed System
Fig. 1 shows an example of the system for trapping and capturing of wild pigs which consists of the trap cage and the video camera.

Trap Cage
Video Camera Fig. 1.Proposed system for trapping and acquiring moving picture of wild pigs In the trap cage, there is bait.When wild pigs get in the trap cage, ultrasonic sensor sensed them.Then the entrance doors are shut downed.These processes are monitored and captured with the near infrared video camera with near infrared Light Emission Diode: LED.Because wild pigs are active in nighttime, Near Infrared: NIR camera with NIR LED is used.
The proposed system for trapping of wild pigs and for capturing their moving pictures is illustrated in Fig. 2.
There are two ultrasonic sensors which are attached at the front and the back ends of the cage.When wild pigs get in the cage, then they are sensed with the ultrasonic sensors.Meantime, trap obstruction is activated.Drop-gates are then shut downed immediately after they are sensed with the ultrasonic sensors.Thus the wild pigs are trapped in the cage.These processes are monitored and captured with NIR camera with NIR LED.The captured moving pictures are transmitted through Bluetooth and then the transmitted moving pictures are transferred to the data collection center through WiFi networks or LAN.There are sensor control and battery box as well as solar panel for electricity supply.

net/projects/opencvlibrary
There so many library software for image processing and analysis.First, object has to be extracted from the moving picture.Then object contour has to be extracted.For the contour extraction and tracing, Canny filter related spatial filters are attempted.After that, it would be better to remove the background.The following background removals is attempted, cv2.createBackgroundSubtractorMOG()In order to discriminate female wild pigs, template matching method is applied with a template of small portion of nipple images.The following correlation functions are attempted for template matching, Also feature matching methods are applied for discrimination of female wild pigs.There are many feature matching methods in the OpenCV library.A couple of feature matching methods are attempted for the discriminations.The followings are typical feature matching methods which are provided from OpenCV, The FlannBasedMatcher interface is used in the proposed method in order to perform a quick and efficient matching by using the FLANN (Fast Approximate Nearest Neighbor Search Library).Also Brute-Force matcher which is simple matching method is used in the proposed method.It takes the descriptor of one feature in first set and is matched with all other features in second set using some distance calculation.For both, feature descriptor is needed.Speeded-up Robust Feature: SURF is used in the proposed method.

A. Preliminary Image Processing
One shot image of the acquired moving pictures is shown in Fig. 4 as an example.This is a female wild pig on the route from habitat area to go to the calms feed.Wild boar children are followed by the female wild pig.By using the difference between the current and the previous frame of wild pig (targeted object), it is possible to extract the female wild pig.Also, it is possible to remove the background by frame by frame.Fig. 5 shows the resultant image of the background removals.
Edge and contour extractions are attempted with Canny and sharp Canny filters.Fig. 6 (a) shows the resultant image of Canny filter while Fig. 6 (b) shows that of the sharp Canny filter.In the process, lower and higher thresholds are adequately set obviously.Through a comparison between Fig. 6

B. Descrimination of Female Wild pigs
Secondly, discrimination of female wild pigs is attempted with template matching and feature matching.Fig. 7 shows an example of template image of nipple which indicates female wild pigs.Other than these, feature matching methods are attempted for discrimination of female wild pigs.In order to describe the feature of female wild pigs, Scale-Invariant Feature Transform: SIFT and SURF based feature descriptors are used for representation of nipple features.SURF descriptor based feature matching and tracking is attempted.Fig. 10 shows an example of the resultant image of SURF feature matching.The SURF based feature description and feature matching is not good enough for feature tracking.Sometime it works well, but it does not work well as shown in Fig. 10.Therefore, another feature matching methods are attempted after that.www.ijarai.thesai.orgNipple of features is matched so well.In particular, tracking capability of the FLANN feature matching is superior to the other template matching and SURF matching as well as SURF Brute-Force matching.

C. Proposed System for Wild Pig Montoring Hardware System
One of the issues for damage management due to wild pigs is how to count the number of female wild pigs in the area in concern.Although the proposed methods and systems above work well, the hardware system is costly.The hardware system proposed here is cheap version of the system for monitoring the number of female wild pigs.Because the areas where suffers from wild pig damage are situated almost all over the Japanese island.Such situation is common to the countries in the world.Therefore, the cheap version of hardware system for monitoring is required.
Android tablet terminal which equipped communication capability (Bluetooth, WiFi) and camera is not so expensive.For instance, Android tablet terminal of KEIAN M716S V2 with 7 inches display does cost about 7280 Japanese Yen.Major specification and outlook of the Android tablet terminal is shown in Table 3. NIR LED is also cheap.Therefore, one set of wild pig monitor does cost about 10000 Japanese Yen.The length of the route in the area in concern is a couple of hundred meters.Therefore, 30 sets of the monitoring system would cover the entire route of wild pigs.The total cost of the hardware system an area is around 300000 Japanese Yen.Obviously it is cheaper than damage cost.
Event driven application software is installed in the Android tablet terminal.When relatively large changes are detected in the current frame compared to the previous frame, the event driven software is activated.Then target object is detected with target extraction and contour extraction.Then size of target object is measured from the contour.Discrimination between adult and cub is done depending on the measured size.After that discrimination between male and female is done depending on presence or absence of nipple.
Along with the suspicious route of wild pigs, the monitoring hardware systems are set every 10 meters.The number of incoming and outgoing wild pigs is counted for each block with 10 meters long.Thus total number of wild pigs can be estimated.Further study is required for wide area of spatial distribution of wild pigs.Spatial distribution of wild pigs in a relatively small size of area in concern can be estimated by the proposed system and method.Kiriging can be used for a much wide area in concern using estimated the number of wild pigs of the small size of areas.
II. RESEARCH BACKGROUND According to the West, B. C., A. L. Cooper, and J. B. Armstrong.2009.Managing wild pigs: A technical guide.Human-Wildlife Interactions Monograph 1:1-55 1 , there are the following wild pig damages,

Fig. 2 .
Fig. 2. Proposed system for trapping of wild pigs and for capturing their moving pictures Outlooks of the NIR camera (NetCowboy) with NIR LED and ultrasonic sensors are shown in Fig. 3 (a) and (b), respectively.Meanwhile, specifications of these camera and sensor are shown inTable 1 and 2, respectively

Fig. 3 .
Fig. 3. Outlook of NIR camera with NIR LED and ultrasonic sensor used in the proposed system for trapping and capturing of wild pigs (a) and (b), sharp Canny filter seems superior to Canny filter.It, however, is not sufficient for extraction.

Fig. 4 .Fig. 5 .
Fig. 4. Portion of original image of the targeted object of female wild pig in concern

Fig. 7 .
Fig. 7. Template image of nipple which is an indicator of female wild pigs By using template matching software which is provided by OpenCV, nipple feature is matched and tracked.An example of template matching image with template image is shown in Fig.8.It seems does work well for female wild pig discrimination and tracking.It, however, does not work so well when the wild pig moves so fast and the portion of nipple is occluded and disappeared which are shown in Fig.9 (a) and (b), respectively.Also influence due to the both target moving speed and occlusion of the different object behind the other object is shown in Fig.9 (c).

Fig. 8 .
Fig. 8. Example of resultant image of template matching with the template image of nipple portion of image

Fig. 10 .
Fig. 10.Resultant image of SURF based feature description and feature matching

Fig. 11 .
Fig. 11.Example of the resultant image of FLANN Those are SURF Brute-Force and FLANN.The performance of discrimination is almost similar between both.Fig.11 shows an example of the resultant image of FLANN.
V. CONCLUSION Methods for wild pig identifications and discrimination of female wild pigs based on feature matching methods with acquired Near Infrared: NIR moving pictures are proposed.Trials and errors are repeated for identifying wild pigs and for discrimination of female wild pigs through experiments.As a conclusion, feature matching methods with the target nipple features show a better performance.Feature matching method of FLANN shows the best performance in terms of feature extraction and tracking capabilities.

TABLE I .
SPECIFICATION OF NIR CAMERA (NETCOWBOY)