V1 Readme + rangement

This commit is contained in:
Unknown 2018-08-13 11:25:26 +02:00
parent 3300e0efd3
commit 406e6d9b5d
1339 changed files with 248781 additions and 4282 deletions

View file

@ -0,0 +1,972 @@
/*
* Image matching using Affine-SIFT algorithm.
* Allow to find matching keypoints, filter, compute ROI & center of an object in an image, after having built the references (with at least 1 image).
* @author : antoine.harle@etu.upmc.Fr
* Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
* Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
* Reference: ASIFT online demo (You can try ASIFT with your own images online.)
* http://www.ipol.im/pub/algo/my_affine_sift/
*/
#include "ASIFT_matcher.hpp"
//Default constructor
ASIFT_matcher::ASIFT_matcher(): _nb_refs(0), _total_num_matchings(0), _resize_imgs(false), _showDebug(false), _showInfo(true)
{
default_sift_parameters(_siftParam);
}
/* Constuctor from keypoints references (.txt)
* ref_path : path to a text file with keypoints reference following the convention of saveReference function.
*/
ASIFT_matcher::ASIFT_matcher(const char* ref_path): ASIFT_matcher()
{
if(!loadReferences(ref_path))
{
std::cerr<<"Error : Failed to load references"<<std::endl;
}
}
// ASIFT_matcher::~ASIFT_matcher()
// {
// }
/*
* Add a reference image.
* image_path : path to the image file (support the same format than CImg / ImageMagick).
* num_tilts : Number of virtual tilts applied to the image. More tilts equal to better matching but slower process. Default : 1 (no tilt). Recommended : 8.
* Return true if the reference was loaded with success.
*/
bool ASIFT_matcher::addReference(const char* image_path, unsigned int num_tilts)
{
///// Read input
// float * iarr1;
// size_t w1, h1;
// if (NULL == (iarr1 = read_png_f32_gray(image_path, &w1, &h1))) {
// std::cerr << "Unable to load image file " << image_path << std::endl;
// return false;
// }
// std::vector<float> ipixels1(iarr1, iarr1 + w1 * h1);
// free(iarr1); /*memcheck*/
// cout<<"Size : "<<w1<<"/"<<h1<<" - "<<ipixels1.size()<<endl;
cimg_library::CImg<float> image;
try
{
image.assign(image_path);
}
catch(cimg_library::CImgIOException)
{
std::cerr << "Unable to load image file " << image_path << std::endl;
return false;
}
//Convert to grayscale
cimg_library::CImg<float> gray(image.width(), image.height(), 1, 1, 0);
cimg_forXY(image,x,y) {
// Separation of channels
int R = (int)image(x,y,0,0);
int G = (int)image(x,y,0,1);
int B = (int)image(x,y,0,2);
// Arithmetic addition of channels for gray
// int grayValue = (int)(0.33*R + 0.33*G + 0.33*B);
// Real weighted addition of channels for gray
int grayValueWeight = (int)(0.299*R + 0.587*G + 0.114*B);
// saving píxel values into image information
// gray(x,y,0,0) = grayValue;
gray(x,y,0,0) = grayValueWeight;
}
std::vector<float> ipixels1;
size_t w1=gray.width(), h1=gray.height();
ipixels1.assign(gray.begin(), gray.end());
if(_showInfo)
std::cout<<"Building reference from "<< image_path << std::endl;
return addReference(ipixels1, w1, h1, num_tilts);
}
/*
* Add a reference image.
* image : Gray scale image. Image size must be equal to width * height.
* w : Width of the image.
* h : Height of the image.
* num_tilts : Number of virtual tilts applied to the image. More tilts equal to better matching but slower process. Default : 1 (no tilt). Recommended : 8.
* Return true if the reference was loaded with success.
*/
bool ASIFT_matcher::addReference(const vector<float>& image, unsigned int w, unsigned int h, unsigned int num_tilts)
{
if(image.size()!=w*h)
{
cerr<<"Error : Input image size doesn't correspond with parameters"<<endl;
return false;
}
int w1=w, h1=h;
vector<float> ipixels1 = image;
///// Resize the images to area wS*hW in remaining the apsect-ratio
///// Resize if the resize flag is not set or if the flag is set unequal to 0
float wS = IM_X;
float hS = IM_Y;
float zoom1=0;
int wS1=0, hS1=0;
vector<float> ipixels1_zoom;
if(_resize_imgs)
{
if(_showInfo)
cout << "WARNING: The input image is resized to " << wS << "x" << hS << " for ASIFT. " << endl
<< " But the results will be normalized to the original image size." << endl << endl;
float InitSigma_aa = 1.6;
float fproj_p, fproj_bg;
char fproj_i;
float *fproj_x4, *fproj_y4;
int fproj_o;
fproj_o = 3;
fproj_p = 0;
fproj_i = 0;
fproj_bg = 0;
fproj_x4 = 0;
fproj_y4 = 0;
float areaS = wS * hS;
// Resize image 1
float area1 = w1 * h1;
zoom1 = sqrt(area1/areaS);
wS1 = (int) (w1 / zoom1);
hS1 = (int) (h1 / zoom1);
int fproj_sx = wS1;
int fproj_sy = hS1;
float fproj_x1 = 0;
float fproj_y1 = 0;
float fproj_x2 = wS1;
float fproj_y2 = 0;
float fproj_x3 = 0;
float fproj_y3 = hS1;
/* Anti-aliasing filtering along vertical direction */
if ( zoom1 > 1 )
{
float sigma_aa = InitSigma_aa * zoom1 / 2;
GaussianBlur1D(ipixels1,w1,h1,sigma_aa,1);
GaussianBlur1D(ipixels1,w1,h1,sigma_aa,0);
}
// simulate a tilt: subsample the image along the vertical axis by a factor of t.
ipixels1_zoom.resize(wS1*hS1);
fproj (ipixels1, ipixels1_zoom, w1, h1, &fproj_sx, &fproj_sy, &fproj_bg, &fproj_o, &fproj_p,
&fproj_i , fproj_x1 , fproj_y1 , fproj_x2 , fproj_y2 , fproj_x3 , fproj_y3, fproj_x4, fproj_y4);
}
else
{
ipixels1_zoom.resize(w1*h1);
ipixels1_zoom = ipixels1;
wS1 = w1;
hS1 = h1;
zoom1 = 1;
}
///// Compute ASIFT keypoints
asift_keypoints keys;
int num_keys = 0;
time_t tstart, tend;
tstart = time(0);
num_keys = compute_asift_keypoints(ipixels1_zoom, wS1, hS1, num_tilts, _showDebug, keys, _siftParam);
tend = time(0);
//Save data
_im_refs.push_back(ipixels1_zoom);
_size_refs.push_back(make_pair(wS1,hS1));
_zoom_refs.push_back(zoom1);
_num_keys.push_back(num_keys);
_num_tilts.push_back(num_tilts);
_keys.push_back(keys);
_nb_refs++;
if(_showInfo)
cout<<"Reference built in "<< difftime(tend, tstart) << " seconds." << endl
<<" "<< num_keys <<" ASIFT keypoints found."<< endl;
return true;
}
/*
* Perform matching between an image and the references.
* image_path : path to the image file (support the same format than CImg / ImageMagick).
* num_tilts : Number of virtual tilts applied to the image. More tilts equal to better matching but slower process. Default : 1 (no tilt). Recommended : 8.
* Return number of matching keypoints found.
*/
unsigned int ASIFT_matcher::match(const char* image_path, unsigned int num_tilts)
{
if(_nb_refs<=0)
{
std::cerr<<"ASIFT_matcher Error : Trying to match without reference"<<std::endl;
return 0;
}
///// Read input
// float * iarr1;
// size_t w1, h1;
// if (NULL == (iarr1 = read_png_f32_gray(image_path, &w1, &h1))) {
// std::cerr << "Unable to load image file " << image_path << std::endl;
// return 1;
// }
// std::vector<float> ipixels1(iarr1, iarr1 + w1 * h1);
// free(iarr1); /*memcheck*/
cimg_library::CImg<float> image;
try
{
image.assign(image_path);
}
catch(cimg_library::CImgIOException)
{
std::cerr << "Unable to load image file " << image_path << std::endl;
return 0;
}
//Convert to grayscale
cimg_library::CImg<float> gray(image.width(), image.height(), 1, 1, 0);
cimg_forXY(image,x,y) {
// Separation of channels
int R = (int)image(x,y,0,0);
int G = (int)image(x,y,0,1);
int B = (int)image(x,y,0,2);
// Arithmetic addition of channels for gray
// int grayValue = (int)(0.33*R + 0.33*G + 0.33*B);
// Real weighted addition of channels for gray
int grayValueWeight = (int)(0.299*R + 0.587*G + 0.114*B);
// saving píxel values into image information
// gray(x,y,0,0) = grayValue;
gray(x,y,0,0) = grayValueWeight;
}
vector<float> ipixels1;
size_t w1=gray.width(), h1=gray.height();
ipixels1.assign(gray.begin(), gray.end());
if(_showInfo)
std::cout<<"Matching from "<<image_path<<std::endl;
return match(ipixels1, w1, h1, num_tilts);
}
/*
* Perform matching between an image and the references.
* image : Gray scale image. Image size must be equal to width * height.
* w : Width of the image.
* h : Height of the image.
* num_tilts : Number of virtual tilts applied to the image. More tilts equal to better matching but slower process. Default : 1 (no tilt). Recommended : 8.
* Return number of matching keypoints found.
*/
unsigned int ASIFT_matcher::match(const vector<float>& image, unsigned int w, unsigned int h, unsigned int num_tilts)
{
if(image.size()!=w*h)
{
cerr<<"Error : Input image size doesn't correspond with parameters"<<endl;
return 0;
}
int w1=w, h1=h;
vector<float> ipixels1 = image;
///// Resize the images to area wS*hW in remaining the apsect-ratio
///// Resize if the resize flag is not set or if the flag is set unequal to 0
float wS = IM_X;
float hS = IM_Y;
float zoom1=0;
int wS1=0, hS1=0;
vector<float> ipixels1_zoom;
if(_resize_imgs)
{
if(_showInfo)
cout << "WARNING: The input image is resized to " << wS << "x" << hS << " for ASIFT. " << endl
<< " But the results will be normalized to the original image size." << endl << endl;
float InitSigma_aa = 1.6;
float fproj_p, fproj_bg;
char fproj_i;
float *fproj_x4, *fproj_y4;
int fproj_o;
fproj_o = 3;
fproj_p = 0;
fproj_i = 0;
fproj_bg = 0;
fproj_x4 = 0;
fproj_y4 = 0;
float areaS = wS * hS;
// Resize image 1
float area1 = w1 * h1;
zoom1 = sqrt(area1/areaS);
wS1 = (int) (w1 / zoom1);
hS1 = (int) (h1 / zoom1);
int fproj_sx = wS1;
int fproj_sy = hS1;
float fproj_x1 = 0;
float fproj_y1 = 0;
float fproj_x2 = wS1;
float fproj_y2 = 0;
float fproj_x3 = 0;
float fproj_y3 = hS1;
/* Anti-aliasing filtering along vertical direction */
if ( zoom1 > 1 )
{
float sigma_aa = InitSigma_aa * zoom1 / 2;
GaussianBlur1D(ipixels1,w1,h1,sigma_aa,1);
GaussianBlur1D(ipixels1,w1,h1,sigma_aa,0);
}
// simulate a tilt: subsample the image along the vertical axis by a factor of t.
ipixels1_zoom.resize(wS1*hS1);
fproj (ipixels1, ipixels1_zoom, w1, h1, &fproj_sx, &fproj_sy, &fproj_bg, &fproj_o, &fproj_p,
&fproj_i , fproj_x1 , fproj_y1 , fproj_x2 , fproj_y2 , fproj_x3 , fproj_y3, fproj_x4, fproj_y4);
}
else
{
ipixels1_zoom.resize(w1*h1);
ipixels1_zoom = ipixels1;
wS1 = w1;
hS1 = h1;
zoom1 = 1;
}
///// Compute ASIFT keypoints
asift_keypoints keys;
int num_keys = 0;
time_t tstart, tend;
tstart = time(0);
num_keys = compute_asift_keypoints(ipixels1_zoom, wS1, hS1, num_tilts, _showDebug, keys, _siftParam);
tend = time(0);
if(_showInfo)
cout<< "Keypoints computation accomplished in " << difftime(tend, tstart) << " seconds." << endl
<<" "<< num_keys <<" ASIFT keypoints found."<< endl;
//// Match ASIFT keypoints
_total_num_matchings=0;
for(unsigned int i = 0; i<_nb_refs;i++)
{
int num_matchings = 0;
matchingslist matchings;
if(_showInfo)
cout << "Matching the keypoints..." << endl;
tstart = time(0);
try
{
num_matchings = compute_asift_matches(num_tilts, _num_tilts[i], w, h, _size_refs[i].first, _size_refs[i].second, _showDebug, keys, _keys[i], matchings, _siftParam);
}
catch(const bad_alloc& ba)
{
cerr<<"ERROR: ASIFT_matcher::match - ";
cerr << ba.what() << endl;
}
// cout<< _keys[i].size()<< " " << _keys[i][0].size() <<" "<< _keys[i][0][0].size()<<endl;
tend = time(0);
if(_showInfo)
cout << "Keypoints matching accomplished in " << difftime(tend, tstart) << " seconds." << endl;
_num_matchings.push_back(num_matchings);
_total_num_matchings += num_matchings;
_matchings.push_back(matchings);
}
return _total_num_matchings;
}
/*
* Compute the bounding rectangle of the matching keypoints.
* Match function must have been called before and found at least one matching keypoint.
* x : X-coordinate of the upper-left point.
* y : Y-coordinate of the upper-left point.
* h : Height of the rectangle.
* w : Width of the rectangle.
* Return true if the ROI was succesfully found and arguments modified.
*/
bool ASIFT_matcher::computeROI(int& x, int& y, unsigned int& h, unsigned int& w) const
{
if(getNbMatch()==0)
{
cerr<<"Error : cannot compute ROI without matchs"<<endl;
return false;
}
pair<int,int> upLe, doRi; //UpLeft / DownRight
//Initialisation
for(unsigned int i=0;i<_matchings.size();i++)
{
if(getNbMatchs()[i]!=0)
{
upLe = make_pair(_matchings[i][0].first.x,_matchings[i][0].first.y);
doRi = make_pair(_matchings[i][0].first.x,_matchings[i][0].first.y);
}
}
//Compute ROI
for(unsigned int i=0;i<_matchings.size();i++)
{
for(unsigned int j=0;j<_matchings[i].size();j++)
{
keypoint kp = _matchings[i][j].first;
if(kp.x<upLe.first)
upLe.first = kp.x;
if(kp.y<upLe.second)
upLe.second=kp.y;
if(kp.x>doRi.first)
doRi.first=kp.x;
if(kp.y>doRi.second)
doRi.second=kp.y;
}
}
x=upLe.first; //Système de coordonée ? (devrait etre bon)
y=upLe.second;
h=doRi.second-y;
w=doRi.first-x;
return true;
}
/*
* Compute the centroid of the matching keypoints.
* Match function must have been called before and found at least one matching keypoint.
* cx : X-coordinate of the centroid.
* cy : Y-coordinate of the centroid.
* Return true if the ROI was succesfully found and arguments modified.
*/
bool ASIFT_matcher::computeCenter(int& cx, int& cy) const
{
if(getNbMatch()==0)
{
cerr<<"Error : cannot compute Center without matchs"<<endl;
return false;
}
unsigned int total_kp =0;
cx=0;cy=0;
for(unsigned int i=0;i<_matchings.size();i++)
{
for(unsigned int j=0;j<_matchings[i].size();j++)
{
keypoint kp = _matchings[i][j].first;
cx+=kp.x;
cy+=kp.y;
}
total_kp += _matchings[i].size();
}
cx/=total_kp;
cy/=total_kp;
return true;
}
/*
* Perform a standard deviation filtering on the matching keypoints.
* Match function must have been called before and found at least one matching keypoint.
* threshold : Filtering coefficient. 1-Keep 68% of the keypoints / 2-Keep 95% of the keypoints / 3-Keep 99% of the keypoints. Default : 2.
* Return true if the filtering is done.
*/
bool ASIFT_matcher::distFilter(float threshold)
{
if(_showInfo)
cout<<"filtering keypoint..."<<endl;
if(getNbMatch()==0)
{
cerr<<"Error : cannot filter points without matchs"<<endl;
return false;
}
//Compute standard deviation
int cx, cy;
unsigned int total_kp =0;
unsigned int euc_dist, dist_avg =0, dist_var=0, std_dev;
vector< vector< int > > kp_euc_dist;
if(computeCenter(cx,cy))
{
// cout<<"Center : "<<cx<<" / "<<cy<<endl;
//Compute means/average distance to center + euclidian distances to center for each keypoint
for(unsigned int i=0;i<_matchings.size();i++)
{
vector<int> temp_euc_dist;
for(unsigned int j=0;j<_matchings[i].size();j++)
{
keypoint kp = _matchings[i][j].first;
euc_dist =sqrt((kp.x-cx)*(kp.x-cx)+(kp.y-cy)+(kp.y-cy));
dist_avg+=euc_dist;
temp_euc_dist.push_back(euc_dist);
}
total_kp += _matchings[i].size();
kp_euc_dist.push_back(temp_euc_dist);
}
dist_avg/=total_kp;
// cout<<"Dist avg: "<<dist_avg<<endl;
//Compute variance
for(unsigned int i=0;i<_matchings.size();i++)
{
for(unsigned int j=0;j<_matchings[i].size();j++)
{
euc_dist =kp_euc_dist[i][j];
dist_var+=(euc_dist-dist_avg)*(euc_dist-dist_avg);
}
}
dist_var/=total_kp;
//Compute standard deviation
std_dev=sqrt(dist_var);
// cout<<"Standard Deviation : "<<std_dev<<endl;
//Filter
vector< matchingslist > filtered_match;
for(unsigned int i=0;i<_matchings.size();i++)
{
matchingslist new_match;
for(unsigned int j=0;j<_matchings[i].size();j++)
{
euc_dist =kp_euc_dist[i][j];
if(euc_dist<dist_avg+threshold*std_dev) //Filtering Condition
{
new_match.push_back(_matchings[i][j]);
}
}
filtered_match.push_back(new_match);
_num_matchings[i]=new_match.size();
}
//Update number of remaining points
_total_num_matchings = 0;
for(unsigned int i=0; i<_num_matchings.size();i++)
_total_num_matchings+=_num_matchings[i];
//Save filtered matchs
_matchings = filtered_match;
return true;
}
return false;
}
/*
* Save reference data necessary for the matching.
* ref_path : path were the reference data will be saved (.txt).
* Follow a modified convention of David Lowe (SIFT keypoints) :
* - Number of reference.
* - Number of keypoints in the reference / Length of the descriptors (128) / Width of the reference / Height of the reference / Number of tilts.
* -
* - Keypoints (row, col, scale, orientation, desciptor (128 integers)).
* Return true if the reference data was successfully saved.
*/
bool ASIFT_matcher::saveReferences(const char* ref_path) const
{
// Write all the keypoints (row, col, scale, orientation, desciptor (128 integers))
std::ofstream file_key1(ref_path);
if (file_key1.is_open())
{
file_key1<<_nb_refs<<" "<<std::endl;
for(unsigned int j=0; j<_keys.size();j++)
{
asift_keypoints kps =_keys[j];
// Follow the same convention of David Lowe:
// the first line contains the number of keypoints and the length of the desciptors (128)
// Added number of tilts
// Added sizes (* zoom_ref useful ?)
file_key1 << _num_keys[j] << " " << VecLength << " " <<_size_refs[j].first*_zoom_refs[j]<<" "<<_size_refs[j].second*_zoom_refs[j]<<" "<<_num_tilts[j] << " "<<std::endl; //<<_num_tilts[j] << " "
for (int tt = 0; tt < (int) kps.size(); tt++) //kps.size = num_tilt
{
file_key1<<kps[tt].size()<<" "<<std::endl;
for (int rr = 0; rr < (int) kps[tt].size(); rr++)
{
file_key1<<kps[tt][rr].size()<<" "<<std::endl;
keypointslist::iterator ptr = kps[tt][rr].begin();
for(int i=0; i < (int) kps[tt][rr].size(); i++, ptr++)
{
file_key1 << _zoom_refs[j]*ptr->x << " " << _zoom_refs[j]*ptr->y << " " << _zoom_refs[j]*ptr->scale << " " << ptr->angle;
for (int ii = 0; ii < (int) VecLength; ii++)
{
file_key1 << " " << ptr->vec[ii];
}
file_key1 << std::endl;
}
}
}
// file_key1<<std::endl;
}
}
else
{
std::cerr << "Unable to open the file :"<<ref_path;
return false;
}
file_key1.close();
return true;
}
/*
* Load reference data necessary for the matching.
* ref_path : path from were the reference data will be loaded (.txt).
* Follow a modified convention of David Lowe (SIFT keypoints) :
* - Number of reference.
* - Number of keypoints in the reference / Length of the descriptors (128) / Width of the reference / Height of the reference / Number of tilts.
* -
* - Keypoints (row, col, scale, orientation, desciptor (128 integers)).
* Return true if the reference data was successfully loaded.
*/
bool ASIFT_matcher::loadReferences(const char* ref_path)
{
std::ifstream ref_file(ref_path);
std::string line, tmp;
std::stringstream iss;
pair<int,int> img_size_tmp;
if (ref_file.is_open())
{
std::getline(ref_file, line);
std::string::size_type sz;
// _nb_refs = std::stoi(line, &sz); //C++11
_nb_refs = atoi(line.c_str());
_keys = std::vector<asift_keypoints>(_nb_refs);
_num_keys = std::vector< int >(_nb_refs);
_size_refs= std::vector< pair<int,int> >(_nb_refs);
_num_tilts = std::vector< int >(_nb_refs);
_zoom_refs = std::vector<float>(_nb_refs,1);
for(unsigned int i = 0; i<_nb_refs;i++)
{
std::getline(ref_file, line);
std::stringstream iss(line);
std::getline(iss,tmp,' ');
_num_keys[i]=atoi(tmp.c_str());
std::getline(iss,tmp,' ');
if(VecLength!=atoi(tmp.c_str()))
{
std::cerr<<"Error VecLength doesn't correspond..."<<std::endl;
return false;
}
std::getline(iss,tmp,' ');
img_size_tmp.first=atoi(tmp.c_str());
std::getline(iss,tmp,' ');
img_size_tmp.second=atoi(tmp.c_str());
_size_refs[i]=img_size_tmp;
std::getline(iss,tmp,' ');
_num_tilts[i]=atoi(tmp.c_str());
asift_keypoints nakp(_num_tilts[i]);
for(unsigned int j =0; j<(unsigned int)_num_tilts[i];j++)
{
std::getline(ref_file, line);
std::stringstream iss(line);
int veclist_size_tmp = atoi(line.c_str());
std::vector< keypointslist > vkpl(veclist_size_tmp);
for(unsigned int k =0; k<(unsigned int)veclist_size_tmp;k++)
{
std::getline(ref_file, line);
std::stringstream iss(line);
int list_size_tmp = atoi(line.c_str());
keypointslist list(list_size_tmp);
for(unsigned int l =0; l<(unsigned int)list_size_tmp;l++)
{
keypoint nkp;
std::getline(ref_file, line);
std::stringstream iss(line);
// if(j==0)
// cout<<line<<endl;
std::getline(iss,tmp,' ');
// std::stof(nb_ref, nkp.x); //C++11
nkp.x=atof(tmp.c_str());
// if(j<5)
// cout<<"x : "<<nkp.x<<endl;
std::getline(iss,tmp,' ');
nkp.y=atof(tmp.c_str());
// if(j<5)
// cout<<"y : "<<nkp.y<<endl;
std::getline(iss,tmp,' ');
nkp.scale=atof(tmp.c_str());
// if(j<5)
// cout<<"Scale : "<<nkp.scale<<endl;
std::getline(iss,tmp,' ');
nkp.angle=atof(tmp.c_str());
for(unsigned int m=0; m<(int) VecLength; m++)
{
std::getline(iss,tmp,' ');
nkp.vec[m]=atof(tmp.c_str());
}
list[l]=nkp;
}
vkpl[k]=list;
}
nakp[j]=vkpl;
}
_keys[i]=nakp;
// std::getline(ref_file, line);
}
}
else
{
std::cerr << "Unable to open the file :"<<ref_path;
return false;
}
ref_file.close();
return true;
}
// bool ASIFT_matcher::saveReferences(const char* ref_path) const
// {
// // Write all the keypoints (row, col, scale, orientation, desciptor (128 integers))
// std::ofstream file_key1(ref_path);
// if (file_key1.is_open())
// {
// file_key1<<_nb_refs<<" "<<std::endl;
// for(unsigned int j=0; j<_keys.size();j++)
// {
// asift_keypoints kps =_keys[j];
// // Follow the same convention of David Lowe:
// // the first line contains the number of keypoints and the length of the desciptors (128)
// // Added number of tilts
// // Added sizes
// file_key1 << _num_keys[j] << " " << VecLength << " " <<_size_refs[j].first<<" "<<_size_refs[j].second<<" "<<std::endl; //<<_num_tilts[j] << " "
// for (int tt = 0; tt < (int) kps.size(); tt++) //kps.size = num_tilt
// {
// for (int rr = 0; rr < (int) kps[tt].size(); rr++)
// {
// keypointslist::iterator ptr = kps[tt][rr].begin();
// for(int i=0; i < (int) kps[tt][rr].size(); i++, ptr++)
// {
// file_key1 << _zoom_refs[j]*ptr->x << " " << _zoom_refs[j]*ptr->y << " " << _zoom_refs[j]*ptr->scale << " " << ptr->angle;
// for (int ii = 0; ii < (int) VecLength; ii++)
// {
// file_key1 << " " << ptr->vec[ii];
// }
// file_key1 << std::endl;
// }
// }
// }
// // file_key1<<std::endl;
// }
// }
// else
// {
// std::cerr << "Unable to open the file :"<<ref_path;
// return false;
// }
// file_key1.close();
// return true;
// }
//Load reference data necessary for the matching
//Doesn't load references images or Sift parameters
//TODO : split data between different tilts
// bool ASIFT_matcher::loadReferences(const char* ref_path)
// {
// std::ifstream ref_file(ref_path);
// std::string line, tmp;
// std::stringstream iss;
// pair<int,int> size_tmp;
// if (ref_file.is_open())
// {
// std::getline(ref_file, line);
// std::string::size_type sz;
// // _nb_refs = std::stoi(line, &sz); //C++11
// _nb_refs = atoi(line.c_str());
// _keys = std::vector<asift_keypoints>(_nb_refs);
// _num_keys = std::vector< int >(_nb_refs);
// _size_refs= std::vector< pair<int,int> >(_nb_refs);
// _num_tilts = std::vector< int >(_nb_refs,1);
// _zoom_refs = std::vector<float>(_nb_refs,1);
// for(unsigned int i = 0; i<_nb_refs;i++)
// {
// std::getline(ref_file, line);
// std::stringstream iss(line);
// std::getline(iss,tmp,' ');
// _num_keys[i]=atoi(tmp.c_str());
// std::getline(iss,tmp,' ');
// if(VecLength!=atoi(tmp.c_str()))
// {
// std::cerr<<"Error VecLength doesn't correspond..."<<std::endl;
// return false;
// }
// std::getline(iss,tmp,' ');
// size_tmp.first=atoi(tmp.c_str());
// std::getline(iss,tmp,' ');
// size_tmp.second=atoi(tmp.c_str());
// _size_refs[i]=size_tmp;
// std::getline(iss,tmp,' ');
// _num_tilts[i]=atoi(tmp.c_str());
// keypointslist list;
// for(unsigned int j =0; j<(unsigned int)_num_keys[i];j++)
// {
// keypoint nkp;
// std::getline(ref_file, line);
// std::stringstream iss(line);
// // if(j==0)
// // cout<<line<<endl;
// std::getline(iss,tmp,' ');
// // std::stof(nb_ref, nkp.x); //C++11
// nkp.x=atof(tmp.c_str());
// // if(j<5)
// // cout<<"x : "<<nkp.x<<endl;
// std::getline(iss,tmp,' ');
// nkp.y=atof(tmp.c_str());
// // if(j<5)
// // cout<<"y : "<<nkp.y<<endl;
// std::getline(iss,tmp,' ');
// nkp.scale=atof(tmp.c_str());
// // if(j<5)
// // cout<<"Scale : "<<nkp.scale<<endl;
// std::getline(iss,tmp,' ');
// nkp.angle=atof(tmp.c_str());
// for(unsigned int k=0; k<(int) VecLength; k++)
// {
// std::getline(iss,tmp,' ');
// nkp.vec[k]=atof(tmp.c_str());
// }
// list.push_back(nkp);
// // if(j<5)
// // {
// // cout<<"x : "<<list[j].x<<endl;
// // cout<<"y : "<<list[j].y<<endl;
// // cout<<"Scale : "<<list[j].scale<<endl;
// // }
// }
// std::vector< keypointslist > vkps(1,list);
// asift_keypoints akps(1,vkps);
// _keys[i]=akps;
// // std::getline(ref_file, line);
// }
// }
// else
// {
// std::cerr << "Unable to open the file :"<<ref_path;
// return false;
// }
// ref_file.close();
// return true;
// }
/*
* Assignation operator.
* m : ASIFT matcher object to copy.
*/
ASIFT_matcher& ASIFT_matcher::operator=(const ASIFT_matcher& m)
{
_nb_refs=m.getNbRef();
_im_refs=m.getRefImgs();
_size_refs=m.getSizeRef();
_zoom_refs=m.getZoomRef();
_num_keys=m.getNumKeys();
_num_tilts=m.getNumTilts();
_keys=m.getKeys();
_total_num_matchings=m.getNbMatch();
_num_matchings=getNbMatchs();
_matchings=m.getMatch();
_siftParam=m.getSiftPar();
_resize_imgs=m.isResizingImg();
_showDebug=m.isShowingDebug();
return *this;
}
//Debugging function : print content form the ASIFT matcher.
void ASIFT_matcher::print() const
{
for(unsigned int i=0; i< _keys.size();i++)
{
cout<<"Ref :"<<i<<" - Nb tilts : "<<_num_tilts[i]<< " - Nb keys : "<< _num_keys[i]<<endl;
for(unsigned int j=0; j<_keys[i].size();j++)
{
cout<<" Tilt "<<j<<" - size :"<<_keys[i][j].size()<<endl;
for(unsigned int k=0; k<_keys[i][j].size();k++)
{
cout<<" "<<k<<" - size :"<<_keys[i][j][k].size()<<endl;
double sx=0,sy=0,ss=0,sa=0, sv=0;
for(unsigned int l=0; l<_keys[i][j][k].size();l++)
{
sx+=_keys[i][j][k][l].x;
sy+=_keys[i][j][k][l].y;
ss+=_keys[i][j][k][l].scale;
sa+=_keys[i][j][k][l].angle;
for(unsigned int v=0;v<VecLength;v++)
{
sv+=_keys[i][j][k][l].vec[v];
}
// cout<<" "<<sx<<"-"<<sy<<"-"<<ss<<"-"<<sa<<"-"<<sv<<endl;
}
cout<<" "<<sx<<"-"<<sy<<"-"<<ss<<"-"<<sa<<"-"<<sv<<endl;
}
}
}
}

View file

@ -0,0 +1,114 @@
/*
* Image matching using Affine-SIFT algorithm.
* Allow to find matching keypoints, filter, compute ROI & center of an object in an image, after having built the references (with at least 1 image).
* @author : antoine.harle@etu.upmc.Fr
* Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
* Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
* Reference: ASIFT online demo (You can try ASIFT with your own images online.)
* http://www.ipol.im/pub/algo/my_affine_sift/
*/
#ifndef ASIFTMATCHER_HPP
#define ASIFTMATCHER_HPP
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <vector>
#include <sstream>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "demo_lib_sift.h"
// #include "io_png/io_png.h"
#include "library.h"
#include "frot.h"
#include "fproj.h"
#include "compute_asift_keypoints.h"
#include "compute_asift_matches.h"
#include "CImg.h" //Need ImageMagick package
# define IM_X 800
# define IM_Y 600
using namespace std;
typedef vector< vector< keypointslist > > asift_keypoints;
class ASIFT_matcher
{
public:
ASIFT_matcher();//Default constructor.
ASIFT_matcher(const char* ref_path); //Constuctor from keypoints references (.txt).
ASIFT_matcher(const ASIFT_matcher& matcher) { *this = matcher;} //Copy constructor.
// virtual ~ASIFT_matcher();
bool addReference(const char* image_path, unsigned int num_tilts =1); //Add a reference image.
bool addReference(const vector<float>& image, unsigned int w, unsigned int h, unsigned int num_tilts =1); //Add a reference image.
unsigned int match(const char* image_path, unsigned int num_tilts =1); //Perform matching between an image and the references.
unsigned int match(const vector<float>& image, unsigned int w, unsigned int h, unsigned int num_tilts =1); //Perform matching between an image and the references.
bool computeROI(int& x, int& y, unsigned int& h, unsigned int& w) const; //Compute the bounding rectangle of the mathcing keypoints.
bool computeCenter(int& cx, int& cy) const; //Compute the centroid of the matching keypoints.
bool distFilter(float threshold =2); //Perform a standard deviation filtering on the matching keypoints.
bool saveReferences(const char* ref_path) const; //Save reference data necessary for the matching.
bool loadReferences(const char* ref_path); //Load reference data necessary for the matching.
ASIFT_matcher& operator=(const ASIFT_matcher& m); //Assignation operator.
//Setter/Getter
unsigned int getNbRef() const{ return _nb_refs;}
const vector< vector< float > >& getRefImgs() const{ return _im_refs;}
const vector< pair<int,int> >& getSizeRef() const{ return _size_refs;}
const vector<float>& getZoomRef() const{ return _zoom_refs;}
const std::vector<int>& getNumKeys() const{ return _num_keys;}
const std::vector<int>& getNumTilts() const{ return _num_tilts;}
const std::vector< asift_keypoints >& getKeys() const{ return _keys;}
const vector < unsigned int >& getNbMatchs() const{ return _num_matchings;}
unsigned int getNbMatch() const{ return _total_num_matchings;}
const vector< matchingslist >& getMatch() const{ return _matchings;}
vector< matchingslist >& getMatch(){ return _matchings;}
const siftPar& getSiftPar() const{ return _siftParam;}
void setSiftPar(const siftPar &newSiftPar){ _siftParam = newSiftPar;}
bool isResizingImg() const{ return _resize_imgs;}
void resizeImg(bool resize_imgs){ _resize_imgs=resize_imgs;}
bool isShowingDebug() const{ return _showDebug;}
void showDebug(bool showDebug){ _showDebug=showDebug;}
bool isShowingInfo() const{ return _showInfo;}
void showInfo(bool showInfo){ _showInfo=showInfo;}
void print() const; //Debugging function : print content form the ASIFT matcher.
protected:
//Reference Images
unsigned int _nb_refs;//Number of reference images
vector< vector< float > > _im_refs; //Reference images used for matching
vector< pair<int,int> > _size_refs; //Width/Height
vector<float> _zoom_refs; //Zoom coeffs
//Reference ASIFT Keypoints
vector< int > _num_keys; //Number of keypoint/reference
vector< int > _num_tilts; //Number of tilts/reference (Speed VS Precision)
vector< asift_keypoints > _keys; //Reference keypoints
//Matchs
unsigned int _total_num_matchings; //Number of matching keypoints.
vector < unsigned int > _num_matchings; //Number of match/reference
vector< matchingslist > _matchings; //Matching keypoints
siftPar _siftParam; //SIFT parameters
//Flags
bool _resize_imgs;//Resize images to IM_X/IM_Y ?
bool _showDebug;//Show debugging messages ?
bool _showInfo; //Show info messages
};
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,345 @@
# This is the CMakeCache file.
# For build in directory: /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Value Computed by CMake
ASIFT_BINARY_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
//Value Computed by CMake
ASIFT_SOURCE_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release minsize builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during Release with Debug Info builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//C compiler.
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release minsize builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files).
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during Release with Debug Info builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=' '
//Flags used by the linker during debug builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local
//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=' '
//Flags used by the linker during debug builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=ASIFT
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=' '
//Flags used by the linker during debug builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO
//Flags used by the linker during the creation of static libraries.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during debug builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If true, cmake will use relative paths in makefiles and projects.
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Dependencies for target
Match_LIB_DEPENDS:STATIC=
//Dependencies for target
Numerics_LIB_DEPENDS:STATIC=
//Path where debug 3rdpaty OpenCV dependencies are located
OpenCV_3RDPARTY_LIB_DIR_DBG:PATH=
//Path where release 3rdpaty OpenCV dependencies are located
OpenCV_3RDPARTY_LIB_DIR_OPT:PATH=
OpenCV_CONFIG_PATH:FILEPATH=/usr/share/OpenCV
//The directory containing a CMake configuration file for OpenCV.
OpenCV_DIR:PATH=/usr/share/OpenCV
//Path where debug OpenCV libraries are located
OpenCV_LIB_DIR_DBG:PATH=
//Path where release OpenCV libraries are located
OpenCV_LIB_DIR_OPT:PATH=
//C++ compiler flags for OpenMP parallization
OpenMP_CXX_FLAGS:STRING=-fopenmp
//C compiler flags for OpenMP parallization
OpenMP_C_FLAGS:STRING=-fopenmp
//Value Computed by CMake
libMatch_BINARY_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/libMatch
//Value Computed by CMake
libMatch_SOURCE_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/libMatch
//Value Computed by CMake
libNumerics_BINARY_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/libNumerics
//Value Computed by CMake
libNumerics_SOURCE_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/libNumerics
//Value Computed by CMake
png_BINARY_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png
//Dependencies for the target
png_LIB_DEPENDS:STATIC=general;zlib;
//Value Computed by CMake
png_SOURCE_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png
//Value Computed by CMake
zlib_BINARY_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib
//Dependencies for target
zlib_LIB_DEPENDS:STATIC=
//Value Computed by CMake
zlib_SOURCE_DIR:STATIC=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib
########################
# INTERNAL cache entries
########################
//ADVANCED property for variable: CMAKE_BUILD_TOOL
CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1
//What is the target build tool cmake is generating for.
CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/make
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=12
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Start directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
//Install .so files without execute permission.
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=7
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=/usr/share/cmake-2.8
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS
CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Details about finding OpenMP
FIND_PACKAGE_MESSAGE_DETAILS_OpenMP:INTERNAL=[-fopenmp][-fopenmp][v()]
//ADVANCED property for variable: OpenCV_3RDPARTY_LIB_DIR_DBG
OpenCV_3RDPARTY_LIB_DIR_DBG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OpenCV_3RDPARTY_LIB_DIR_OPT
OpenCV_3RDPARTY_LIB_DIR_OPT-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OpenCV_CONFIG_PATH
OpenCV_CONFIG_PATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OpenCV_LIB_DIR_DBG
OpenCV_LIB_DIR_DBG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OpenCV_LIB_DIR_OPT
OpenCV_LIB_DIR_OPT-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OpenMP_CXX_FLAGS
OpenMP_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: OpenMP_C_FLAGS
OpenMP_C_FLAGS-ADVANCED:INTERNAL=1
//Test OpenMP_FLAG_DETECTED
OpenMP_FLAG_DETECTED:INTERNAL=1

View file

@ -0,0 +1,58 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Author : Pierre Moulon
# Date : December 2010.
# README :
# The following cmake works for windows.
# Openmp is accessible only on the professionnal version of Visual Studio.
# In order to use OPENMP in visual your have to add the preprocessor _OPENMP
# and enable OPENMP library in C/C++/Language.
PROJECT(ASIFT)
ADD_SUBDIRECTORY(io_png)
ADD_SUBDIRECTORY(libMatch)
ADD_SUBDIRECTORY(libNumerics)
FIND_PACKAGE(OpenMP)
if (OPENMP_FOUND)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif (OPENMP_FOUND)
IF(MSVC)
ADD_DEFINITIONS(/arch:SSE2)
ENDIF(MSVC)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-strict-aliasing")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-write-strings")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -ansi")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -ftree-vectorize -funroll-loops")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/X11R6/lib -lm -lpthread -lX11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
set(ASIFT_srcs
numerics1.cpp frot.cpp splines.cpp fproj.cpp
library.cpp flimage.cpp filter.cpp
demo_lib_sift.cpp compute_asift_keypoints.cpp
compute_asift_matches.cpp
orsa.cpp #demo_ASIFT.cpp
#ASIFT_matcher.cpp
io_png/io_png.c)
include_directories(.
./io_png
./io_png/libs/png
)
add_executable(demo_ASIFT demo_ASIFT.cpp ${ASIFT_srcs})
TARGET_LINK_LIBRARIES(demo_ASIFT png zlib Match Numerics)
#find_package( OpenCV REQUIRED )
add_executable(test_ASIFT test_ASIFT.cpp ASIFT_matcher.cpp ${ASIFT_srcs})
TARGET_LINK_LIBRARIES(test_ASIFT png zlib Match Numerics X11)

View file

@ -0,0 +1,58 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Author : Pierre Moulon
# Date : December 2010.
# README :
# The following cmake works for windows.
# Openmp is accessible only on the professionnal version of Visual Studio.
# In order to use OPENMP in visual your have to add the preprocessor _OPENMP
# and enable OPENMP library in C/C++/Language.
PROJECT(ASIFT)
ADD_SUBDIRECTORY(io_png)
ADD_SUBDIRECTORY(libMatch)
ADD_SUBDIRECTORY(libNumerics)
FIND_PACKAGE(OpenMP)
if (OPENMP_FOUND)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif (OPENMP_FOUND)
IF(MSVC)
ADD_DEFINITIONS(/arch:SSE2)
ENDIF(MSVC)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-strict-aliasing")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wno-write-strings")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -ansi")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -ftree-vectorize -funroll-loops")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/X11R6/lib -lm -lpthread -lX11")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
set(ASIFT_srcs
numerics1.cpp frot.cpp splines.cpp fproj.cpp
library.cpp flimage.cpp filter.cpp
demo_lib_sift.cpp compute_asift_keypoints.cpp
compute_asift_matches.cpp
orsa.cpp #demo_ASIFT.cpp
#ASIFT_matcher.cpp
io_png/io_png.c)
include_directories(.
./io_png
./io_png/libs/png
)
add_executable(demo_ASIFT demo_ASIFT.cpp ${ASIFT_srcs})
TARGET_LINK_LIBRARIES(demo_ASIFT png zlib Match Numerics)
#find_package( OpenCV REQUIRED )
add_executable(test_ASIFT test_ASIFT.cpp ASIFT_matcher.cpp ${ASIFT_srcs})
TARGET_LINK_LIBRARIES(test_ASIFT zlib Match Numerics X11)

View file

@ -0,0 +1,72 @@
Copyright (c) 2011, Guoshen Yu and Jean-Michel Morel
All rights reserved.
The source code files in this directory implement as tightly as
possible algorithms described in this IPOL article. They are made
available to the exclusive aim of serving as scientific tools enabling
the verification of the soundness and completeness of the algorithmic
descriptions.
These source codes implement an algorithm possibly linked to the patent
[1][2]. Compiling or running this code may violate patents in certain
countries. For this reason, the use of the source files
- demo_ASIFT.cpp
- compute_asift_keypoints.cpp
- compute_asift_matches.cpp
- demo_lib_sift.cpp
may be restricted in certain countries to non profit research and non profit
educational purposes. In certain countries, redistribution or commercial
use of these source files may require the consent of the patent owner.
[1] Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
affine recognition recognition of shapes (WO/2009/150361), patent pending.
[2] David Lowe "Method and apparatus for identifying scale invariant
features in an image and use of same for locating an object in an
image", U.S. Patent 6,711,293.
In short, be careful before you download, compile, use, modify, or
redistribute these source codes. The situation being different for every
country and changing over time, it is your responsibility to check that
you are not infringing a patent by using this source code. IPOL therefore
invites potential users to consult a patent lawyer. If and only if you are
free from any patent restriction, then you can enjoy the BSD license terms.
The source code in the subdirectory third_party comes from the Eigen
library, which is LGPL-licensed.
(see http://www.gnu.org/copyleft/lesser.html)
fproj.cpp, frot.cpp, orsa.cpp, libMatch, libNumerics
copyright (C) 2007-2010, Lionel Moisan <Lionel.Moisan@parisdescartes.fr>,
Universite Paris Descartes, distributed under the BSD license.
With the exception of the files mentioned above, redistribution and use
in source and binary forms, with or without modification, are permitted
provided that the following conditions are met: the rest of usual BSD
license follows.
BSD LICENSE
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This license file must be retained with all copies of the software,
including any modified or derivative versions.

View file

@ -0,0 +1,267 @@
Demo code for Affine-SIFT (ASIFT) image matching
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Jean-Michel Morel (Jean-Michel Morel <morel@cmla.ens-cachan.fr>)
Guoshen Yu (yu@cmap.polytechnique.fr)
Version 2.2, April. 10, 2010
This directory contains the C++ code for ASIFT, a fully affine invariant image
matching algorithm.
************************** Unix/Linux/Mac Users **************************
For Unix/Linux and Mac users, the code is ready to be compiled. The
executable adapted to your computer system is generated after compiling.
**************************************************************************
***************************** Windows Users ******************************
For Windows users, the executable as well as the code is provided.
(For the executable, you need to download separately the installation file from
http://www.ipol.im/pub/algo/my_affine_sift/ .)
**************************************************************************
**************************** Matlab Interface ****************************
Although the ASIFT program is standalone and can be executed without Matlab,
a Matlab interface is provided (for Unix/Linux/Mac/Windows users).
**************************************************************************
Source code compilation and software usage across platforms is detailed in this
manual. If you have any problem using the this program, please contact Guoshen Yu
yu@cmap.polytechnique.fr
For more information about ASIFT, please see the web page at
http://www.ipol.im/pub/algo/my_affine_sift/.
You can also try ASIFT using the online demo. The online demo allows testing
ASIFT with your own images without installing the program.
If you use the ASIFT code or software, please cite the following paper:
J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
I. UNIX/LINUX/MAC USER GUIDE
The source code needs to be compiled before the software can be used.
The compilation requires the make program, and is typically straightforward.
- Library.
This code requires the libpng library. You can automatically download,
compile and include this library to the compiled program by adding the
LOCAL_LIBS=1 option to the make commands.
- Image format.
Only the PNG format is supported.
-------------------------------------------------------------------------
Source compilation and software usage
1. Download the ASIFT code package and extract it. Go to that directory.
2. Compile the source code (on Unix/Linux/Mac OS).
There are two ways to compile the code.
(1) RECOMMENDED, with Open Multi-Processing multithread parallelization
(http://openmp.org/). Roughly speaking, it accelerates the program using the
multiple processors in the computer. Run
make OMP=1
OR
(2) If the complier does not support OpenMp, run
make
ATTENTION:
If libpng (the official PNG reference library) is not installed in your computer,
an option LOCAL_LIBS=1 should be added after make. Example
make OMP=1 LOCAL_LIBS=1
The compilation will automatically download and compile libpng and zlib and
include the library to the program.
3. Run ASIFT.
./demo_ASIFT imgIn1.png, imgIn2.png imgOutVert.png imgOutHori.png matchings.txt
keys1.txt keys2.txt
-- imgIn1.png, imgIn2.png: Input images (in png format).
-- imgOutVert.png, imgOutHori.png: Output images (vertical/horizontal concatenated).
The detected matches are connected by write lines.
-- matchings.txt: The file format starts with 1 integer giving the total number
of matches. Then each line specifies the coordinates (col1, row1, col2, row2)
of a pair of matched points. (col: horizontal axis, from left to right.
row: vertical axis, from top to bottom.)
-- keys1.txt keys2.txt: ASIFT keypoints in the two images, in the same format
as the SIFT keypoints of David Lowe. The file starts with 2 integers giving
the total number of keypoints and the length of the descriptor vector for each
keypoint (128). Then the location of each keypoint in the image is specified
by 4 floating point numbers giving subpixel column and row location, scale,
and orientation (in radians from -PI to PI). Finally, the invariant descriptor
vector for the keypoint is given as a list of 128 integers in range [0,255].
-- [optional 0/1]. 1: input images resize to an area equal to 800x600 for ASIFT,
in keeping the aspect ratio (by default). 0: no resize. The resize is to limit
the ASIFT computation time. The results (output images, keypoint coordinates
and scales) are normalized to the original image size, so the resize is
"transparent" to the user.
Example, run
./demo_ASIFT adam1.png adam2.png imgOutVert.png imgOutHori.png matchings.txt
keys1.txt keys2.txt
You get on the screen
"WARNING: The input images are resized to 800x600 for ASIFT.
But the results will be normalized to the original image size.
Computing keypoints on the two images...
12928 ASIFT keypoints are detected.
8972 ASIFT keypoints are detected.
Keypoints computation accomplished in 24 seconds.
Matching the keypoints...
The two images match! 914 matchings are identified. log(nfa)=-1496.88.
Keypoints matching accomplished in 4 seconds."
-------------------------------------------------------------------------
-------------------------------------------------------------------------
II. WINDOWS USER GUIDE
_________________________________________________________________________
A. EXECUTABLE
_________________________________________________________________________
For Windows users who do not want to recompile the source code, an ASIFT executable
installation file can be download separately from
http://www.ipol.im/pub/algo/my_affine_sift/.
- The provided Windows executable demo_ASIFT.exe has been compiled by the Intel C++
compiler on 32-bit Windows. It is executable on both 32-bit and 64-bit Windows,
although it is not optimized for the latter.
- The executable has not been extensively tested. If you have any problem using it,
please contact Guoshen Yu yu@cmap.polytechnique.fr.
Usage:
1. Download the installation file demo_ASIFTsetp.exe from
http://www.ipol.im/pub/algo/my_affine_sift/
2. Install the program.
Double click the file demo_ASIFTsetp.exe. A small library distributed by Microsoft
(Microsoft Visual C++ 2010 Redistributable Package) will be installed to your PC.
The ASIFT software will be installed to C:\Program Files\demo_ASIFT
3. Run ASIFT.
Run a Dos command prompt (you find it in Start > All Programs > Accessories
> Command Prompt)
- Go to the ASIFT directory by typing
cd C:\Program Files\demo_ASIFT.
- Run the ASIFT program by typing
demo_ASIFT adam1.png adam2.png imgOutVert.png imgOutHori.png matchings.txt
keys1.txt keys2.txt
(It follows the same syntax of that for Unix/Linux/Mac described above.)
You can of course move the ASIFT directory C:\Program Files\demo_ASIFT to
wherever that is more convenient.
-------------------------------------------------------------------------
Troubleshooting
1. If you are able to run the program but the results are not written to
the output files, check and make sure that you have the write file permission
in the demo_ASIFT directory.
2. Microsoft Visual Studio is NOT required to run the program. However,
in case you cannot run the program (for example some library or dll is missing),
you may try installing a Microsoft Visual Studio and then running again
the program.
_________________________________________________________________________
B. SOURCE COMPILATION
_________________________________________________________________________
Windows users who want to recompile the source code themselves, please follow the
guidelines below for a smooth compilation.
It is assumed that the CMake and Visual Studio are installed. Moreover,
the Intel C++ compiler, which supports vectorization, is highly recommended.
For an optimized software execution speed, it is crucial that both OpenMP
and vectorization are activated and effective (see below). (Note that
the CPU must have SSE2 or higher instruction sets in order to make vectorization
possible. The /arch:SSE2 opiton must be turned on, which should have
been normally the case.)
1. If you don't have CMake, an open-source build system,
then download and install it from http://cmake.org
2. Launch the CMake program cmake-gui.exe
3. Provide the paths
- "Where is the source code :" (the path that leads to CMakeLists.txt and
the ASIFT source code), e.g., E:/demo_ASIFT_src
- Create a subdirectory Build under demo_ASIFT_src
- "Where to build the binaries:" (the directory where build project and
object files will be stored), e.g., E:/demo_ASIFT_src/Build
4. Press "Configure" and select "Use default native compilers" and
select the code IDE that you have in your machine, e.g., Visual Studio 10.
5. Press "Generate". A Visual Studio solution file ASIFT.sln will
be created under E:/demo_ASIFT_src/Build
6. Launch Visual Studio 10, and open ASIFT.sln.
7. Switch the mode from Debug to Release.
8. Not mandatory, but HIGHLY RECOMMENDED (for program acceleration).
- Switch from the Microsoft Visual C++
compiler to the Intel C++ compiler, if you have it.
- Turn on OpenMP
Click the demo_ASIFT project in the Solution Explorer. Select the menu
Project -> Property -> Configuration Properties -> C/C++ -> Language [Intel C++]
Set OpenMP Support to "Generate Parallel Code (/Qopenmp)"
- Open demo_lib_sift.cpp under demo_ASIFT/Source Files in the Solution Explorer.
Make the following code change in demo_lib_sift.cpp.
unsigned short distsq = 0; ----> int distsq = 0;
Note: This manipulation allows the compiler to vectorize the SIFT code
comparison, which accelerates the ASIFT keypoint matching by a factor of
from 5 to 20. To have the vectorization possible, this distsq variable must
be in unsigned short when compiled with make on Linux/Mac, and be instead
int when complied with the Intel C++ on Windows. Therefore
this format should be adapted according to the compiler. (So don't
forget to change it back if you want to compile the code on Linux/Mac.)
This vectorization is not achieved with the Visual C++ compiler.
9. Build solution. An executable will be created in Build/Release.
Run it in a Dos command prompt.
demo_ASIFT adam1.png adam2.png imgOutVert.png imgOutHori.png matchings.txt
keys1.txt keys2.txt
(It follows the same syntax of that for Unix/Linux/Mac described above.)
-------------------------------------------------------------------------
-------------------------------------------------------------------------
III. MATLAB INTERFACE (OPTIONAL)
Run ASIFT via Matlab: Open test_demo_ASIFT.m in Matlab and execute the script.
The Matlab interface reads most standard image formats.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
CREDITS
- The epipolar geometry filtering algorithm ORSA of Moisan and Stival is
used at the end of the ASIFT algorithm
to eliminate false matches.
http://www.math-info.univ-paris5.fr/~moisan/epipolar/
Pierre Moulon contributed to the SVD subroutine of ORSA. The SVD subroutine
uses
the toolbox Eigen, which is LGPL-licensed.
- We would like to thank Nicolas Limare for his help on developing the program,
and Pierre Moulon for his help on making the Windows compilation much easier with
CMake.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
Licensing conditions
This software is being made available for research purposes only. See the
file LICENSE in this directory for conditions of use.

View file

@ -0,0 +1,8 @@
Book cMo for training image 005
rows: 4
cols: 4
data:
- [-0.2314201876, -0.9583649151, 0.1672763771, 0.09835545579]
- [0.7484075924, -0.06552319445, 0.6599945353, -0.0974700766]
- [-0.6215551242, 0.2779269699, 0.7324109687, 0.5499983612]
- [0; 0; 0; 1]

View file

@ -0,0 +1,8 @@
Book cMo for training image 008
rows: 4
cols: 4
data:
- [0.02063568325, -0.5653102458, -0.8246202123, 0.0403687505]
- [0.8210674394, 0.4801939642, -0.3086454546, -0.1745029756]
- [0.5704580865, -0.6706996964, 0.4740669666, 0.4630312508]
- [0, 0, 0, 1]

View file

@ -0,0 +1,9 @@
Book cMo for training image 007
rows: 4
cols: 4
data:
- [-0.03609085509, -0.3148440768, 0.9484569877, 0.04713881051]
- [-0.8006242946, 0.5771011583, 0.1611055304, 0.02971868344]
- [-0.5980787482, -0.7535432704, -0.2728998912, 0.6240615433]
- [0, 0, 0, 1]

View file

@ -0,0 +1,52 @@
# Install script for directory: /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
IF(BUILD_TYPE)
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME "")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT)
IF(COMPONENT)
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
# Install shared libraries without execute permission?
IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
SET(CMAKE_INSTALL_SO_NO_EXE "1")
ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
IF(NOT CMAKE_INSTALL_LOCAL_ONLY)
# Include the install script for each subdirectory.
INCLUDE("/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/cmake_install.cmake")
INCLUDE("/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/libMatch/cmake_install.cmake")
INCLUDE("/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/libNumerics/cmake_install.cmake")
ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY)
IF(CMAKE_INSTALL_COMPONENT)
SET(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
ELSE(CMAKE_INSTALL_COMPONENT)
SET(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
ENDIF(CMAKE_INSTALL_COMPONENT)
FILE(WRITE "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/${CMAKE_INSTALL_MANIFEST}" "")
FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})
FILE(APPEND "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
ENDFOREACH(file)

View file

@ -0,0 +1,569 @@
// Copyright (c) 2008-2011, Guoshen Yu <yu@cmap.polytechnique.fr>
// Copyright (c) 2008-2011, Jean-Michel Morel <morel@cmla.ens-cachan.fr>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*------------------------ compute_asift_keypoints -------------------------*/
// Compute the ASIFT keypoints on the input image.
//
// Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "compute_asift_keypoints.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#define ABS(x) (((x) > 0) ? (x) : (-(x)))
/* InitSigma gives the amount of smoothing applied to the image at the
first level of each octave. In effect, this determines the sampling
needed in the image domain relative to amount of smoothing. Good
values determined experimentally are in the range 1.2 to 1.8.
*/
/* float InitSigma_aa = 1.0;*/
static float InitSigma_aa = 1.6;
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
/* Gaussian convolution kernels are truncated at this many sigmas from
the center. While it is more efficient to keep this value small,
experiments show that for consistent scale-space analysis it needs
a value of about 3.0, at which point the Gaussian has fallen to
only 1% of its central value. A value of 2.0 greatly reduces
keypoint consistency, and a value of 4.0 is better than 3.0.
*/
const float GaussTruncate1 = 4.0;
/* --------------------------- Blur image --------------------------- */
/* Same as ConvBuffer, but implemented with loop unrolling for increased
speed. This is the most time intensive routine in keypoint detection,
so deserves careful attention to efficiency. Loop unrolling simply
sums 5 multiplications at a time to allow the compiler to schedule
operations better and avoid loop overhead. This almost triples
speed of previous version on a Pentium with gcc.
*/
void ConvBufferFast(float *buffer, float *kernel, int rsize, int ksize)
{
int i;
float *bp, *kp, *endkp;
float sum;
for (i = 0; i < rsize; i++) {
sum = 0.0;
bp = &buffer[i];
kp = &kernel[0];
endkp = &kernel[ksize];
/* Loop unrolling: do 5 multiplications at a time. */
// while (kp + 4 < endkp) {
// sum += (double) bp[0] * (double) kp[0] + (double) bp[1] * (double) kp[1] + (double) bp[2] * (double) kp[2] +
// (double) bp[3] * (double) kp[3] + (double) bp[4] * (double) kp[4];
// bp += 5;
// kp += 5;
// }
// /* Do 2 multiplications at a time on remaining items. */
// while (kp + 1 < endkp) {
// sum += (double) bp[0] * (double) kp[0] + (double) bp[1] * (double) kp[1];
// bp += 2;
// kp += 2;
// }
// /* Finish last one if needed. */
// if (kp < endkp) {
// sum += (double) *bp * (double) *kp;
// }
while (kp < endkp) {
sum += *bp++ * *kp++;
}
buffer[i] = sum;
}
}
/* Convolve image with the 1-D kernel vector along image rows. This
is designed to be as efficient as possible. Pixels outside the
image are set to the value of the closest image pixel.
*/
void ConvHorizontal(vector<float>& image, int width, int height, float *kernel, int ksize)
{
int rows, cols, r, c, i, halfsize;
float buffer[5000];
vector<float> pixels(width*height);
rows = height;
cols = width;
halfsize = ksize / 2;
pixels = image;
assert(cols + ksize < 5000);
for (r = 0; r < rows; r++) {
/* Copy the row into buffer with pixels at ends replicated for
half the mask size. This avoids need to check for ends
within inner loop. */
for (i = 0; i < halfsize; i++)
buffer[i] = pixels[r*cols];
for (i = 0; i < cols; i++)
buffer[halfsize + i] = pixels[r*cols+i];
for (i = 0; i < halfsize; i++)
buffer[halfsize + cols + i] = pixels[r*cols+cols-1];
ConvBufferFast(buffer, kernel, cols, ksize);
for (c = 0; c < cols; c++)
pixels[r*cols+c] = buffer[c];
}
image = pixels;
}
/* Same as ConvHorizontal, but apply to vertical columns of image.
*/
void ConvVertical(vector<float>& image, int width, int height, float *kernel, int ksize)
{
int rows, cols, r, c, i, halfsize;
float buffer[5000];
vector<float> pixels(width*height);
rows = height;
cols = width;
halfsize = ksize / 2;
pixels = image;
assert(rows + ksize < 5000);
for (c = 0; c < cols; c++) {
for (i = 0; i < halfsize; i++)
buffer[i] = pixels[c];
for (i = 0; i < rows; i++)
buffer[halfsize + i] = pixels[i*cols+c];
for (i = 0; i < halfsize; i++)
buffer[halfsize + rows + i] = pixels[(rows - 1)*cols+c];
ConvBufferFast(buffer, kernel, rows, ksize);
for (r = 0; r < rows; r++)
pixels[r*cols+c] = buffer[r];
}
image = pixels;
}
/* 1D Convolve image with a Gaussian of width sigma and store result back
in image. This routine creates the Gaussian kernel, and then applies
it in horizontal (flag_dir=0) OR vertical directions (flag_dir!=0).
*/
void GaussianBlur1D(vector<float>& image, int width, int height, float sigma, int flag_dir)
{
float x, kernel[100], sum = 0.0;
int ksize, i;
/* The Gaussian kernel is truncated at GaussTruncate sigmas from
center. The kernel size should be odd.
*/
ksize = (int)(2.0 * GaussTruncate1 * sigma + 1.0);
ksize = MAX(3, ksize); /* Kernel must be at least 3. */
if (ksize % 2 == 0) /* Make kernel size odd. */
ksize++;
assert(ksize < 100);
/* Fill in kernel values. */
for (i = 0; i <= ksize; i++) {
x = i - ksize / 2;
kernel[i] = exp(- x * x / (2.0 * sigma * sigma));
sum += kernel[i];
}
/* Normalize kernel values to sum to 1.0. */
for (i = 0; i < ksize; i++)
kernel[i] /= sum;
if (flag_dir == 0)
{
ConvHorizontal(image, width, height, kernel, ksize);
}
else
{
ConvVertical(image, width, height, kernel, ksize);
}
}
void compensate_affine_coor1(float *x0, float *y0, int w1, int h1, float t1, float t2, float Rtheta)
{
float x_ori, y_ori;
float x_tmp, y_tmp;
float x1 = *x0;
float y1 = *y0;
Rtheta = Rtheta*PI/180;
if ( Rtheta <= PI/2 )
{
x_ori = 0;
y_ori = w1 * sin(Rtheta) / t1;
}
else
{
x_ori = -w1 * cos(Rtheta) / t2;
y_ori = ( w1 * sin(Rtheta) + h1 * sin(Rtheta-PI/2) ) / t1;
}
float sin_Rtheta = sin(Rtheta);
float cos_Rtheta = cos(Rtheta);
/* project the coordinates of im1 to original image before tilt-rotation transform */
/* Get the coordinates with respect to the 'origin' of the original image before transform */
x1 = x1 - x_ori;
y1 = y1 - y_ori;
/* Invert tilt */
x1 = x1 * t2;
y1 = y1 * t1;
/* Invert rotation (Note that the y direction (vertical) is inverse to the usual concention. Hence Rtheta instead of -Rtheta to inverse the rotation.) */
x_tmp = cos_Rtheta*x1 - sin_Rtheta*y1;
y_tmp = sin_Rtheta*x1 + cos_Rtheta*y1;
x1 = x_tmp;
y1 = y_tmp;
*x0 = x1;
*y0 = y1;
}
/* -------------- MAIN FUNCTION ---------------------- */
int compute_asift_keypoints(vector<float>& image, int width, int height, int num_of_tilts, int verb, vector< vector< keypointslist > >& keys_all, siftPar &siftparameters)
// Compute ASIFT keypoints in the input image.
// Input:
// image: input image
// width, height: width and height of the input image.
// num_of_tilts: number of tilts to simulate.
// verb: 1/0 --> show/don not show verbose messages. (1 for debugging)
// keys_all (output): ASIFT keypoints. It is a 2D matrix with varying rows and columns. Each entry keys_all[tt][rr]
// stores the SIFT keypoints calculated on the image with the simulated tilt index tt and simulated rotation index rr (see the code below). In the coordinates of the keypoints,
// the affine distortions have been compensated.
// siftparameters: SIFT parameters.
//
// Output: the number of keypoints
{
vector<float> image_t, image_tmp1, image_tmp;
float t_min, t_k;
int num_tilt, tt, num_rot_t2, rr;
int fproj_o;
float fproj_p, fproj_bg;
char fproj_i;
float *fproj_x4, *fproj_y4;
// float frot_b=0;
float frot_b=128;
char *frot_k;
int counter_sim=0, num_sim;
int flag_dir = 1;
float BorderFact=6*sqrt(2.);
int num_keys_total=0;
fproj_o = 3;
fproj_p = 0;
fproj_i = 0;
fproj_bg = 0;
fproj_x4 = 0;
fproj_y4 = 0;
frot_k = 0;
num_rot_t2 = 10;
t_min = 1;
t_k = sqrt(2.);
num_tilt = num_of_tilts;
if ( num_tilt < 1)
{
printf("Number of tilts num_tilt should be equal or larger than 1. \n");
exit(-1);
}
image_tmp1 = image;
/* Calculate the number of simulations, and initialize keys_all */
keys_all = std::vector< vector< keypointslist > >(num_tilt);
for (tt = 1; tt <= num_tilt; tt++)
{
float t = t_min * pow(t_k, tt-1);
if ( t == 1 )
{
counter_sim ++;
keys_all[tt-1] = std::vector< keypointslist >(1);
}
else
{
int num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
counter_sim += num_rot1;
keys_all[tt-1] = std::vector< keypointslist >(num_rot1);
}
}
num_sim = counter_sim;
if ( verb )
{
printf("%d affine simulations will be performed. \n", num_sim);
}
counter_sim = 0;
/* Affine simulation (rotation+tilt simulation) */
// Loop on tilts.
#ifdef _OPENMP
omp_set_nested(1);
#endif
#pragma omp parallel for private(tt)
for (tt = 1; tt <= num_tilt; tt++)
{
float t = t_min * pow(t_k, tt-1);
float t1 = 1;
float t2 = 1/t;
// If tilt t = 1, do not simulate rotation.
if ( t == 1 )
{
// copy the image from vector to array as compute_sift_keypoints uses only array.
float *image_tmp1_float = new float[width*height];
for (int cc = 0; cc < width*height; cc++)
image_tmp1_float[cc] = image_tmp1[cc];
compute_sift_keypoints(image_tmp1_float,keys_all[tt-1][0],width,height,siftparameters);
delete[] image_tmp1_float;
}
else
{
// The number of rotations to simulate under the current tilt.
int num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
float delta_theta = PI/num_rot1;
// Loop on rotations.
#pragma omp parallel for private(rr)
for ( int rr = 1; rr <= num_rot1; rr++ )
{
float theta = delta_theta * (rr-1);
theta = theta * 180 / PI;
vector<float> image_t;
int width_r, height_r;
// simulate a rotation: rotate the image with an angle theta. (the outside of the rotated image are padded with the value frot_b)
frot(image, image_t, width, height, &width_r, &height_r, &theta, &frot_b , frot_k);
/* Tilt */
int width_t = (int) (width_r * t1);
int height_t = (int) (height_r * t2);
int fproj_sx = width_t;
int fproj_sy = height_t;
float fproj_x1 = 0;
float fproj_y1 = 0;
float fproj_x2 = width_t;
float fproj_y2 = 0;
float fproj_x3 = 0;
float fproj_y3 = height_t;
/* Anti-aliasing filtering along vertical direction */
/* sigma_aa = InitSigma_aa * log2(t);*/
float sigma_aa = InitSigma_aa * t / 2;
GaussianBlur1D(image_t,width_r,height_r,sigma_aa,flag_dir);
// simulate a tilt: subsample the image along the vertical axis by a factor of t.
vector<float> image_tmp(width_t*height_t);
fproj (image_t, image_tmp, width_r, height_r, &fproj_sx, &fproj_sy, &fproj_bg, &fproj_o, &fproj_p, &fproj_i , fproj_x1 , fproj_y1 , fproj_x2 , fproj_y2 , fproj_x3 , fproj_y3, fproj_x4, fproj_y4);
vector<float> image_tmp1 = image_tmp;
if ( verb )
{
printf("Rotation theta = %.2f, Tilt t = %.2f. w=%d, h=%d, sigma_aa=%.2f, \n", theta, t, width_t, height_t, sigma_aa);
}
float *image_tmp1_float = new float[width_t*height_t];
for (int cc = 0; cc < width_t*height_t; cc++)
image_tmp1_float[cc] = image_tmp1[cc];
// compute SIFT keypoints on simulated image.
keypointslist keypoints;
keypointslist keypoints_filtered;
compute_sift_keypoints(image_tmp1_float,keypoints,width_t,height_t,siftparameters);
delete[] image_tmp1_float;
/* check if the keypoint is located on the boundary of the parallelogram (i.e., the boundary of the distorted input image). If so, remove it to avoid boundary artifacts. */
if ( keypoints.size() != 0 )
{
for ( int cc = 0; cc < (int) keypoints.size(); cc++ )
{
float x0, y0, x1, y1, x2, y2, x3, y3 ,x4, y4, d1, d2, d3, d4, scale1, theta1, sin_theta1, cos_theta1, BorderTh;
x0 = keypoints[cc].x;
y0 = keypoints[cc].y;
scale1= keypoints[cc].scale;
theta1 = theta * PI / 180;
sin_theta1 = sin(theta1);
cos_theta1 = cos(theta1);
/* the coordinates of the 4 submits of the parallelogram */
if ( theta <= 90 )
{
x1 = height * sin_theta1;
y1 = 0;
y2 = width * sin_theta1;
x3 = width * cos_theta1;
x4 = 0;
y4 = height * cos_theta1;
x2 = x1 + x3;
y3 = y2 + y4;
/* note that the vertical direction goes from top to bottom!!!
The calculation above assumes that the vertical direction goes from the bottom to top. Thus the vertical coordinates need to be reversed!!! */
y1 = y3 - y1;
y2 = y3 - y2;
y4 = y3 - y4;
y3 = 0;
y1 = y1 * t2;
y2 = y2 * t2;
y3 = y3 * t2;
y4 = y4 * t2;
}
else
{
y1 = -height * cos_theta1;
x2 = height * sin_theta1;
x3 = 0;
y3 = width * sin_theta1;
x4 = -width * cos_theta1;
y4 = 0;
x1 = x2 + x4;
y2 = y1 + y3;
/* note that the vertical direction goes from top to bottom!!!
The calculation above assumes that the vertical direction goes from the bottom to top. Thus the vertical coordinates need to be reversed!!! */
y1 = y2 - y1;
y3 = y2 - y3;
y4 = y2 - y4;
y2 = 0;
y1 = y1 * t2;
y2 = y2 * t2;
y3 = y3 * t2;
y4 = y4 * t2;
}
/* the distances from the keypoint to the 4 sides of the parallelogram */
d1 = ABS((x2-x1)*(y1-y0)-(x1-x0)*(y2-y1)) / sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
d2 = ABS((x3-x2)*(y2-y0)-(x2-x0)*(y3-y2)) / sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
d3 = ABS((x4-x3)*(y3-y0)-(x3-x0)*(y4-y3)) / sqrt((x4-x3)*(x4-x3)+(y4-y3)*(y4-y3));
d4 = ABS((x1-x4)*(y4-y0)-(x4-x0)*(y1-y4)) / sqrt((x1-x4)*(x1-x4)+(y1-y4)*(y1-y4));
BorderTh = BorderFact*scale1;
if (!((d1<BorderTh) || (d2<BorderTh) || (d3<BorderTh) || (d4<BorderTh) ))
{
// Normalize the coordinates of the matched points by compensate the simulate affine transformations
compensate_affine_coor1(&x0, &y0, width, height, 1/t2, t1, theta);
keypoints[cc].x = x0;
keypoints[cc].y = y0;
keypoints_filtered.push_back(keypoints[cc]);
}
}
}
keys_all[tt-1][rr-1] = keypoints_filtered;
}
}
}
{
for (tt = 0; tt < (int) keys_all.size(); tt++)
for (rr = 0; rr < (int) keys_all[tt].size(); rr++)
{
num_keys_total += (int) keys_all[tt][rr].size();
}
printf("%d ASIFT keypoints are detected. \n", num_keys_total);
}
return num_keys_total;
}

View file

@ -0,0 +1,53 @@
// Copyright (c) 2008-2011, Guoshen Yu <yu@cmap.polytechnique.fr>
// Copyright (c) 2008-2011, Jean-Michel Morel <morel@cmla.ens-cachan.fr>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*------------------------ compute_asift_keypoints -------------------------*/
// Compute the ASIFT keypoints on the input image.
//
// Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include "library.h"
#include "demo_lib_sift.h"
#include "frot.h"
#include "fproj.h"
#include <vector>
using namespace std;
int compute_asift_keypoints(vector<float>& image, int width, int height, int num_of_tilts, int verb, vector< vector< keypointslist > >& keys_all, siftPar &siftparameters);
void GaussianBlur1D(vector<float>& image, int width, int height, float sigma, int flag_dir);

View file

@ -0,0 +1,791 @@
// Copyright (c) 2008-2011, Guoshen Yu <yu@cmap.polytechnique.fr>
// Copyright (c) 2008-2011, Jean-Michel Morel <morel@cmla.ens-cachan.fr>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*------------------------ compute_asift_matches-- -------------------------*/
// Match the ASIFT keypoints.
//
// Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "compute_asift_matches.h"
#include "libMatch/match.h"
#include "orsa.h"
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
/* Remove the repetitive matches that appear in different simulations and retain only one */
void unique_match1(matchingslist &seg_in, matchingslist &seg_out, vector< vector <float> > &Minfoall_in, vector< vector <float> > &Minfoall_out)
{
int i_in, i_out;
float x1_in, x2_in, y1_in, y2_in, x1_out, x2_out, y1_out, y2_out;
int flag_unique;
float d1, d2;
int Th2 = 2;
seg_out.push_back(seg_in[0]);
Minfoall_out.push_back(Minfoall_in[0]);
/* For other matches */
if ( seg_in.size() > 1 )
{
/* check if a match is unique. if yes, copy */
/* Bug fix by Xiaoyu Sun (Sichuan university) (Dec 13, 2015) */
/* Original version
matchingslist::iterator ptr_in = seg_in.begin();
for ( i_in = 1; i_in < (int) seg_in.size(); i_in++, ptr_in++ )
*/
/* Bug fixed */
matchingslist::iterator ptr_in = seg_in.begin();
ptr_in++;
for ( i_in = 1; i_in < (int) seg_in.size(); i_in++, ptr_in++ )
{
x1_in = ptr_in->first.x;
y1_in = ptr_in->first.y;
x2_in = ptr_in->second.x;
y2_in = ptr_in->second.y;
flag_unique = 1;
matchingslist::iterator ptr_out = seg_out.begin();
for ( i_out = 0; i_out < (int) seg_out.size(); i_out++, ptr_out++ )
{
x1_out = ptr_out->first.x;
y1_out = ptr_out->first.y;
x2_out = ptr_out->second.x;
y2_out = ptr_out->second.y;
d1 = (x1_in - x1_out)*(x1_in - x1_out) + (y1_in - y1_out)*(y1_in - y1_out);
d2 = (x2_in - x2_out)*(x2_in - x2_out) + (y2_in - y2_out)*(y2_in - y2_out);
if ( ( d1 <= Th2) && ( d2 <= Th2) )
{
flag_unique = 0;
continue;
}
}
if ( flag_unique == 1 )
{
seg_out.push_back(seg_in[i_in]);
Minfoall_out.push_back(Minfoall_in[i_in]);
}
}
}
}
/* Remove the ALL one-to-multiple matches. */
void clean_match1(matchingslist &seg_in, matchingslist &seg_out, vector< vector <float> > &Minfoall_in, vector< vector <float> > &Minfoall_out)
{
int i1, i2;
float x1_in, x2_in, y1_in, y2_in, x1_out, x2_out, y1_out, y2_out;
// Guoshen Yu, 2010.09.22, Windows version
// int flag_unique[seg_in.size()];
int tmp_size = seg_in.size();
int *flag_unique = new int[tmp_size];
int sum_flag=0;
float d1, d2;
int Th1 = 1;
int Th2 = 4;
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
flag_unique[i1] = 1;
}
/* Set the flag of redundant matches to 0. */
matchingslist::iterator ptr_in = seg_in.begin();
for ( i1 = 0; i1 < (int) seg_in.size() - 1; i1++, ptr_in++ )
{
x1_in = ptr_in->first.x;
y1_in = ptr_in->first.y;
x2_in = ptr_in->second.x;
y2_in = ptr_in->second.y;
matchingslist::iterator ptr_out = ptr_in+1;
for ( i2 = i1 + 1; i2 < (int) seg_in.size(); i2++, ptr_out++ )
{
x1_out = ptr_out->first.x;
y1_out = ptr_out->first.y;
x2_out = ptr_out->second.x;
y2_out = ptr_out->second.y;
d1 = (x1_in - x1_out)*(x1_in - x1_out) + (y1_in - y1_out)*(y1_in - y1_out);
d2 = (x2_in - x2_out)*(x2_in - x2_out) + (y2_in - y2_out)*(y2_in - y2_out);
/* If redundant, set flags of both elements to 0.*/
if ( ( ( d1 <= Th1) && ( d2 > Th2) ) || ( ( d1 > Th2) && ( d2 <= Th1) ) )
{
flag_unique[i1] = 0;
flag_unique[i2] = 0;
}
}
}
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
sum_flag += flag_unique[i1];
}
/* Copy the matches that are not redundant */
if ( sum_flag > 0 )
{
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
if ( flag_unique[i1] == 1 )
{
seg_out.push_back(seg_in[i1]);
Minfoall_out.push_back(Minfoall_in[i1]);
}
}
}
else
{
printf("Warning: all matches are redundant and are thus removed! This step of match cleaning is short circuited. (Normally this should not happen...)\n");
}
// Guoshen Yu, 2010.09.22, Windows version
delete [] flag_unique;
}
/* Remove the ALL multiple-to-one matches */
void clean_match2(matchingslist &seg_in, matchingslist &seg_out, vector< vector <float> > &Minfoall_in, vector< vector <float> > &Minfoall_out)
{
int i1, i2;
float x1_in, x2_in, y1_in, y2_in, x1_out, x2_out, y1_out, y2_out;
// Guoshen Yu, 2010.09.22, Windows version
// int flag_unique[seg_in.size()];
int tmp_size = seg_in.size();
int *flag_unique = new int[tmp_size];
int sum_flag=0;
float d1, d2;
int Th1 = 1;
int Th2 = 4;
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
flag_unique[i1] = 1;
}
/* Set the flag of redundant matches to 0. */
matchingslist::iterator ptr_in = seg_in.begin();
for ( i1 = 0; i1 < (int) seg_in.size() - 1; i1++, ptr_in++ )
{
x1_in = ptr_in->first.x;
y1_in = ptr_in->first.y;
x2_in = ptr_in->second.x;
y2_in = ptr_in->second.y;
matchingslist::iterator ptr_out = ptr_in+1;
for ( i2 = i1 + 1; i2 < (int) seg_in.size(); i2++, ptr_out++ )
{
x1_out = ptr_out->first.x;
y1_out = ptr_out->first.y;
x2_out = ptr_out->second.x;
y2_out = ptr_out->second.y;
d1 = (x1_in - x1_out)*(x1_in - x1_out) + (y1_in - y1_out)*(y1_in - y1_out);
d2 = (x2_in - x2_out)*(x2_in - x2_out) + (y2_in - y2_out)*(y2_in - y2_out);
/* If redundant, set flags of both elements to 0.*/
if ( ( d1 > Th2) && ( d2 <= Th1) )
{
flag_unique[i1] = 0;
flag_unique[i2] = 0;
}
}
}
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
sum_flag += flag_unique[i1];
}
/* Copy the matches that are not redundant */
if ( sum_flag > 0 )
{
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
if ( flag_unique[i1] == 1 )
{
seg_out.push_back(seg_in[i1]);
Minfoall_out.push_back(Minfoall_in[i1]);
}
}
}
else
{
printf("Warning: all matches are redundant and are thus removed! This step of match cleaning is short circuited. (Normally this should not happen...)\n");
}
// Guoshen Yu, 2010.09.22, Windows version
delete [] flag_unique;
}
// Normalize the coordinates of the matched points by compensating the simulate affine transformations
void compensate_affine_coor(matching &matching1, int w1, int h1, int w2, int h2, float t1, float t2, float Rtheta, float t_im2_1, float t_im2_2, float Rtheta2)
{
float x_ori, y_ori;
float x_ori2, y_ori2, x_tmp, y_tmp;
float x1, y1, x2, y2;
Rtheta = Rtheta*PI/180;
if ( Rtheta <= PI/2 )
{
x_ori = 0;
y_ori = w1 * sin(Rtheta) / t1;
}
else
{
x_ori = -w1 * cos(Rtheta) / t2;
y_ori = ( w1 * sin(Rtheta) + h1 * sin(Rtheta-PI/2) ) / t1;
}
Rtheta2 = Rtheta2*PI/180;
if ( Rtheta2 <= PI/2 )
{
x_ori2 = 0;
y_ori2 = w2 * sin(Rtheta2) / t_im2_1;
}
else
{
x_ori2 = -w2 * cos(Rtheta2) / t_im2_2;
y_ori2 = ( w2 * sin(Rtheta2) + h2 * sin(Rtheta2-PI/2) ) / t_im2_1;
}
float sin_Rtheta = sin(Rtheta);
float cos_Rtheta = cos(Rtheta);
float sin_Rtheta2 = sin(Rtheta2);
float cos_Rtheta2 = cos(Rtheta2);
x1 = matching1.first.x;
y1 = matching1.first.y;
x2 = matching1.second.x;
y2 = matching1.second.y;
/* project the coordinates of im1 to original image before tilt-rotation transform */
/* Get the coordinates with respect to the 'origin' of the original image before transform */
x1 = x1 - x_ori;
y1 = y1 - y_ori;
/* Invert tilt */
x1 = x1 * t2;
y1 = y1 * t1;
/* Invert rotation (Note that the y direction (vertical) is inverse to the usual concention. Hence Rtheta instead of -Rtheta to inverse the rotation.) */
x_tmp = cos_Rtheta*x1 - sin_Rtheta*y1;
y_tmp = sin_Rtheta*x1 + cos_Rtheta*y1;
x1 = x_tmp;
y1 = y_tmp;
/* Coordinate projection on image2 */
/* Get the coordinates with respect to the 'origin' of the original image before transform */
x2 = x2 - x_ori2;
y2 = y2 - y_ori2;
/* Invert tilt */
x2 = x2 * t_im2_2;
y2 = y2 * t_im2_1;
/* Invert rotation (Note that the y direction (vertical) is inverse to the usual concention. Hence Rtheta instead of -Rtheta to inverse the rotation.) */
x_tmp = cos_Rtheta2*x2 - sin_Rtheta2*y2;
y_tmp = sin_Rtheta2*x2 + cos_Rtheta2*y2;
x2 = x_tmp;
y2 = y_tmp;
matching1.first.x = x1;
matching1.first.y = y1;
matching1.second.x = x2;
matching1.second.y = y2;
}
int compute_asift_matches(int num_of_tilts1, int num_of_tilts2, int w1, int h1, int w2, int h2, int verb, vector< vector< keypointslist > >& keys1, vector< vector< keypointslist > >& keys2, matchingslist &matchings, siftPar &siftparameters)
// Match the ASIFT keypoints.
// Input:
// num_of_tilts1, num_of_tilts2: number of tilts that have been simulated on the two images. (They can be different.)
// w1, h1, w2, h2: widht/height of image1/image2.
// verb: 1/0 --> show/don not show verbose messages. (1 for debugging)
// keys1, keys2: ASIFT keypoints of image1/image2. (They should be calculated with compute_asift_keypoints.)
// matchings (output): the coordinates (col1, row1, col2, row2) of all the matching points.
//
// Output: the number of matching points.
{
float t_min, t_k, t;
int num_tilt1, num_tilt2, tt, num_rot_t2, num_rot1, rr;
int cc;
int tt2, rr2, num_rot1_2;
float t_im2;
/* It stores the coordinates of ALL matches points of ALL affine simulations */
vector< vector <float> > Minfoall;
int Tmin = 8;
float nfa_max = -2;
num_rot_t2 = 10;
t_min = 1;
t_k = sqrt(2.);
num_tilt1 = num_of_tilts1;
num_tilt2 = num_of_tilts2;
if ( ( num_tilt1 < 1 ) || ( num_tilt2 < 1 ) )
{
printf("Number of tilts num_tilt should be equal or larger than 1. \n");
exit(-1);
}
/* Initialize the vector structure for the matching points */
std::vector< vector< vector < vector < matchingslist > > > > matchings_vec(num_tilt1);
std::vector< vector< vector< vector< vector< vector <float> > > > > > Minfoall_vec(num_tilt1);
for (tt = 1; tt <= num_tilt1; tt++)
{
t = t_min * pow(t_k, tt-1);
if ( t == 1 )
{
num_rot1 = 1;
}
else
{
num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
}
matchings_vec[tt-1].resize(num_rot1);
Minfoall_vec[tt-1].resize(num_rot1);
for ( rr = 1; rr <= num_rot1; rr++ )
{
matchings_vec[tt-1][rr-1].resize(num_tilt2);
Minfoall_vec[tt-1][rr-1].resize(num_tilt2);
for (tt2 = 1; tt2 <= num_tilt2; tt2++)
{
t_im2 = t_min * pow(t_k, tt2-1);
if ( t_im2 == 1 )
{
num_rot1_2 = 1;
}
else
{
num_rot1_2 = round(num_rot_t2*t_im2/2);
if ( num_rot1_2%2 == 1 )
{
num_rot1_2 = num_rot1_2 + 1;
}
num_rot1_2 = num_rot1_2 / 2;
}
matchings_vec[tt-1][rr-1][tt2-1].resize(num_rot1_2);
Minfoall_vec[tt-1][rr-1][tt2-1].resize(num_rot1_2);
}
}
}
///*
// * setup the tilt and rotation parameters
// * for all the loops, this vector will hold
// * the following parameters:
// * tt, num_rot1, rr, tt2, num_rot1_2, rr2
// */
//vector<int> tilt_rot;
///* loop on tilts for image 1 */
//for (int tt = 1; tt <= num_tilt1; tt++)
//{
// float t = t_min * pow(t_k, tt-1);
// int num_rot1;
// /* if tilt t = 1, do not simulate rotation. */
// if ( 1 == tt )
// num_rot1 = 1;
// else
// {
// /* number of rotations to simulate */
// num_rot1 = round(num_rot_t2 * t / 2);
// if ( num_rot1%2 == 1 )
// num_rot1 = num_rot1 + 1;
// num_rot1 = num_rot1 / 2;
// }
// /* loop on rotations for image 1 */
// for (int rr = 1; rr <= num_rot1; rr++ )
// {
// /* loop on tilts for image 2 */
// for (int tt2 = 1; tt2 <= num_tilt2; tt2++)
// {
// float t_im2 = t_min * pow(t_k, tt2-1);
// int num_rot1_2;
// if ( tt2 == 1 )
// num_rot1_2 = 1;
// else
// {
// num_rot1_2 = round(num_rot_t2 * t_im2 / 2);
// if ( num_rot1_2%2 == 1 )
// num_rot1_2 = num_rot1_2 + 1;
// num_rot1_2 = num_rot1_2 / 2;
// }
// /* loop on rotations for image 2 */
// for (int rr2 = 1; rr2 <= num_rot1_2; rr2++ )
// {
// tilt_rot.push_back(tt);
// tilt_rot.push_back(num_rot1);
// tilt_rot.push_back(rr);
// tilt_rot.push_back(tt2);
// tilt_rot.push_back(num_rot1_2);
// tilt_rot.push_back(rr2);
// }
// }
// }
//}
/* Calculate the number of simulations */
#ifdef _OPENMP
omp_set_nested(1);
#endif
// loop on tilts for image 1.
#pragma omp parallel for private(tt)
for (int tt = 1; tt <= num_tilt1; tt++)
{
float t = t_min * pow(t_k, tt-1);
/* Attention: the t1, t2 do not follow the same convention as in compute_asift_keypoints */
float t1 = t;
float t2 = 1;
int num_rot1;
// If tilt t = 1, do not simulate rotation.
if ( tt == 1 )
{
num_rot1 = 1;
}
else
{
// The number of rotations to simulate under the current tilt.
num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
}
float delta_theta = PI/num_rot1;
// Loop on rotations for image 1.
#pragma omp parallel for private(rr)
for ( int rr = 1; rr <= num_rot1; rr++ )
{
float theta = delta_theta * (rr-1);
theta = theta * 180 / PI;
/* Read the keypoints of image 1 */
keypointslist keypoints1 = keys1[tt-1][rr-1];
// loop on tilts for image 2.
#pragma omp parallel for private(tt2)
for (int tt2 = 1; tt2 <= num_tilt2; tt2++)
{
float t_im2 = t_min * pow(t_k, tt2-1);
/* Attention: the t1, t2 do not follow the same convention as in asift_v1.c */
float t_im2_1 = t_im2;
float t_im2_2 = 1;
int num_rot1_2;
if ( tt2 == 1 )
{
num_rot1_2 = 1;
}
else
{
num_rot1_2 = round(num_rot_t2*t_im2/2);
if ( num_rot1_2%2 == 1 )
{
num_rot1_2 = num_rot1_2 + 1;
}
num_rot1_2 = num_rot1_2 / 2;
}
float delta_theta2 = PI/num_rot1_2;
#pragma omp parallel for private(rr2)
// Loop on rotations for image 2.
for ( int rr2 = 1; rr2 <= num_rot1_2; rr2++ )
{
float theta2 = delta_theta2 * (rr2-1);
theta2 = theta2 * 180 / PI;
/* Read the keypoints of image2. */
keypointslist keypoints2 = keys2[tt2-1][rr2-1];
// Match the keypoints of image1 and image2.
matchingslist matchings1;
compute_sift_matches(keypoints1,keypoints2,matchings1,siftparameters);
if ( verb )
{
printf("t1=%.2f, theta1=%.2f, num keys1 = %d, t2=%.2f, theta2=%.2f, num keys2 = %d, num matches=%d\n", t, theta, (int) keypoints1.size(), t_im2, theta2, (int) keypoints2.size(), (int) matchings1.size());
}
/* Store the matches */
if ( matchings1.size() > 0 )
{
matchings_vec[tt-1][rr-1][tt2-1][rr2-1] = matchingslist(matchings1.size());
Minfoall_vec[tt-1][rr-1][tt2-1][rr2-1].resize(matchings1.size());
for ( int cc = 0; cc < (int) matchings1.size(); cc++ )
{
///// In the coordinates the affine transformations have been normalized already in compute_asift_keypoints. So no need to normalize here.
// Normalize the coordinates of the matched points by compensating the simulate affine transformations
// compensate_affine_coor(matchings1[cc], w1, h1, w2, h2, t1, t2, theta, t_im2_1, t_im2_2, theta2);
matchings_vec[tt-1][rr-1][tt2-1][rr2-1][cc] = matchings1[cc];
vector<float> Minfo_1match(6);
Minfo_1match[0] = t1;
Minfo_1match[1] = t2;
Minfo_1match[2] = theta;
Minfo_1match[3] = t_im2_1;
Minfo_1match[4] = t_im2_2;
Minfo_1match[5] = theta2;
Minfoall_vec[tt-1][rr-1][tt2-1][rr2-1][cc] = Minfo_1match;
}
}
}
}
}
}
// Move the matches to a 1D vector
for (tt = 1; tt <= num_tilt1; tt++)
{
t = t_min * pow(t_k, tt-1);
if ( t == 1 )
{
num_rot1 = 1;
}
else
{
num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
}
for ( rr = 1; rr <= num_rot1; rr++ )
{
for (tt2 = 1; tt2 <= num_tilt2; tt2++)
{
t_im2 = t_min * pow(t_k, tt2-1);
if ( t_im2 == 1 )
{
num_rot1_2 = 1;
}
else
{
num_rot1_2 = round(num_rot_t2*t_im2/2);
if ( num_rot1_2%2 == 1 )
{
num_rot1_2 = num_rot1_2 + 1;
}
num_rot1_2 = num_rot1_2 / 2;
}
for ( rr2 = 1; rr2 <= num_rot1_2; rr2++ )
{
for ( cc=0; cc < (int) matchings_vec[tt-1][rr-1][tt2-1][rr2-1].size(); cc++ )
{
matchings.push_back(matchings_vec[tt-1][rr-1][tt2-1][rr2-1][cc]);
Minfoall.push_back(Minfoall_vec[tt-1][rr-1][tt2-1][rr2-1][cc]);
}
}
}
}
}
if ( verb )
{
printf("The number of matches is %d \n", (int) matchings.size());
}
if ( matchings.size() > 0 )
{
/* Remove the repetitive matches that appear in different simulations and retain only one. */
// Since tilts are simuated on both image 1 and image 2, it is normal to have repetitive matches.
matchingslist matchings_unique;
vector< vector<float> > Minfoall_unique;
unique_match1(matchings, matchings_unique, Minfoall, Minfoall_unique);
matchings = matchings_unique;
Minfoall = Minfoall_unique;
if ( verb )
{
printf("The number of unique matches is %d \n", (int) matchings.size());
}
// There often appear to be some one-to-multiple/multiple-to-one matches (one point in image 1 matches with many points in image 2/vice versa).
// This is an artifact of SIFT on interpolated images, as the interpolation tends to create some auto-similar structures (steps for example).
// These matches need to be removed.
/* Separating the removal of multiple-to-one and one-to-multiple in two steps:
- first remove multiple-to-one
- then remove one-to-multiple
This allows to avoid removing some good matches: multiple-to-one matches is much more frequent than one-to-multiple. Sometimes some of the feature points in image 1 that take part in "multiple-to-one" bad matches have also correct matches in image 2. The modified scheme avoid removing these good matches. */
// Remove to multiple-to-one matches
matchings_unique.clear();
Minfoall_unique.clear();
clean_match2(matchings, matchings_unique, Minfoall, Minfoall_unique);
matchings = matchings_unique;
Minfoall = Minfoall_unique;
// Remove to one-to-multiple matches
matchings_unique.clear();
Minfoall_unique.clear();
clean_match1(matchings, matchings_unique, Minfoall, Minfoall_unique);
matchings = matchings_unique;
Minfoall = Minfoall_unique;
if ( verb )
{
printf("The number of final matches is %d \n", (int) matchings.size());
}
// If enough matches to do epipolar filtering
if ( (int) matchings.size() >= Tmin )
{
//////// Use ORSA to filter out the incorrect matches.
// store the coordinates of the matching points
vector<Match> match_coor;
for ( cc = 0; cc < (int) matchings.size(); cc++ )
{
Match match1_coor;
match1_coor.x1 = matchings[cc].first.x;
match1_coor.y1 = matchings[cc].first.y;
match1_coor.x2 = matchings[cc].second.x;
match1_coor.y2 = matchings[cc].second.y;
match_coor.push_back(match1_coor);
}
std::vector<float> index;
// Guoshen Yu, 2010.09.23
// index.clear();
int t_value_orsa=10000;
int verb_value_orsa=0;
int n_flag_value_orsa=0;
int mode_value_orsa=2;
int stop_value_orsa=0;
// epipolar filtering with the Moisan-Stival ORSA algorithm.
// float nfa = orsa(w1, h1, match_coor, index, t_value_orsa, verb_value_orsa, n_flag_value_orsa, mode_value_orsa, stop_value_orsa);
float nfa = orsa((w1+w2)/2, (h1+h2)/2, match_coor, index, t_value_orsa, verb_value_orsa, n_flag_value_orsa, mode_value_orsa, stop_value_orsa);
// if the matching is significant, register the good matches
if ( nfa < nfa_max )
{
// extract meaningful matches
matchings_unique.clear();
Minfoall_unique.clear();
for ( cc = 0; cc < (int) index.size(); cc++ )
{
matchings_unique.push_back(matchings[(int)index[cc]]);
Minfoall_unique.push_back(Minfoall[(int)index[cc]]);
}
matchings = matchings_unique;
Minfoall = Minfoall_unique;
cout << "The two images match! " << matchings.size() << " matchings are identified. log(nfa)=" << nfa << "." << endl;
}
else
{
matchings.clear();
Minfoall.clear();
cout << "The two images do not match. The matching is not significant: log(nfa)=" << nfa << "." << endl;
}
}
else
{
matchings.clear();
Minfoall.clear();
cout << "The two images do not match. Not enough matches to do epipolar filtering." << endl;
}
}
else
{
cout << "The two images do not match.\n" << endl;
}
return matchings.size();
}

View file

@ -0,0 +1,784 @@
// Copyright (c) 2008-2011, Guoshen Yu <yu@cmap.polytechnique.fr>
// Copyright (c) 2008-2011, Jean-Michel Morel <morel@cmla.ens-cachan.fr>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*------------------------ compute_asift_matches-- -------------------------*/
// Match the ASIFT keypoints.
//
// Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "compute_asift_matches.h"
#include "libMatch/match.h"
#include "orsa.h"
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
/* Remove the repetitive matches that appear in different simulations and retain only one */
void unique_match1(matchingslist &seg_in, matchingslist &seg_out, vector< vector <float> > &Minfoall_in, vector< vector <float> > &Minfoall_out)
{
int i_in, i_out;
float x1_in, x2_in, y1_in, y2_in, x1_out, x2_out, y1_out, y2_out;
int flag_unique;
float d1, d2;
int Th2 = 2;
seg_out.push_back(seg_in[0]);
Minfoall_out.push_back(Minfoall_in[0]);
/* For other matches */
if ( seg_in.size() > 1 )
{
/* check if a match is unique. if yes, copy */
matchingslist::iterator ptr_in = seg_in.begin();
for ( i_in = 1; i_in < (int) seg_in.size(); i_in++, ptr_in++ )
{
x1_in = ptr_in->first.x;
y1_in = ptr_in->first.y;
x2_in = ptr_in->second.x;
y2_in = ptr_in->second.y;
flag_unique = 1;
matchingslist::iterator ptr_out = seg_out.begin();
for ( i_out = 0; i_out < (int) seg_out.size(); i_out++, ptr_out++ )
{
x1_out = ptr_out->first.x;
y1_out = ptr_out->first.y;
x2_out = ptr_out->second.x;
y2_out = ptr_out->second.y;
d1 = (x1_in - x1_out)*(x1_in - x1_out) + (y1_in - y1_out)*(y1_in - y1_out);
d2 = (x2_in - x2_out)*(x2_in - x2_out) + (y2_in - y2_out)*(y2_in - y2_out);
if ( ( d1 <= Th2) && ( d2 <= Th2) )
{
flag_unique = 0;
continue;
}
}
if ( flag_unique == 1 )
{
seg_out.push_back(seg_in[i_in]);
Minfoall_out.push_back(Minfoall_in[i_in]);
}
}
}
}
/* Remove the ALL one-to-multiple matches. */
void clean_match1(matchingslist &seg_in, matchingslist &seg_out, vector< vector <float> > &Minfoall_in, vector< vector <float> > &Minfoall_out)
{
int i1, i2;
float x1_in, x2_in, y1_in, y2_in, x1_out, x2_out, y1_out, y2_out;
// Guoshen Yu, 2010.09.22, Windows version
// int flag_unique[seg_in.size()];
int tmp_size = seg_in.size();
int *flag_unique = new int[tmp_size];
int sum_flag=0;
float d1, d2;
int Th1 = 1;
int Th2 = 4;
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
flag_unique[i1] = 1;
}
/* Set the flag of redundant matches to 0. */
matchingslist::iterator ptr_in = seg_in.begin();
for ( i1 = 0; i1 < (int) seg_in.size() - 1; i1++, ptr_in++ )
{
x1_in = ptr_in->first.x;
y1_in = ptr_in->first.y;
x2_in = ptr_in->second.x;
y2_in = ptr_in->second.y;
matchingslist::iterator ptr_out = ptr_in+1;
for ( i2 = i1 + 1; i2 < (int) seg_in.size(); i2++, ptr_out++ )
{
x1_out = ptr_out->first.x;
y1_out = ptr_out->first.y;
x2_out = ptr_out->second.x;
y2_out = ptr_out->second.y;
d1 = (x1_in - x1_out)*(x1_in - x1_out) + (y1_in - y1_out)*(y1_in - y1_out);
d2 = (x2_in - x2_out)*(x2_in - x2_out) + (y2_in - y2_out)*(y2_in - y2_out);
/* If redundant, set flags of both elements to 0.*/
if ( ( ( d1 <= Th1) && ( d2 > Th2) ) || ( ( d1 > Th2) && ( d2 <= Th1) ) )
{
flag_unique[i1] = 0;
flag_unique[i2] = 0;
}
}
}
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
sum_flag += flag_unique[i1];
}
/* Copy the matches that are not redundant */
if ( sum_flag > 0 )
{
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
if ( flag_unique[i1] == 1 )
{
seg_out.push_back(seg_in[i1]);
Minfoall_out.push_back(Minfoall_in[i1]);
}
}
}
else
{
printf("Warning: all matches are redundant and are thus removed! This step of match cleaning is short circuited. (Normally this should not happen...)\n");
}
// Guoshen Yu, 2010.09.22, Windows version
delete [] flag_unique;
}
/* Remove the ALL multiple-to-one matches */
void clean_match2(matchingslist &seg_in, matchingslist &seg_out, vector< vector <float> > &Minfoall_in, vector< vector <float> > &Minfoall_out)
{
int i1, i2;
float x1_in, x2_in, y1_in, y2_in, x1_out, x2_out, y1_out, y2_out;
// Guoshen Yu, 2010.09.22, Windows version
// int flag_unique[seg_in.size()];
int tmp_size = seg_in.size();
int *flag_unique = new int[tmp_size];
int sum_flag=0;
float d1, d2;
int Th1 = 1;
int Th2 = 4;
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
flag_unique[i1] = 1;
}
/* Set the flag of redundant matches to 0. */
matchingslist::iterator ptr_in = seg_in.begin();
for ( i1 = 0; i1 < (int) seg_in.size() - 1; i1++, ptr_in++ )
{
x1_in = ptr_in->first.x;
y1_in = ptr_in->first.y;
x2_in = ptr_in->second.x;
y2_in = ptr_in->second.y;
matchingslist::iterator ptr_out = ptr_in+1;
for ( i2 = i1 + 1; i2 < (int) seg_in.size(); i2++, ptr_out++ )
{
x1_out = ptr_out->first.x;
y1_out = ptr_out->first.y;
x2_out = ptr_out->second.x;
y2_out = ptr_out->second.y;
d1 = (x1_in - x1_out)*(x1_in - x1_out) + (y1_in - y1_out)*(y1_in - y1_out);
d2 = (x2_in - x2_out)*(x2_in - x2_out) + (y2_in - y2_out)*(y2_in - y2_out);
/* If redundant, set flags of both elements to 0.*/
if ( ( d1 > Th2) && ( d2 <= Th1) )
{
flag_unique[i1] = 0;
flag_unique[i2] = 0;
}
}
}
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
sum_flag += flag_unique[i1];
}
/* Copy the matches that are not redundant */
if ( sum_flag > 0 )
{
for ( i1 = 0; i1 < (int) seg_in.size(); i1++ )
{
if ( flag_unique[i1] == 1 )
{
seg_out.push_back(seg_in[i1]);
Minfoall_out.push_back(Minfoall_in[i1]);
}
}
}
else
{
printf("Warning: all matches are redundant and are thus removed! This step of match cleaning is short circuited. (Normally this should not happen...)\n");
}
// Guoshen Yu, 2010.09.22, Windows version
delete [] flag_unique;
}
// Normalize the coordinates of the matched points by compensating the simulate affine transformations
void compensate_affine_coor(matching &matching1, int w1, int h1, int w2, int h2, float t1, float t2, float Rtheta, float t_im2_1, float t_im2_2, float Rtheta2)
{
float x_ori, y_ori;
float x_ori2, y_ori2, x_tmp, y_tmp;
float x1, y1, x2, y2;
Rtheta = Rtheta*PI/180;
if ( Rtheta <= PI/2 )
{
x_ori = 0;
y_ori = w1 * sin(Rtheta) / t1;
}
else
{
x_ori = -w1 * cos(Rtheta) / t2;
y_ori = ( w1 * sin(Rtheta) + h1 * sin(Rtheta-PI/2) ) / t1;
}
Rtheta2 = Rtheta2*PI/180;
if ( Rtheta2 <= PI/2 )
{
x_ori2 = 0;
y_ori2 = w2 * sin(Rtheta2) / t_im2_1;
}
else
{
x_ori2 = -w2 * cos(Rtheta2) / t_im2_2;
y_ori2 = ( w2 * sin(Rtheta2) + h2 * sin(Rtheta2-PI/2) ) / t_im2_1;
}
float sin_Rtheta = sin(Rtheta);
float cos_Rtheta = cos(Rtheta);
float sin_Rtheta2 = sin(Rtheta2);
float cos_Rtheta2 = cos(Rtheta2);
x1 = matching1.first.x;
y1 = matching1.first.y;
x2 = matching1.second.x;
y2 = matching1.second.y;
/* project the coordinates of im1 to original image before tilt-rotation transform */
/* Get the coordinates with respect to the 'origin' of the original image before transform */
x1 = x1 - x_ori;
y1 = y1 - y_ori;
/* Invert tilt */
x1 = x1 * t2;
y1 = y1 * t1;
/* Invert rotation (Note that the y direction (vertical) is inverse to the usual concention. Hence Rtheta instead of -Rtheta to inverse the rotation.) */
x_tmp = cos_Rtheta*x1 - sin_Rtheta*y1;
y_tmp = sin_Rtheta*x1 + cos_Rtheta*y1;
x1 = x_tmp;
y1 = y_tmp;
/* Coordinate projection on image2 */
/* Get the coordinates with respect to the 'origin' of the original image before transform */
x2 = x2 - x_ori2;
y2 = y2 - y_ori2;
/* Invert tilt */
x2 = x2 * t_im2_2;
y2 = y2 * t_im2_1;
/* Invert rotation (Note that the y direction (vertical) is inverse to the usual concention. Hence Rtheta instead of -Rtheta to inverse the rotation.) */
x_tmp = cos_Rtheta2*x2 - sin_Rtheta2*y2;
y_tmp = sin_Rtheta2*x2 + cos_Rtheta2*y2;
x2 = x_tmp;
y2 = y_tmp;
matching1.first.x = x1;
matching1.first.y = y1;
matching1.second.x = x2;
matching1.second.y = y2;
}
int compute_asift_matches(int num_of_tilts1, int num_of_tilts2, int w1, int h1, int w2, int h2, int verb, vector< vector< keypointslist > >& keys1, vector< vector< keypointslist > >& keys2, matchingslist &matchings, siftPar &siftparameters)
// Match the ASIFT keypoints.
// Input:
// num_of_tilts1, num_of_tilts2: number of tilts that have been simulated on the two images. (They can be different.)
// w1, h1, w2, h2: widht/height of image1/image2.
// verb: 1/0 --> show/don not show verbose messages. (1 for debugging)
// keys1, keys2: ASIFT keypoints of image1/image2. (They should be calculated with compute_asift_keypoints.)
// matchings (output): the coordinates (col1, row1, col2, row2) of all the matching points.
//
// Output: the number of matching points.
{
float t_min, t_k, t;
int num_tilt1, num_tilt2, tt, num_rot_t2, num_rot1, rr;
int cc;
int tt2, rr2, num_rot1_2;
float t_im2;
/* It stores the coordinates of ALL matches points of ALL affine simulations */
vector< vector <float> > Minfoall;
int Tmin = 8;
float nfa_max = -2;
num_rot_t2 = 10;
t_min = 1;
t_k = sqrt(2.);
num_tilt1 = num_of_tilts1;
num_tilt2 = num_of_tilts2;
if ( ( num_tilt1 < 1 ) || ( num_tilt2 < 1 ) )
{
printf("Number of tilts num_tilt should be equal or larger than 1. \n");
exit(-1);
}
/* Initialize the vector structure for the matching points */
std::vector< vector< vector < vector < matchingslist > > > > matchings_vec(num_tilt1);
std::vector< vector< vector< vector< vector< vector <float> > > > > > Minfoall_vec(num_tilt1);
for (tt = 1; tt <= num_tilt1; tt++)
{
t = t_min * pow(t_k, tt-1);
if ( t == 1 )
{
num_rot1 = 1;
}
else
{
num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
}
matchings_vec[tt-1].resize(num_rot1);
Minfoall_vec[tt-1].resize(num_rot1);
for ( rr = 1; rr <= num_rot1; rr++ )
{
matchings_vec[tt-1][rr-1].resize(num_tilt2);
Minfoall_vec[tt-1][rr-1].resize(num_tilt2);
for (tt2 = 1; tt2 <= num_tilt2; tt2++)
{
t_im2 = t_min * pow(t_k, tt2-1);
if ( t_im2 == 1 )
{
num_rot1_2 = 1;
}
else
{
num_rot1_2 = round(num_rot_t2*t_im2/2);
if ( num_rot1_2%2 == 1 )
{
num_rot1_2 = num_rot1_2 + 1;
}
num_rot1_2 = num_rot1_2 / 2;
}
matchings_vec[tt-1][rr-1][tt2-1].resize(num_rot1_2);
Minfoall_vec[tt-1][rr-1][tt2-1].resize(num_rot1_2);
}
}
}
///*
// * setup the tilt and rotation parameters
// * for all the loops, this vector will hold
// * the following parameters:
// * tt, num_rot1, rr, tt2, num_rot1_2, rr2
// */
//vector<int> tilt_rot;
///* loop on tilts for image 1 */
//for (int tt = 1; tt <= num_tilt1; tt++)
//{
// float t = t_min * pow(t_k, tt-1);
// int num_rot1;
// /* if tilt t = 1, do not simulate rotation. */
// if ( 1 == tt )
// num_rot1 = 1;
// else
// {
// /* number of rotations to simulate */
// num_rot1 = round(num_rot_t2 * t / 2);
// if ( num_rot1%2 == 1 )
// num_rot1 = num_rot1 + 1;
// num_rot1 = num_rot1 / 2;
// }
// /* loop on rotations for image 1 */
// for (int rr = 1; rr <= num_rot1; rr++ )
// {
// /* loop on tilts for image 2 */
// for (int tt2 = 1; tt2 <= num_tilt2; tt2++)
// {
// float t_im2 = t_min * pow(t_k, tt2-1);
// int num_rot1_2;
// if ( tt2 == 1 )
// num_rot1_2 = 1;
// else
// {
// num_rot1_2 = round(num_rot_t2 * t_im2 / 2);
// if ( num_rot1_2%2 == 1 )
// num_rot1_2 = num_rot1_2 + 1;
// num_rot1_2 = num_rot1_2 / 2;
// }
// /* loop on rotations for image 2 */
// for (int rr2 = 1; rr2 <= num_rot1_2; rr2++ )
// {
// tilt_rot.push_back(tt);
// tilt_rot.push_back(num_rot1);
// tilt_rot.push_back(rr);
// tilt_rot.push_back(tt2);
// tilt_rot.push_back(num_rot1_2);
// tilt_rot.push_back(rr2);
// }
// }
// }
//}
/* Calculate the number of simulations */
#ifdef _OPENMP
omp_set_nested(1);
#endif
// loop on tilts for image 1.
#pragma omp parallel for private(tt)
for (int tt = 1; tt <= num_tilt1; tt++)
{
float t = t_min * pow(t_k, tt-1);
/* Attention: the t1, t2 do not follow the same convention as in compute_asift_keypoints */
float t1 = t;
float t2 = 1;
int num_rot1;
// If tilt t = 1, do not simulate rotation.
if ( tt == 1 )
{
num_rot1 = 1;
}
else
{
// The number of rotations to simulate under the current tilt.
num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
}
float delta_theta = PI/num_rot1;
// Loop on rotations for image 1.
#pragma omp parallel for private(rr)
for ( int rr = 1; rr <= num_rot1; rr++ )
{
float theta = delta_theta * (rr-1);
theta = theta * 180 / PI;
/* Read the keypoints of image 1 */
keypointslist keypoints1 = keys1[tt-1][rr-1];
// loop on tilts for image 2.
#pragma omp parallel for private(tt2)
for (int tt2 = 1; tt2 <= num_tilt2; tt2++)
{
float t_im2 = t_min * pow(t_k, tt2-1);
/* Attention: the t1, t2 do not follow the same convention as in asift_v1.c */
float t_im2_1 = t_im2;
float t_im2_2 = 1;
int num_rot1_2;
if ( tt2 == 1 )
{
num_rot1_2 = 1;
}
else
{
num_rot1_2 = round(num_rot_t2*t_im2/2);
if ( num_rot1_2%2 == 1 )
{
num_rot1_2 = num_rot1_2 + 1;
}
num_rot1_2 = num_rot1_2 / 2;
}
float delta_theta2 = PI/num_rot1_2;
#pragma omp parallel for private(rr2)
// Loop on rotations for image 2.
for ( int rr2 = 1; rr2 <= num_rot1_2; rr2++ )
{
float theta2 = delta_theta2 * (rr2-1);
theta2 = theta2 * 180 / PI;
/* Read the keypoints of image2. */
keypointslist keypoints2 = keys2[tt2-1][rr2-1];
// Match the keypoints of image1 and image2.
matchingslist matchings1;
compute_sift_matches(keypoints1,keypoints2,matchings1,siftparameters);
if ( verb )
{
printf("t1=%.2f, theta1=%.2f, num keys1 = %d, t2=%.2f, theta2=%.2f, num keys2 = %d, num matches=%d\n", t, theta, (int) keypoints1.size(), t_im2, theta2, (int) keypoints2.size(), (int) matchings1.size());
}
/* Store the matches */
if ( matchings1.size() > 0 )
{
matchings_vec[tt-1][rr-1][tt2-1][rr2-1] = matchingslist(matchings1.size());
Minfoall_vec[tt-1][rr-1][tt2-1][rr2-1].resize(matchings1.size());
for ( int cc = 0; cc < (int) matchings1.size(); cc++ )
{
///// In the coordinates the affine transformations have been normalized already in compute_asift_keypoints. So no need to normalize here.
// Normalize the coordinates of the matched points by compensating the simulate affine transformations
// compensate_affine_coor(matchings1[cc], w1, h1, w2, h2, t1, t2, theta, t_im2_1, t_im2_2, theta2);
matchings_vec[tt-1][rr-1][tt2-1][rr2-1][cc] = matchings1[cc];
vector<float> Minfo_1match(6);
Minfo_1match[0] = t1;
Minfo_1match[1] = t2;
Minfo_1match[2] = theta;
Minfo_1match[3] = t_im2_1;
Minfo_1match[4] = t_im2_2;
Minfo_1match[5] = theta2;
Minfoall_vec[tt-1][rr-1][tt2-1][rr2-1][cc] = Minfo_1match;
}
}
}
}
}
}
// Move the matches to a 1D vector
for (tt = 1; tt <= num_tilt1; tt++)
{
t = t_min * pow(t_k, tt-1);
if ( t == 1 )
{
num_rot1 = 1;
}
else
{
num_rot1 = round(num_rot_t2*t/2);
if ( num_rot1%2 == 1 )
{
num_rot1 = num_rot1 + 1;
}
num_rot1 = num_rot1 / 2;
}
for ( rr = 1; rr <= num_rot1; rr++ )
{
for (tt2 = 1; tt2 <= num_tilt2; tt2++)
{
t_im2 = t_min * pow(t_k, tt2-1);
if ( t_im2 == 1 )
{
num_rot1_2 = 1;
}
else
{
num_rot1_2 = round(num_rot_t2*t_im2/2);
if ( num_rot1_2%2 == 1 )
{
num_rot1_2 = num_rot1_2 + 1;
}
num_rot1_2 = num_rot1_2 / 2;
}
for ( rr2 = 1; rr2 <= num_rot1_2; rr2++ )
{
for ( cc=0; cc < (int) matchings_vec[tt-1][rr-1][tt2-1][rr2-1].size(); cc++ )
{
matchings.push_back(matchings_vec[tt-1][rr-1][tt2-1][rr2-1][cc]);
Minfoall.push_back(Minfoall_vec[tt-1][rr-1][tt2-1][rr2-1][cc]);
}
}
}
}
}
if ( verb )
{
printf("The number of matches is %d \n", (int) matchings.size());
}
if ( matchings.size() > 0 )
{
/* Remove the repetitive matches that appear in different simulations and retain only one. */
// Since tilts are simuated on both image 1 and image 2, it is normal to have repetitive matches.
matchingslist matchings_unique;
vector< vector<float> > Minfoall_unique;
unique_match1(matchings, matchings_unique, Minfoall, Minfoall_unique);
matchings = matchings_unique;
Minfoall = Minfoall_unique;
if ( verb )
{
printf("The number of unique matches is %d \n", (int) matchings.size());
}
// There often appear to be some one-to-multiple/multiple-to-one matches (one point in image 1 matches with many points in image 2/vice versa).
// This is an artifact of SIFT on interpolated images, as the interpolation tends to create some auto-similar structures (steps for example).
// These matches need to be removed.
/* Separating the removal of multiple-to-one and one-to-multiple in two steps:
- first remove multiple-to-one
- then remove one-to-multiple
This allows to avoid removing some good matches: multiple-to-one matches is much more frequent than one-to-multiple. Sometimes some of the feature points in image 1 that take part in "multiple-to-one" bad matches have also correct matches in image 2. The modified scheme avoid removing these good matches. */
// Remove to multiple-to-one matches
matchings_unique.clear();
Minfoall_unique.clear();
clean_match2(matchings, matchings_unique, Minfoall, Minfoall_unique);
matchings = matchings_unique;
Minfoall = Minfoall_unique;
// Remove to one-to-multiple matches
matchings_unique.clear();
Minfoall_unique.clear();
clean_match1(matchings, matchings_unique, Minfoall, Minfoall_unique);
matchings = matchings_unique;
Minfoall = Minfoall_unique;
if ( verb )
{
printf("The number of final matches is %d \n", (int) matchings.size());
}
// If enough matches to do epipolar filtering
if ( (int) matchings.size() >= Tmin )
{
//////// Use ORSA to filter out the incorrect matches.
// store the coordinates of the matching points
vector<Match> match_coor;
for ( cc = 0; cc < (int) matchings.size(); cc++ )
{
Match match1_coor;
match1_coor.x1 = matchings[cc].first.x;
match1_coor.y1 = matchings[cc].first.y;
match1_coor.x2 = matchings[cc].second.x;
match1_coor.y2 = matchings[cc].second.y;
match_coor.push_back(match1_coor);
}
std::vector<float> index;
// Guoshen Yu, 2010.09.23
// index.clear();
int t_value_orsa=10000;
int verb_value_orsa=0;
int n_flag_value_orsa=0;
int mode_value_orsa=2;
int stop_value_orsa=0;
// epipolar filtering with the Moisan-Stival ORSA algorithm.
// float nfa = orsa(w1, h1, match_coor, index, t_value_orsa, verb_value_orsa, n_flag_value_orsa, mode_value_orsa, stop_value_orsa);
float nfa = orsa((w1+w2)/2, (h1+h2)/2, match_coor, index, t_value_orsa, verb_value_orsa, n_flag_value_orsa, mode_value_orsa, stop_value_orsa);
// if the matching is significant, register the good matches
if ( nfa < nfa_max )
{
// extract meaningful matches
matchings_unique.clear();
Minfoall_unique.clear();
for ( cc = 0; cc < (int) index.size(); cc++ )
{
matchings_unique.push_back(matchings[(int)index[cc]]);
Minfoall_unique.push_back(Minfoall[(int)index[cc]]);
}
matchings = matchings_unique;
Minfoall = Minfoall_unique;
cout << "The two images match! " << matchings.size() << " matchings are identified. log(nfa)=" << nfa << "." << endl;
}
else
{
matchings.clear();
Minfoall.clear();
cout << "The two images do not match. The matching is not significant: log(nfa)=" << nfa << "." << endl;
}
}
else
{
matchings.clear();
Minfoall.clear();
cout << "The two images do not match. Not enough matches to do epipolar filtering." << endl;
}
}
else
{
cout << "The two images do not match.\n" << endl;
}
return matchings.size();
}

View file

@ -0,0 +1,51 @@
// Copyright (c) 2008-2011, Guoshen Yu <yu@cmap.polytechnique.fr>
// Copyright (c) 2008-2011, Jean-Michel Morel <morel@cmla.ens-cachan.fr>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*------------------------ compute_asift_matches-- -------------------------*/
// Match the ASIFT keypoints.
//
// Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include "library.h"
#include "demo_lib_sift.h"
#include "frot.h"
#include "fproj.h"
#include <vector>
using namespace std;
int compute_asift_matches(int num_of_tilts1, int num_of_tilts2, int w1, int h1, int w2, int h2, int verb, vector< vector< keypointslist > >& keys1, vector< vector< keypointslist > >& keys2, matchingslist &matchings, siftPar &siftparameters);

View file

@ -0,0 +1,404 @@
// Copyright (c) 2008-2011, Guoshen Yu <yu@cmap.polytechnique.fr>
// Copyright (c) 2008-2011, Jean-Michel Morel <morel@cmla.ens-cachan.fr>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*----------------------------- demo_ASIFT --------------------------------*/
// Detect corresponding points in two images with the ASIFT method.
// Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <vector>
using namespace std;
#ifdef _OPENMP
#include <omp.h>
#endif
#include "demo_lib_sift.h"
#include "io_png/io_png.h"
#include "library.h"
#include "frot.h"
#include "fproj.h"
#include "compute_asift_keypoints.h"
#include "compute_asift_matches.h"
# define IM_X 800
# define IM_Y 600
int main(int argc, char **argv)
{
if ((argc != 8) && (argc != 9)) {
std::cerr << " ******************************************************************************* " << std::endl
<< " *************************** ASIFT image matching **************************** " << std::endl
<< " ******************************************************************************* " << std::endl
<< "Usage: " << argv[0] << " imgIn1.png imgIn2.png imgOutVert.png imgOutHori.png " << std::endl
<< " matchings.txt keys1.txt keys2.txt [Resize option: 0/1] " << std::endl
<< "- imgIn1.png, imgIn2.png: input images (in PNG format). " << std::endl
<< "- imgOutVert.png, imgOutHori.png: output images (vertical/horizontal concatenated, " << std::endl
<< " in PNG format.) The detected matchings are connected by write lines." << std::endl
<< "- matchings.txt: coordinates of matched points (col1, row1, col2, row2). " << std::endl
<< "- keys1.txt keys2.txt: ASIFT keypoints of the two images." << std::endl
<< "- [optional 0/1]. 1: input images resize to 800x600 (default). 0: no resize. " << std::endl
<< " ******************************************************************************* " << std::endl
<< " ********************* Jean-Michel Morel, Guoshen Yu, 2010 ******************** " << std::endl
<< " ******************************************************************************* " << std::endl;
return 1;
}
//////////////////////////////////////////////// Input
// Read image1
float * iarr1;
size_t w1, h1;
if (NULL == (iarr1 = read_png_f32_gray(argv[1], &w1, &h1))) {
std::cerr << "Unable to load image file " << argv[1] << std::endl;
return 1;
}
std::vector<float> ipixels1(iarr1, iarr1 + w1 * h1);
free(iarr1); /*memcheck*/
// Read image2
float * iarr2;
size_t w2, h2;
if (NULL == (iarr2 = read_png_f32_gray(argv[2], &w2, &h2))) {
std::cerr << "Unable to load image file " << argv[2] << std::endl;
return 1;
}
std::vector<float> ipixels2(iarr2, iarr2 + w2 * h2);
free(iarr2); /*memcheck*/
///// Resize the images to area wS*hW in remaining the apsect-ratio
///// Resize if the resize flag is not set or if the flag is set unequal to 0
float wS = IM_X;
float hS = IM_Y;
float zoom1=0, zoom2=0;
int wS1=0, hS1=0, wS2=0, hS2=0;
vector<float> ipixels1_zoom, ipixels2_zoom;
int flag_resize = 1;
if (argc == 9)
{
flag_resize = atoi(argv[8]);
}
if ((argc == 8) || (flag_resize != 0))
{
cout << "WARNING: The input images are resized to " << wS << "x" << hS << " for ASIFT. " << endl
<< " But the results will be normalized to the original image size." << endl << endl;
float InitSigma_aa = 1.6;
float fproj_p, fproj_bg;
char fproj_i;
float *fproj_x4, *fproj_y4;
int fproj_o;
fproj_o = 3;
fproj_p = 0;
fproj_i = 0;
fproj_bg = 0;
fproj_x4 = 0;
fproj_y4 = 0;
float areaS = wS * hS;
// Resize image 1
float area1 = w1 * h1;
zoom1 = sqrt(area1/areaS);
wS1 = (int) (w1 / zoom1);
hS1 = (int) (h1 / zoom1);
int fproj_sx = wS1;
int fproj_sy = hS1;
float fproj_x1 = 0;
float fproj_y1 = 0;
float fproj_x2 = wS1;
float fproj_y2 = 0;
float fproj_x3 = 0;
float fproj_y3 = hS1;
/* Anti-aliasing filtering along vertical direction */
if ( zoom1 > 1 )
{
float sigma_aa = InitSigma_aa * zoom1 / 2;
GaussianBlur1D(ipixels1,w1,h1,sigma_aa,1);
GaussianBlur1D(ipixels1,w1,h1,sigma_aa,0);
}
// simulate a tilt: subsample the image along the vertical axis by a factor of t.
ipixels1_zoom.resize(wS1*hS1);
fproj (ipixels1, ipixels1_zoom, w1, h1, &fproj_sx, &fproj_sy, &fproj_bg, &fproj_o, &fproj_p,
&fproj_i , fproj_x1 , fproj_y1 , fproj_x2 , fproj_y2 , fproj_x3 , fproj_y3, fproj_x4, fproj_y4);
// Resize image 2
float area2 = w2 * h2;
zoom2 = sqrt(area2/areaS);
wS2 = (int) (w2 / zoom2);
hS2 = (int) (h2 / zoom2);
fproj_sx = wS2;
fproj_sy = hS2;
fproj_x2 = wS2;
fproj_y3 = hS2;
/* Anti-aliasing filtering along vertical direction */
if ( zoom1 > 1 )
{
float sigma_aa = InitSigma_aa * zoom2 / 2;
GaussianBlur1D(ipixels2,w2,h2,sigma_aa,1);
GaussianBlur1D(ipixels2,w2,h2,sigma_aa,0);
}
// simulate a tilt: subsample the image along the vertical axis by a factor of t.
ipixels2_zoom.resize(wS2*hS2);
fproj (ipixels2, ipixels2_zoom, w2, h2, &fproj_sx, &fproj_sy, &fproj_bg, &fproj_o, &fproj_p,
&fproj_i , fproj_x1 , fproj_y1 , fproj_x2 , fproj_y2 , fproj_x3 , fproj_y3, fproj_x4, fproj_y4);
}
else
{
ipixels1_zoom.resize(w1*h1);
ipixels1_zoom = ipixels1;
wS1 = w1;
hS1 = h1;
zoom1 = 1;
ipixels2_zoom.resize(w2*h2);
ipixels2_zoom = ipixels2;
wS2 = w2;
hS2 = h2;
zoom2 = 1;
}
///// Compute ASIFT keypoints
// number N of tilts to simulate t = 1, \sqrt{2}, (\sqrt{2})^2, ..., {\sqrt{2}}^(N-1)
int num_of_tilts1 = 7;
int num_of_tilts2 = 7;
// int num_of_tilts1 = 1;
// int num_of_tilts2 = 1;
int verb = 0;
// Define the SIFT parameters
siftPar siftparameters;
default_sift_parameters(siftparameters);
vector< vector< keypointslist > > keys1;
vector< vector< keypointslist > > keys2;
int num_keys1=0, num_keys2=0;
cout << "Computing keypoints on the two images..." << endl;
time_t tstart, tend;
tstart = time(0);
num_keys1 = compute_asift_keypoints(ipixels1_zoom, wS1, hS1, num_of_tilts1, verb, keys1, siftparameters);
num_keys2 = compute_asift_keypoints(ipixels2_zoom, wS2, hS2, num_of_tilts2, verb, keys2, siftparameters);
tend = time(0);
cout << "Keypoints computation accomplished in " << difftime(tend, tstart) << " seconds." << endl;
//// Match ASIFT keypoints
int num_matchings;
matchingslist matchings;
cout << "Matching the keypoints..." << endl;
tstart = time(0);
num_matchings = compute_asift_matches(num_of_tilts1, num_of_tilts2, wS1, hS1, wS2,
hS2, verb, keys1, keys2, matchings, siftparameters);
tend = time(0);
cout << "Keypoints matching accomplished in " << difftime(tend, tstart) << " seconds." << endl;
///////////////// Output image containing line matches (the two images are concatenated one above the other)
int band_w = 20; // insert a black band of width band_w between the two images for better visibility
int wo = MAX(w1,w2);
int ho = h1+h2+band_w;
float *opixelsASIFT = new float[wo*ho];
for(int j = 0; j < (int) ho; j++)
for(int i = 0; i < (int) wo; i++) opixelsASIFT[j*wo+i] = 255;
/////////////////////////////////////////////////////////////////// Copy both images to output
for(int j = 0; j < (int) h1; j++)
for(int i = 0; i < (int) w1; i++) opixelsASIFT[j*wo+i] = ipixels1[j*w1+i];
for(int j = 0; j < (int) h2; j++)
for(int i = 0; i < (int) (int)w2; i++) opixelsASIFT[(h1 + band_w + j)*wo + i] = ipixels2[j*w2 + i];
//////////////////////////////////////////////////////////////////// Draw matches
matchingslist::iterator ptr = matchings.begin();
for(int i=0; i < (int) matchings.size(); i++, ptr++)
{
draw_line(opixelsASIFT, (int) (zoom1*ptr->first.x), (int) (zoom1*ptr->first.y),
(int) (zoom2*ptr->second.x), (int) (zoom2*ptr->second.y) + h1 + band_w, 255.0f, wo, ho);
}
///////////////////////////////////////////////////////////////// Save imgOut
write_png_f32(argv[3], opixelsASIFT, wo, ho, 1);
delete[] opixelsASIFT; /*memcheck*/
/////////// Output image containing line matches (the two images are concatenated one aside the other)
int woH = w1+w2+band_w;
int hoH = MAX(h1,h2);
float *opixelsASIFT_H = new float[woH*hoH];
for(int j = 0; j < (int) hoH; j++)
for(int i = 0; i < (int) woH; i++) opixelsASIFT_H[j*woH+i] = 255;
/////////////////////////////////////////////////////////////////// Copy both images to output
for(int j = 0; j < (int) h1; j++)
for(int i = 0; i < (int) w1; i++) opixelsASIFT_H[j*woH+i] = ipixels1[j*w1+i];
for(int j = 0; j < (int) h2; j++)
for(int i = 0; i < (int) w2; i++) opixelsASIFT_H[j*woH + w1 + band_w + i] = ipixels2[j*w2 + i];
//////////////////////////////////////////////////////////////////// Draw matches
matchingslist::iterator ptrH = matchings.begin();
for(int i=0; i < (int) matchings.size(); i++, ptrH++)
{
draw_line(opixelsASIFT_H, (int) (zoom1*ptrH->first.x), (int) (zoom1*ptrH->first.y),
(int) (zoom2*ptrH->second.x) + w1 + band_w, (int) (zoom2*ptrH->second.y), 255.0f, woH, hoH);
}
///////////////////////////////////////////////////////////////// Save imgOut
write_png_f32(argv[4], opixelsASIFT_H, woH, hoH, 1);
delete[] opixelsASIFT_H; /*memcheck*/
////// Write the coordinates of the matched points (row1, col1, row2, col2) to the file argv[5]
std::ofstream file(argv[5]);
if (file.is_open())
{
// Write the number of matchings in the first line
file << num_matchings << std::endl;
matchingslist::iterator ptr = matchings.begin();
for(int i=0; i < (int) matchings.size(); i++, ptr++)
{
file << zoom1*ptr->first.x << " " << zoom1*ptr->first.y << " " << zoom2*ptr->second.x <<
" " << zoom2*ptr->second.y << std::endl;
}
}
else
{
std::cerr << "Unable to open the file matchings.";
}
file.close();
// Write all the keypoints (row, col, scale, orientation, desciptor (128 integers)) to
// the file argv[6] (so that the users can match the keypoints with their own matching algorithm if they wish to)
// keypoints in the 1st image
std::ofstream file_key1(argv[6]);
if (file_key1.is_open())
{
// Follow the same convention of David Lowe:
// the first line contains the number of keypoints and the length of the desciptors (128)
file_key1 << num_keys1 << " " << VecLength << " " << std::endl;
for (int tt = 0; tt < (int) keys1.size(); tt++)
{
for (int rr = 0; rr < (int) keys1[tt].size(); rr++)
{
keypointslist::iterator ptr = keys1[tt][rr].begin();
for(int i=0; i < (int) keys1[tt][rr].size(); i++, ptr++)
{
file_key1 << zoom1*ptr->x << " " << zoom1*ptr->y << " " << zoom1*ptr->scale << " " << ptr->angle;
for (int ii = 0; ii < (int) VecLength; ii++)
{
file_key1 << " " << ptr->vec[ii];
}
file_key1 << std::endl;
}
}
}
}
else
{
std::cerr << "Unable to open the file keys1.";
}
file_key1.close();
////// keypoints in the 2nd image
std::ofstream file_key2(argv[7]);
if (file_key2.is_open())
{
// Follow the same convention of David Lowe:
// the first line contains the number of keypoints and the length of the desciptors (128)
file_key2 << num_keys2 << " " << VecLength << " " << std::endl;
for (int tt = 0; tt < (int) keys2.size(); tt++)
{
for (int rr = 0; rr < (int) keys2[tt].size(); rr++)
{
keypointslist::iterator ptr = keys2[tt][rr].begin();
for(int i=0; i < (int) keys2[tt][rr].size(); i++, ptr++)
{
file_key2 << zoom2*ptr->x << " " << zoom2*ptr->y << " " << zoom2*ptr->scale << " " << ptr->angle;
for (int ii = 0; ii < (int) VecLength; ii++)
{
file_key2 << " " << ptr->vec[ii];
}
file_key2 << std::endl;
}
}
}
}
else
{
std::cerr << "Unable to open the file keys2.";
}
file_key2.close();
return 0;
}

View file

@ -0,0 +1,96 @@
%*-------------------demo_ASIFT MATLAB interface -------------------------*/
%
% *************************************************************************
% NOTE: The ASIFT SOFTWARE ./demo_ASIFT IS STANDALONE AND CAN BE EXECUTED
% WITHOUT MATLAB.
% *************************************************************************
%
% Detect corresponding points in two images with the ASIFT method.
% Copyright, Jean-Michel Morel, Guoshen Yu, 2008.
% Please report bugs and/or send comments to Guoshen Yu yu@cmap.polytechnique.fr
%
% Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
% Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
% Reference: ASIFT online demo (You can try ASIFT with your own images online.)
% http://www.ipol.im/pub/algo/my_affine_sift/
%
% 2010.08.17
% ---------------------------------------------------------------------------*/
function demo_ASIFT(file_img1, file_img2, imgOutVert, imgOutHori, matchings, keys1, keys2, flag_resize)
if (nargin == 8)
if (isnumeric(flag_resize) && (flag_resize == 0))
flag_resize = 0;
else
flag_resize = 1;
end
elseif (nargin == 7)
flag_resize = 1;
else
disp('*******************************************************************************');
disp('*************************** ASIFT image matching ****************************');
disp('*******************************************************************************');
disp('Usage: ./demo_ASIFT imgIn1 imgIn2 imgOutVert.png imgOutHori.png');
disp(' matchings.txt keys1.txt keys2.txt [Resize option: 0/1]');
disp('- imgIn1, imgIn2: input images (in most standard formats).');
disp('- imgOutVert.png, imgOutHori.png: output images (vertical/horizontal concatenated,');
disp(' in PNG format.) The detected matchings are connected by write lines.');
disp('- matchings.txt: coordinates of matched points (col1, row1, col2, row2).');
disp('- keys1.txt keys2.txt: ASIFT keypoints of the two images.')
disp('- [optional 0/1]. 1: input images resize to 800x600 (default). 0: no resize.');
disp('*******************************************************************************');
disp('********************* Jean-Michel Morel, Guoshen Yu, 2010 ********************');
disp('*******************************************************************************');
assert(false);
end
imgIn1 = imread(file_img1);
imgIn2 = imread(file_img2);
% convert the image to png format
file_img1_png = 'tmpASIFTinput1.png';
file_img2_png = 'tmpASIFTinput2.png';
imwrite(imgIn1, file_img1_png, 'png');
imwrite(imgIn2, file_img2_png, 'png');
% ASIFT command
command_ASIFT = './demo_ASIFT';
command_ASIFT = [command_ASIFT ' ' file_img1_png ' ' file_img2_png ' ' ...
imgOutVert ' ' imgOutHori ' ' matchings ' ' keys1 ' ' keys2];
if (flag_resize == 0)
command_ASIFT = [command_ASIFT ' 0'];
end
% get the number of processors
% Mac
if (ismac == 1)
[s, w] = unix('sysctl -n hw.ncpu');
num_CPUs = str2num(w);
% set the maximum OpenMP threads to the number of processors
set_threads = sprintf('export OMP_NUM_THREADS=%d;', num_CPUs);
command = [set_threads ' ' command_ASIFT];
% Unix
elseif (isunix == 1)
[s, w] = unix('grep processor /proc/cpuinfo | wc -l');
num_CPUs = str2num(w);
% set the maximum OpenMP threads to the number of processors
set_threads = sprintf('export OMP_NUM_THREADS=%d;', num_CPUs);
command = [set_threads ' ' command_ASIFT];
% Windows
elseif (ispc == 1)
[s, w] = dos('set NUMBER_OF_PROCESSORS');
num_CPUs = sscanf(w, '%*21c%d', [1, Inf]);
% set the maximum OpenMP threads to the number of processors
setenv('OMP_NUM_THREADS', num2str(num_CPUs));
command = command_ASIFT;
else
error('Unrecognized operating system. The operating system should be Windows, Linux/Unix, or Mac OS.');
end
status = system(command);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,298 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// David Lowe "Method and apparatus for identifying scale invariant
// features in an image and use of same for locating an object in an
// image", U.S. Patent 6,711,293.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
#ifndef _CLIBSIFT_H_
#define _CLIBSIFT_H_
///////////// Description
/// For each octave:
/// - Divide in par.Scales scales
/// - Convolve and compute differences of convolved scales
/// - Look for a 3x3 multiscale extrema and contraste enough and with no predominant direction (no 1d edge)
/// For each extrema
/// - Compute orientation histogram in neighborhood.
/// - Generate a keypoint for each mode with this orientation
/// For each keypoint
/// - Create vector
///////////// Possible differences with MW
/// Gaussian convolution
#include <stdlib.h>
#include <assert.h>
#include "numerics1.h"
#include "library.h"
#include "filter.h"
#include "domain.h"
#include "splines.h"
#include "flimage.h"
#include <vector>
// BASIC STRUCTURES:
// Keypoints:
#define OriSize 8
#define IndexSize 4
#define VecLength IndexSize * IndexSize * OriSize
/* Keypoint structure:
position: x,y
scale: s
orientation: angle
descriptor: array of gradient orientation histograms in a neighbors */
struct keypoint {
float x,y,
scale,
angle;
float vec[VecLength];
};
/* Keypoint structure:
position: x,y
scale: s
orientation: angle
descriptor: array of gradient orientation histograms in a neighbors */
struct keypoint_char {
float x,y,
scale,
angle;
unsigned char vec[VecLength];
};
/* Keypoint structure:
position: x,y
scale: s
orientation: angle
descriptor: array of gradient orientation histograms in a neighbors */
struct keypoint_short {
float x,y,
scale,
angle;
unsigned short vec[VecLength];
};
/* Keypoint structure:
position: x,y
scale: s
orientation: angle
descriptor: array of gradient orientation histograms in a neighbors */
struct keypoint_int {
float x,y,
scale,
angle;
unsigned int vec[VecLength];
};
/* List of keypoints: just use the standard class vector: */
typedef std::vector<keypoint> keypointslist;
/* List of keypoints: just use the standard class vector: */
typedef std::vector<keypoint_char> keypointslist_char;
typedef std::vector<keypoint_short> keypointslist_short;
typedef std::vector<keypoint_int> keypointslist_int;
/* Matching: just use the standard class pair: */
typedef std::pair<keypoint,keypoint> matching;
/* List of matchings: just use the standard class vector: */
typedef std::vector<matching> matchingslist;
struct siftPar
{
int OctaveMax;
int DoubleImSize;
int order;
/* InitSigma gives the amount of smoothing applied to the image at the
first level of each octave. In effect, this determines the sampling
needed in the image domain relative to amount of smoothing. Good
values determined experimentally are in the range 1.2 to 1.8.
*/
float InitSigma /*= 1.6*/;
/* Peaks in the DOG function must be at least BorderDist samples away
from the image border, at whatever sampling is used for that scale.
Keypoints close to the border (BorderDist < about 15) will have part
of the descriptor landing outside the image, which is approximated by
having the closest image pixel replicated. However, to perform as much
matching as possible close to the edge, use BorderDist of 4.
*/
int BorderDist /*= 5*/;
/* Scales gives the number of discrete smoothing levels within each octave.
For example, Scales = 2 implies dividing octave into 2 intervals, so
smoothing for each scale sample is sqrt(2) more than previous level.
Value of 2 works well, but higher values find somewhat more keypoints.
*/
int Scales /*= 3*/;
/// Decreasing PeakThresh allows more non contrasted keypoints
/* Magnitude of difference-of-Gaussian value at a keypoint must be above
this threshold. This avoids considering points with very low contrast
that are dominated by noise. It is divided by Scales because more
closely spaced scale samples produce smaller DOG values. A value of
0.08 considers only the most stable keypoints, but applications may
wish to use lower values such as 0.02 to find keypoints from low-contast
regions.
*/
//#define PeakThreshInit 255*0.04
//#define PeakThresh PeakThreshInit / Scales
float PeakThresh /*255.0 * 0.04 / 3.0*/;
/// Decreasing EdgeThresh allows more edge points
/* This threshold eliminates responses at edges. A value of 0.08 means
that the ratio of the largest to smallest eigenvalues (principle
curvatures) is below 10. A value of 0.14 means ratio is less than 5.
A value of 0.0 does not eliminate any responses.
Threshold at first octave is different.
*/
float EdgeThresh /*0.06*/;
float EdgeThresh1 /*0.08*/;
/* OriBins gives the number of bins in the histogram (36 gives 10
degree spacing of bins).
*/
int OriBins /*36*/;
/* Size of Gaussian used to select orientations as multiple of scale
of smaller Gaussian in DOG function used to find keypoint.
Best values: 1.0 for UseHistogramOri = FALSE; 1.5 for TRUE.
*/
float OriSigma /*1.5*/;
/// Look for local (3-neighborhood) maximum with valuer larger or equal than OriHistThresh * maxval
/// Setting one returns a single peak
/* All local peaks in the orientation histogram are used to generate
keypoints, as long as the local peak is within OriHistThresh of
the maximum peak. A value of 1.0 only selects a single orientation
at each location.
*/
float OriHistThresh /*0.8*/;
/// Feature vector is normalized to has euclidean norm 1.
/// This threshold avoid the excessive concentration of information on single peaks
/* Index values are thresholded at this value so that regions with
high gradients do not need to match precisely in magnitude.
Best value should be determined experimentally. Value of 1.0
has no effect. Value of 0.2 is significantly better.
*/
float MaxIndexVal /*0.2*/;
/* This constant specifies how large a region is covered by each index
vector bin. It gives the spacing of index samples in terms of
pixels at this scale (which is then multiplied by the scale of a
keypoint). It should be set experimentally to as small a value as
possible to keep features local (good values are in range 3 to 5).
*/
int MagFactor /*3*/;
/* Width of Gaussian weighting window for index vector values. It is
given relative to half-width of index, so value of 1.0 means that
weight has fallen to about half near corners of index patch. A
value of 1.0 works slightly better than large values (which are
equivalent to not using weighting). Value of 0.5 is considerably
worse.
*/
float IndexSigma /*1.0*/;
/* If this is TRUE, then treat gradients with opposite signs as being
the same. In theory, this could create more illumination invariance,
but generally harms performance in practice.
*/
int IgnoreGradSign /*0*/;
float MatchRatio /*0.6*/;
/*
In order to constrain the research zone for matches.
Useful for example when looking only at epipolar lines
*/
float MatchXradius /*= 1000000.0f*/;
float MatchYradius /*= 1000000.0f*/;
int noncorrectlylocalized;
};
//////////////////////////////////////////////////////////
/// SIFT
//////////////////////////////////////////////////////////
void default_sift_parameters(siftPar &par);
void compute_sift_keypoints(float *input, keypointslist& keypoints,int width, int height, siftPar &par);
// MATCHING DETECTION FUNCTION:
void compute_sift_matches( keypointslist& keys1, keypointslist& keys2, matchingslist& matchings, siftPar &par);
#endif // _LIBSIFT_H_

View file

@ -0,0 +1,145 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
#include "domain.h"
#define DEBUG 0
void apply_zoom(float *input, float *out, float zoom, int order, int width, int height)
{
int nwidth = (int)( zoom * (float) width);
int nheight = (int)( zoom * (float) height);
float *coeffs;
float *ref;
float cx[12],cy[12],ak[13];
// Guoshen Yu, 2010.09.22, Windows versions
vector<float> input_vec, coeffs_vec, ref_vec;
input_vec = vector<float>(width*height);
coeffs_vec = vector<float>(width*height);
ref_vec = vector<float>(width*height);
for (int i = 0; i < width*height; i++)
input_vec[i] = input[i];
if (order!=0 && order!=1 && order!=-3 &&
order!=3 && order!=5 && order!=7 && order!=9 && order!=11)
{
printf("unrecognized interpolation order.\n");
exit(-1);
}
if (order>=3) {
coeffs = new float[width*height];
// Guoshen Yu, 2010.09.21, Windows version
//finvspline(input,order,coeffs,width,height);
finvspline(input_vec,order,coeffs_vec,width,height);
for (int i = 0; i < width*height; i++)
coeffs[i] = coeffs_vec[i];
ref = coeffs;
if (order>3) init_splinen(ak,order);
} else
{
coeffs = NULL;
ref = input;
}
int xi,yi;
float xp,yp;
float res;
int n1,n2;
float bg = 0.0f;
float p=-0.5;
for(int i=0; i < nwidth; i++)
for(int j=0; j < nheight; j++)
{
xp = (float) i / zoom;
yp = (float) j / zoom;
if (order == 0) {
xi = (int)floor((double)xp);
yi = (int)floor((double)yp);
if (xi<0 || xi>=width || yi<0 || yi>=height)
res = bg;
else res = input[yi*width+xi];
} else {
if (xp<0. || xp>=(float)width || yp<0. || yp>=(float)height) res=bg;
else {
xp -= 0.5; yp -= 0.5;
int xi = (int)floor((double)xp);
int yi = (int)floor((double)yp);
float ux = xp-(float)xi;
float uy = yp-(float)yi;
switch (order)
{
case 1: /* first order interpolation (bilinear) */
n2 = 1;
cx[0]=ux; cx[1]=1.-ux;
cy[0]=uy; cy[1]=1.-uy;
break;
case -3: /* third order interpolation (bicubic Keys' function) */
n2 = 2;
keys(cx,ux,p);
keys(cy,uy,p);
break;
case 3: /* spline of order 3 */
n2 = 2;
spline3(cx,ux);
spline3(cy,uy);
break;
default: /* spline of order >3 */
n2 = (1+order)/2;
splinen(cx,ux,ak,order);
splinen(cy,uy,ak,order);
break;
}
res = 0.; n1 = 1-n2;
if (xi+n1>=0 && xi+n2<width && yi+n1>=0 && yi+n2<height) {
int adr = yi*width+xi;
for (int dy=n1;dy<=n2;dy++)
for (int dx=n1;dx<=n2;dx++)
res += cy[n2-dy]*cx[n2-dx]*ref[adr+width*dy+dx];
} else
// Guoshen Yu, 2010.09.21, Windows
for (int i = 0; i < width*height; i++)
ref_vec[i] = ref[i];
for (int dy=n1;dy<=n2;dy++)
for (int dx=n1;dx<=n2;dx++)
// Guoshen Yu, 2010.09.21, Windows
// res += cy[n2-dy]*cx[n2-dx]*v(ref,xi+dx,yi+dy,bg,width,height);
res += cy[n2-dy]*cx[n2-dx]*v(ref_vec,xi+dx,yi+dy,bg,width,height);
}
}
out[j*nwidth+i] = res;
}
}

View file

@ -0,0 +1,40 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
#ifndef _DOMAIN_H_
#define _DOMAIN_H_
#include "numerics1.h"
#include "library.h"
#include "splines.h"
/// Compute homography from n points using svd
void compute_planar_homography_n_points(float *x0, float *y0, float *x1, float *y1, int n, float **H);
/// Compute homography using svd + Ransac
void compute_ransac_planar_homography_n_points(float *x0, float *y0, float *x1, float *y1, int n, int niter, float tolerance, float **H);
/// Compute homography by using Lionel Code
void compute_moisan_planar_homography_n_points(float *x0, float *y0, float *x1, float *y1, int n, int niter, float &epsilon, float **H, int &counter, int recursivity);
/// Apply planar homography to image
void compute_planar_homography_bounding_box(int width, int height, float **H, float *x0, float *y0, int *nwidth, int *nheight);
void apply_planar_homography(float *input, int width, int height, float **H, float bg, int order, float *out, float x0, float y0, int nwidth, int nheight);
/// Apply zoom of factor z
void apply_zoom(float *input, float *out, float zoom, int order, int width, int height);
/// Apply general transformation
void apply_general_transformation(float *input, float *transformx, float* transformy, float *out, float bg, int order, int width, int height, int nwidth,int nheight);
#endif

View file

@ -0,0 +1,460 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
#include "filter.h"
/////////////////////////////////////////////////////////////// Build Gaussian filters
float * directional_gauss_filter(float xsigma, float ysigma, float angle, int *kwidth, int *kheight)
{
int ksize = (int)(2.0 * 2.0 * MAX(xsigma, ysigma) + 1.0);
float *kernel = new float[ksize*ksize];
float xsigma2 = xsigma*xsigma;
float ysigma2 = ysigma*ysigma;
int l2 = ksize/2;
for(int y = -l2; y <= l2; y++)
for(int x = -l2; x <= l2; x++)
{
float a = (float) angle * PI / 180.0f;
float sina = sin(a);
float cosa = cos(a);
float ax = (float) x * cosa + (float) y * sina;
float ay = -(float) x * sina + (float) y * cosa;
kernel[(y+l2) * ksize + x + l2] = exp(-(ax*ax)/(2.0f*xsigma2) - (ay*ay)/(2.0f*ysigma2) );
}
float sum=0.0;
for(int i=0; i < ksize*ksize; i++) sum += kernel[i];
for(int i=0; i < ksize*ksize; i++) kernel[i] /= sum;
*kwidth = ksize;
*kheight = ksize;
return kernel;
}
/* Convolution with a kernel */
/* No padding applied to the image */
void convol(float *u,float *v,int width,int height,float *kernel,int kwidth,int kheight)
{
// float S;
// int K2,L2,m,n,kmin,kmax,lmin,lmax,l,k;
int K2 = kwidth / 2;
int L2 = kheight / 2;
for(int y=0 ; y < height; y++)
for (int x=0 ; x < width; x++) {
float S = 0.0;
// kmax = MIN(kwidth-1,n+K2);
// kmin = MAX(0,1+n+K2-width);
// lmax = MIN(kheight-1,m+L2);
// lmin = MAX(0,1+m+L2-height);
for (int l = -L2; l <= L2; l++)
for (int k = -K2 ; k<= K2; k++)
{
int px=x+k;
int py=y+l;
if (px>=0 && px < width && py>=0 && py<height)
S += u[width*py + px] * kernel[kwidth*(l+L2) + k+K2];
}
v[y*width+x] = (float) S;
}
}
void median(float *u,float *v, float radius, int niter, int width,int height)
{
int iradius = (int)(radius+1.0);
int rsize=(2*iradius+1)*(2*iradius+1);
float * vector = new float[rsize];
float * index = new float[rsize];
for(int n=0; n< niter;n++){
for(int x=0;x<width;x++)
for(int y=0;y<height;y++){
int count=0;
for(int i=-iradius;i<=iradius;i++)
for(int j=-iradius;j<=iradius;j++)
if ((float) (i*i + j*j) <= iradius*iradius){
int x0=x+i;
int y0=y+j;
if (x0>=0 && y0>=0 && x0 < width && y0 < height) {
vector[count] = u[y0*width+x0];
index[count] = count;
count++;
}
}
quick_sort(vector,index,count);
v[y*width+x] = vector[count/2];
}
copy(v,u,width*height);
}
delete[] vector;
delete[] index;
}
void remove_outliers(float *igray,float *ogray,int width, int height)
{
int bloc=1;
int bsize = (2*bloc+1)*(2*bloc+1)-1;
for(int x=bloc;x<width-bloc;x++)
for(int y=bloc;y<height-bloc;y++) {
int l = y*width+x;
int countmax=0;
int countmin=0;
float valueg0 = igray[l];
// float distmin = MAXFLOAT;
float distmin = FLT_MAX; // Guoshen Yu
float green = igray[l];
for(int i=-bloc;i<=bloc;i++)
for(int j=-bloc;j<=bloc;j++)
if ((i!=0 || j!=0)){
int l0 = (y+j)*width+x+i;
int valueg = (int) igray[l0];
if (valueg0>valueg) countmax++;
if (valueg0<valueg) countmin++;
float dist = fabsf(valueg - valueg0);
if (dist < distmin) {distmin=dist;green=valueg;}
}
if (countmin == bsize || countmax == bsize ) ogray[l]=green;
else ogray[l] = igray[l];
}
}
/* Convolution with a separable kernel */
/* boundary condition: 0=zero, 1=symmetry */
void separable_convolution(float *u, float *v, int width, int height,float * xkernel, int xsize,float *ykernel,int ysize,int boundary)
{
int width2 = 2*width;
int height2 = 2*height;
float *tmp = (float *) malloc(width*height*sizeof(float));
/* convolution along x axis */
float sum = 0.0;
int org = xsize / 2;
for (int y=height;y--;)
for (int x=width;x--;) {
sum = 0.0;
for (int i=xsize;i--;) {
int s = x-i+org;
switch(boundary) {
case 0:
if (s>=0 && s<width) sum += xkernel[i]*u[y*width+s];
break;
case 1:
while (s<0) s+=width2;
while (s>=width2) s-=width2;
if (s>=width) s = width2-1-s;
sum += xkernel[i]*u[y*width+s];
break;
}
}
tmp[y*width+x] = sum;
}
/* convolution along y axis */
org = ysize / 2;
for (int y=height;y--;)
for (int x=width;x--;) {
sum=0.0;
for (int i=ysize;i--;) {
int s = y-i+org;
switch(boundary) {
case 0:
if (s>=0 && s<height) sum += ykernel[i]*tmp[s*width+x];
break;
case 1:
while (s<0) s+=height2;
while (s>=height2) s-=height2;
if (s>=height) s = height2-1-s;
sum += ykernel[i]*tmp[s*width+x];
break;
}
}
v[y*width+x] = sum;
}
free(tmp);
}
void gaussian_convolution(float *u, float *v, int width, int height, float sigma)
{
int ksize;
float * kernel;
ksize = (int)(2.0 * 4.0 * sigma + 1.0);
kernel = gauss(1,sigma,&ksize);
int boundary = 1;
copy(u,v,width*height);
horizontal_convolution(v, v, width, height, kernel, ksize, boundary);
vertical_convolution(v, v, width, height, kernel, ksize, boundary);
delete[] kernel; /*memcheck*/
}
void gaussian_convolution(float *u, float *v, int width, int height, float sigma, int ksize)
{
float * kernel;
kernel = gauss(1,sigma,&ksize);
int boundary = 1;
copy(u,v,width*height);
horizontal_convolution(v, v, width, height, kernel, ksize, boundary);
vertical_convolution(v, v, width, height, kernel, ksize, boundary);
}
void fast_separable_convolution(float *u, float *v, int width, int height,float * xkernel, int xsize,float *ykernel,int ysize,int boundary)
{
copy(u,v,width*height);
horizontal_convolution(v, v, width, height, xkernel, xsize, boundary);
vertical_convolution(v, v, width, height, ykernel, ysize, boundary);
}
/* Loop unrolling simply sums 5 multiplications
at a time to allow the compiler to schedule
operations better and avoid loop overhead.
*/
void buffer_convolution(float *buffer,float *kernel,int size,int ksize)
{
for (int i = 0; i < size; i++) {
float sum = 0.0;
float *bp = &buffer[i];
float *kp = &kernel[0];
/* Loop unrolling: do 5 multiplications at a time. */
// int k=0;
for(int k = 0; k < ksize; k++)
sum += *bp++ * *kp++;
// for(;k + 4 < ksize; bp += 5, kp += 5, k += 5)
// sum += bp[0] * kp[0] + bp[1] * kp[1] + bp[2] * kp[2] +
// bp[3] * kp[3] + bp[4] * kp[4];
/* Do multiplications at a time on remaining items. */
// for(; k < ksize; bp++ , kp++, k++) sum += *bp * (*kp);
buffer[i] = sum;
}
}
/* Convolve image with the 1-D kernel vector along image rows. This
is designed to be as efficient as possible.
*/
void horizontal_convolution(float *u, float *v, int width, int height, float *kernel, int ksize, int boundary)
{
int halfsize = ksize / 2;
int buffersize = width + ksize;
float *buffer = new float[buffersize];
for (int r = 0; r < height; r++) {
/// symmetry
int l = r*width;
if (boundary == 1)
for (int i = 0; i < halfsize; i++)
buffer[i] = u[l + halfsize - 1 - i ];
else
for (int i = 0; i < halfsize; i++)
buffer[i] = 0.0;
for (int i = 0; i < width; i++)
buffer[halfsize + i] = u[l + i];
if (boundary == 1)
for (int i = 0; i < halfsize; i++)
buffer[i + width + halfsize] = u[l + width - 1 - i];
else
for (int i = 0; i < halfsize; i++)
buffer[i + width + halfsize] = 0.0;
buffer_convolution(buffer, kernel, width, ksize);
for (int c = 0; c < width; c++)
v[r*width+c] = buffer[c];
}
delete[] buffer; /*memcheck*/
}
void vertical_convolution(float *u, float *v, int width, int height, float *kernel,int ksize, int boundary)
{
int halfsize = ksize / 2;
int buffersize = height + ksize;
float *buffer = new float[buffersize];
for (int c = 0; c < width; c++) {
if (boundary == 1)
for (int i = 0; i < halfsize; i++)
buffer[i] = u[(halfsize-i-1)*width + c];
else
for (int i = 0; i < halfsize; i++)
buffer[i] = 0.0f;
for (int i = 0; i < height; i++)
buffer[halfsize + i] = u[i*width + c];
if (boundary == 1)
for (int i = 0; i < halfsize; i++)
buffer[halfsize + height + i] = u[(height - i - 1)*width+c];
else
for (int i = 0; i < halfsize; i++)
buffer[halfsize + height + i] = 0.0f;
buffer_convolution(buffer, kernel, height, ksize);
for (int r = 0; r < height; r++)
v[r*width+c] = buffer[r];
}
delete[] buffer; /*memcheck*/
}
void heat(float *input, float *out, float step, int niter, float sigma, int width, int height)
{
int i,j,n,ksize,size,im,i1,j1,jm;
float *kernel = NULL, *laplacian = NULL, *convolved = NULL;
size = width*height;
if (sigma > 0.0) kernel = gauss(0,sigma,&ksize);
laplacian = (float *) malloc(size*sizeof(float));
convolved = (float *) malloc(size*sizeof(float));
for(n=0; n < niter; n++)
{
if (sigma > 0.0)
{
separable_convolution(input,convolved,width,height, kernel, ksize,kernel,ksize,1);
for(i=0; i< size; i++) laplacian[i] = convolved[i] - input[i];
} else
{
for (i=0; i < width;i++)
for (j=0; j< height ;j++)
{
if (j==0) jm=1; else jm=j-1;
if (j==height-1) j1=height-2; else j1=j+1;
if (i==0) im=1; else im=i-1;
if (i==width-1) i1=width-2; else i1=i+1;
laplacian[j*width + i] = - 4.0 * input[width*j+i] + input[width*j+im]+ input[width*j+i1]+input[width*jm + i] + input[width*j1 + i];
}
}
for(i=0; i < size; i++) out[i] = input[i] + step * laplacian[i];
copy(out,input,size);
}
free(laplacian);
free(convolved);
if (kernel) free(kernel);
}

View file

@ -0,0 +1,38 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
#ifndef _FILTER_H_
#define _FILTER_H_
#include "library.h"
float * directional_gauss_filter(float xsigma, float ysigma, float angle, int *kwidth, int *kheight);
void median(float *u,float *v, float radius, int niter, int width,int height);
void remove_outliers(float *igray,float *ogray,int width, int height);
/// Convolution with a separable kernel, boundary condition: 0=zero, 1=symmetry
void separable_convolution(float *u, float *v, int width, int height, float *xkernel, int xsize, float *ykernel, int ysize,int boundary);
void buffer_convolution(float *buffer,float *kernel,int size,int ksize);
void horizontal_convolution(float *u, float *v, int width, int height, float *kernel, int ksize, int boundary);
void vertical_convolution(float *u, float *v, int width, int height, float *kernel,int ksize, int boundary);
void fast_separable_convolution(float *u, float *v, int width, int height,float * xkernel, int xsize,float *ykernel,int ysize,int boundary);
/// Can be called with u=v
void gaussian_convolution(float *u, float *v, int width, int height, float sigma);
void gaussian_convolution(float *u, float *v, int width, int height, float sigma, int ksize);
void convol(float *u, float *v, int width, int height, float *kernel, int kwidth, int kheight); /// Convolution with a kernel, No padding applied to the image
void heat(float *u, float *v, float step, int niter, float sigma, int width, int height);
#endif // _FILTER_H_

View file

@ -0,0 +1,86 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
#include "flimage.h"
//////////////////////////////////////////////// Class flimage
//// Construction
flimage::flimage() : width(0), height(0), p(0)
{
}
flimage::flimage(int w, int h) : width(w), height(h), p(new float[w*h])
{
for (int j=width*height-1; j>=0 ; j--) p[j] = 0.0;
}
flimage::flimage(int w, int h, float v) : width(w), height(h), p(new float[w*h])
{
for (int j=width*height-1; j>=0 ; j--) p[j] = v;
}
flimage::flimage(int w, int h, float* v) : width(w), height(h), p(new float[w*h])
{
for (int j=width*height-1; j>=0 ; j--) p[j] = v[j];
}
void flimage::create(int w, int h)
{
erase();
width = w; height = h;
p = new float[w*h];
for (int j=width*height-1; j>=0 ; j--) p[j] = 0.0;
}
void flimage::create(int w, int h, float* v)
{
erase();
width = w; height = h; p = new float[w*h];
for (int j=width*height-1; j>=0 ; j--) p[j] = v[j];
}
flimage::flimage(const flimage& im) : width(im.width), height(im.height), p(new float[im.width*im.height])
{
for (int j=width*height-1; j>=0 ; j--) p[j] = im.p[j];
}
flimage& flimage::operator= (const flimage& im)
{
if (&im == this) {
return *this;
}
if (width != im.width || height != im.height)
{
erase();
width = im.width; height=im.height; p = new float[width*height];
}
for (int j=width*height-1; j>=0 ; j--) p[j] = im.p[j];
return *this;
}
//// Destruction
void flimage::erase()
{
width = height = 0;
if (p) delete[] p;
p=0;
}
flimage::~flimage()
{
erase();
}

View file

@ -0,0 +1,53 @@
// Authors: Unknown. Please, if you are the author of this file, or if you
// know who are the authors of this file, let us know, so we can give the
// adequate credits and/or get the adequate authorizations.
#ifndef _FLIMAGE_H_
#define _FLIMAGE_H_
#include <iostream>
#include <string>
class flimage {
private:
int width, height; // image size
float* p; // array of color levels: level of pixel (x,y) is p[y*width+x]
public:
//// Construction
flimage();
flimage(int w, int h);
flimage(int w, int h, float v);
flimage(int w, int h, float* v);
flimage(const flimage& im);
flimage& operator= (const flimage& im);
void create(int w, int h);
void create(int w, int h, float *v);
//// Destruction
void erase();
~flimage();
//// Get Basic Data
int nwidth() const {return width;} // image size
int nheight() const {return height;}
/// Access values
float* getPlane() {return p;} // return the adress of the array of values
float operator()(int x, int y) const {return p[ y*width + x ];} // acces to the (x,y) value
float& operator()(int x, int y) {return p[ y*width + x ];} // by value (for const images) and by reference
};
#endif

View file

@ -0,0 +1,186 @@
// Copyright (c) 2007 Lionel Moisan <Lionel.Moisan@parisdescartes.fr>
#include <stdio.h>
#include <math.h>
#include "splines.h"
#include "fproj.h"
/*------------------------ MAIN MODULE ---------------------------------*/
//void fproj(float *in, float *out, int nx, int ny, int *sx, int *sy, float *bg, int *o, float *p, char *i, float X1, float Y1, float X2, float Y2, float X3, float Y3, float *x4, float *y4)
void fproj(vector<float>& in, vector<float>& out, int nx, int ny, int *sx, int *sy, float *bg, int *o, float *p, char *i, float X1, float Y1, float X2, float Y2, float X3, float Y3, float *x4, float *y4)
/* Fimage in,out;
int *sx,*sy,*o;
char *i;
float *bg,*p,X1,Y1,X2,Y2,X3,Y3,*x4,*y4; */
{
/* int n1,n2,nx,ny,x,y,xi,yi,adr,dx,dy;*/
int n1,n2,x,y,xi,yi,adr,dx,dy;
float res,xx,yy,xp,yp,ux,uy,a,b,d,fx,fy,x12,x13,y12,y13;
float cx[12],cy[12],ak[13];
/* Fimage ref,coeffs; */
// float *ref, *coeffs;
vector<float> ref, coeffs;
/* CHECK ORDER */
if (*o!=0 && *o!=1 && *o!=-3 &&
*o!=3 && *o!=5 && *o!=7 && *o!=9 && *o!=11)
/* mwerror(FATAL,1,"unrecognized interpolation order.\n"); */
{
printf("unrecognized interpolation order.\n");
exit(-1);
}
/* ALLOCATE NEW IMAGE */
/* nx = in->ncol; ny = in->nrow; */
/* out = mw_change_fimage(out,*sy,*sx);
if (!out) mwerror(FATAL,1,"not enough memory\n"); */
if (*o>=3) {
/* coeffs = mw_new_fimage();
finvspline(in,*o,coeffs); */
// coeffs = new float[nx*ny];
coeffs = vector<float>(nx*ny);
finvspline(in,*o,coeffs,nx,ny);
ref = coeffs;
if (*o>3) init_splinen(ak,*o);
} else {
// coeffs = NULL;
ref = in;
}
/* COMPUTE NEW BASIS */
if (i) {
x12 = (X2-X1)/(float)nx;
y12 = (Y2-Y1)/(float)nx;
x13 = (X3-X1)/(float)ny;
y13 = (Y3-Y1)/(float)ny;
} else {
x12 = (X2-X1)/(float)(*sx);
y12 = (Y2-Y1)/(float)(*sx);
x13 = (X3-X1)/(float)(*sy);
y13 = (Y3-Y1)/(float)(*sy);
}
if (y4) {
xx=((*x4-X1)*(Y3-Y1)-(*y4-Y1)*(X3-X1))/((X2-X1)*(Y3-Y1)-(Y2-Y1)*(X3-X1));
yy=((*x4-X1)*(Y2-Y1)-(*y4-Y1)*(X2-X1))/((X3-X1)*(Y2-Y1)-(Y3-Y1)*(X2-X1));
a = (yy-1.0)/(1.0-xx-yy);
b = (xx-1.0)/(1.0-xx-yy);
}
else
{
a=b=0.0;
}
/********** MAIN LOOP **********/
for (x=0;x<*sx;x++)
for (y=0;y<*sy;y++) {
/* COMPUTE LOCATION IN INPUT IMAGE */
if (i) {
xx = 0.5+(((float)x-X1)*y13-((float)y-Y1)*x13)/(x12*y13-y12*x13);
yy = 0.5-(((float)x-X1)*y12-((float)y-Y1)*x12)/(x12*y13-y12*x13);
d = 1.0-(a/(a+1.0))*xx/(float)nx-(b/(b+1.0))*yy/(float)ny;
xp = xx/((a+1.0)*d);
yp = yy/((b+1.0)*d);
} else {
fx = (float)x + 0.5;
fy = (float)y + 0.5;
d = a*fx/(float)(*sx)+b*fy/(float)(*sy)+1.0;
xx = (a+1.0)*fx/d;
yy = (b+1.0)*fy/d;
xp = X1 + xx*x12 + yy*x13;
yp = Y1 + xx*y12 + yy*y13;
}
/* INTERPOLATION */
if (*o==0) {
/* zero order interpolation (pixel replication) */
xi = (int)floor((double)xp);
yi = (int)floor((double)yp);
/* if (xi<0 || xi>=in->ncol || yi<0 || yi>=in->nrow)*/
if (xi<0 || xi>=nx || yi<0 || yi>=ny)
res = *bg;
else
/* res = in->gray[yi*in->ncol+xi]; */
res = in[yi*nx+xi];
} else {
/* higher order interpolations */
if (xp<0. || xp>(float)nx || yp<0. || yp>(float)ny) res=*bg;
else {
xp -= 0.5; yp -= 0.5;
xi = (int)floor((double)xp);
yi = (int)floor((double)yp);
ux = xp-(float)xi;
uy = yp-(float)yi;
switch (*o)
{
case 1: /* first order interpolation (bilinear) */
n2 = 1;
cx[0]=ux; cx[1]=1.-ux;
cy[0]=uy; cy[1]=1.-uy;
break;
case -3: /* third order interpolation (bicubic Keys' function) */
n2 = 2;
keys(cx,ux,*p);
keys(cy,uy,*p);
break;
case 3: /* spline of order 3 */
n2 = 2;
spline3(cx,ux);
spline3(cy,uy);
break;
default: /* spline of order >3 */
n2 = (1+*o)/2;
splinen(cx,ux,ak,*o);
splinen(cy,uy,ak,*o);
break;
}
res = 0.; n1 = 1-n2;
/* this test saves computation time */
if (xi+n1>=0 && xi+n2<nx && yi+n1>=0 && yi+n2<ny) {
adr = yi*nx+xi;
for (dy=n1;dy<=n2;dy++)
for (dx=n1;dx<=n2;dx++)
/* res += cy[n2-dy]*cx[n2-dx]*ref->gray[adr+nx*dy+dx];*/
res += cy[n2-dy]*cx[n2-dx]*ref[adr+nx*dy+dx];
} else
for (dy=n1;dy<=n2;dy++)
for (dx=n1;dx<=n2;dx++)
/* res += cy[n2-dy]*cx[n2-dx]*v(ref,xi+dx,yi+dy,*bg); */
res += cy[n2-dy]*cx[n2-dx]*v(ref,xi+dx,yi+dy,*bg,nx,ny);
}
}
/* out->gray[y*(*sx)+x] = res; */
out[y*(*sx)+x] = res;
}
//if (coeffs)
/* mw_delete_fimage(coeffs); */
// delete[] coeffs;
}

View file

@ -0,0 +1,9 @@
// Copyright (c) 2007 Lionel Moisan <Lionel.Moisan@parisdescartes.fr>
#include "library.h"
#include <vector>
using namespace std;
//void fproj(float *in, float *out, int nx, int ny, int *sx, int *sy, float *bg, int *o, float *p, char *i, float X1, float Y1, float X2, float Y2, float X3, float Y3, float *x4, float *y4);
void fproj(vector<float>& in, vector<float>& out, int nx, int ny, int *sx, int *sy, float *bg, int *o, float *p, char *i, float X1, float Y1, float X2, float Y2, float X3, float Y3, float *x4, float *y4);

View file

@ -0,0 +1,116 @@
// Copyright (c) 2007 Lionel Moisan <Lionel.Moisan@parisdescartes.fr>
#include "frot.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
void bound(int x, int y, float ca, float sa, int *xmin, int *xmax, int *ymin, int *ymax);
/* NB : calling this module with out=in is nonsense */
/* void frot(in,out,a,b,k_flag)
Fimage in,out;
float *a,*b;
char *k_flag; */
void frot(vector<float>& in, vector<float>& out, int nx, int ny, int *nx_out, int *ny_out, float *a, float *b, char *k_flag)
//void frot(float *in, float *out, int nx, int ny, int *nx_out, int *ny_out, float *a, float *b, char *k_flag)
{
/* int nx,ny,x,y,x1,y1,adr; */
int x,y,x1,y1,adr;
float ca,sa,xp,yp,a11,a12,a21,a22,ux,uy,xtrans,ytrans;
int tx1,ty1,tx2,ty2,xmin,xmax,ymin,ymax,sx,sy;
/* nx = in->ncol;
ny = in->nrow; */
ca = (float)cos((double)(*a)*M_PI/180.0);
sa = (float)sin((double)(*a)*M_PI/180.0);
/********** Compute new image location **********/
if (k_flag) {
/* crop image and fix center */
xmin = ymin = 0;
xmax = nx-1;
ymax = ny-1;
xtrans = 0.5*( (float)(nx-1)*(1.0-ca)+(float)(ny-1)*sa );
ytrans = 0.5*( (float)(ny-1)*(1.0-ca)-(float)(nx-1)*sa );
} else {
/* extend image size to include the whole input image */
xmin = xmax = ymin = ymax = 0;
bound(nx-1,0,ca,sa,&xmin,&xmax,&ymin,&ymax);
bound(0,ny-1,ca,sa,&xmin,&xmax,&ymin,&ymax);
bound(nx-1,ny-1,ca,sa,&xmin,&xmax,&ymin,&ymax);
xtrans = ytrans = 0.0;
}
sx = xmax-xmin+1;
sy = ymax-ymin+1;
/* out = mw_change_fimage(out,sy,sx);
if (!out) mwerror(FATAL,1,"not enough memory\n"); */
*nx_out = sx;
*ny_out = sy;
// printf("Hello sx=%d, sy=%d\n", sx, sy);
// out = new float[sy*sx];
out = std::vector<float>(sx*sy);
/********** Rotate image **********/
for (x=xmin;x<=xmax;x++)
for (y=ymin;y<=ymax;y++) {
xp = ca*(float)x-sa*(float)y + xtrans;
yp = sa*(float)x+ca*(float)y + ytrans;
x1 = (int)floor(xp);
y1 = (int)floor(yp);
ux = xp-(float)x1;
uy = yp-(float)y1;
adr = y1*nx+x1;
tx1 = (x1>=0 && x1<nx);
tx2 = (x1+1>=0 && x1+1<nx);
ty1 = (y1>=0 && y1<ny);
ty2 = (y1+1>=0 && y1+1<ny);
/* a11 = (tx1 && ty1? in->gray[adr]:*b);
a12 = (tx1 && ty2? in->gray[adr+nx]:*b);
a21 = (tx2 && ty1? in->gray[adr+1]:*b);
a22 = (tx2 && ty2? in->gray[adr+nx+1]:*b); */
a11 = (tx1 && ty1? in[adr]:*b);
a12 = (tx1 && ty2? in[adr+nx]:*b);
a21 = (tx2 && ty1? in[adr+1]:*b);
a22 = (tx2 && ty2? in[adr+nx+1]:*b);
/* out->gray[(y-ymin)*sx+x-xmin] =
(1.0-uy)*((1.0-ux)*a11+ux*a21)+uy*((1.0-ux)*a12+ux*a22);*/
out[(y-ymin)*sx+x-xmin] =
(1.0-uy)*((1.0-ux)*a11+ux*a21)+uy*((1.0-ux)*a12+ux*a22);
}
}
void bound(int x, int y, float ca, float sa, int *xmin, int *xmax, int *ymin, int *ymax)
/* int x,y;
float ca,sa;
int *xmin,*xmax,*ymin,*ymax;*/
{
int rx,ry;
rx = (int)floor(ca*(float)x+sa*(float)y);
ry = (int)floor(-sa*(float)x+ca*(float)y);
if (rx<*xmin) *xmin=rx; if (rx>*xmax) *xmax=rx;
if (ry<*ymin) *ymin=ry; if (ry>*ymax) *ymax=ry;
}

View file

@ -0,0 +1,10 @@
// Copyright (c) 2007 Lionel Moisan <Lionel.Moisan@parisdescartes.fr>
#include "library.h"
#include <vector>
using namespace std;
/*void frot(float *in, float *out, int nx, int ny, int *nx_out, int *ny_out, float *a, float *b, char *k_flag)*/
//void frot(float *, float (*)[], int, int, int *, int *, float *, float *, char *);
void frot(vector<float>&, vector<float>&, int, int, int *, int *, float *, float *, char *);

View file

@ -0,0 +1,16 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View file

@ -0,0 +1 @@
ADD_SUBDIRECTORY(libs)

View file

@ -0,0 +1,122 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/CMakeFiles/progress.marks
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

View file

@ -0,0 +1,40 @@
# Install script for directory: /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
IF(BUILD_TYPE)
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME "")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT)
IF(COMPONENT)
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
# Install shared libraries without execute permission?
IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
SET(CMAKE_INSTALL_SO_NO_EXE "1")
ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
IF(NOT CMAKE_INSTALL_LOCAL_ONLY)
# Include the install script for each subdirectory.
INCLUDE("/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/cmake_install.cmake")
ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY)

View file

@ -0,0 +1,708 @@
/*
* Copyright (c) 2010, Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The views and conclusions contained in the software and
* documentation are those of the authors and should not be
* interpreted as representing official policies, either expressed
* or implied, of the copyright holder.
*/
/**
* @mainpage image read/write simplified interface
*
* README.txt:
* @verbinclude README.txt
*/
/**
* @file io_png.c
* @brief PNG read/write simplified interface
*
* This is a front-end to libpng, with routines to:
* @li read a PNG file as a deinterlaced 8bit integer or float array
* @li write a 8bit integer or float array to a PNG file
*
* Multi-channel images are handled : grey, grey+alpha, rgb and
* rgb+alpha, as well as on-the-fly color model conversion.
*
* @todo handle lossless 16bit data
* @todo add a test suite
* @todo internally handle RGB/gray conversion in read_png_raw()
* @todo handle deinterlacing as a libpng transform function
*
* @author Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <assert.h>
/* option to use a local version of the libpng */
#ifdef _LOCAL_LIBS
#include "png.h"
#else
#include <png.h>
/* Guoshen Yu, Windows version, 2010.10.16 */
/* #include "./libs/png/png.h" */
#endif
/* ensure consistency */
#include "io_png.h"
#define PNG_SIG_LEN 4
/* internal only datatype identifiers */
#define IO_PNG_U8 0x0001 /* 8bit unsigned integer */
#define IO_PNG_F32 0x0002 /* 32bit float */
/*
* READ
*/
/**
* @brief internal function used to cleanup the memory when
* png_read_raw() fails
*
* @param fp file pointer to close, ignored if NULL
* @param png_ptr_p, info_ptr_p, pointers to PNG structure pointers,
* ignored if NULL
* @return NULL
*/
static void *read_png_abort(FILE * fp,
png_structp * png_ptr_p, png_infop * info_ptr_p)
{
png_destroy_read_struct(png_ptr_p, info_ptr_p, NULL);
if (NULL != fp && stdin != fp)
(void) fclose(fp);
return NULL;
}
/**
* @brief internal function used to read a PNG file into an array
*
* @todo don't loose 16bit info
*
* @param fname PNG file name, "-" means stdin
* @param nx, ny, nc pointers to variables to be filled
* with the number of columns, lines and channels of the image
* @param transform a PNG_TRANSFORM to be added to the default read transforms
* @param dtype identifier for the data type to be used for output
* @return pointer to an allocated array of pixels,
* or NULL if an error happens
*/
static void *read_png_raw(const char *fname,
size_t * nx, size_t * ny, size_t * nc,
int transform, int dtype)
{
png_byte png_sig[PNG_SIG_LEN];
png_structp png_ptr;
png_infop info_ptr;
png_bytepp row_pointers;
png_bytep row_ptr;
/* volatile : because of setjmp/longjmp */
FILE *volatile fp = NULL;
void *data = NULL;
unsigned char *data_u8 = NULL;
unsigned char *data_u8_ptr = NULL;
float *data_f32 = NULL;
float *data_f32_ptr = NULL;
size_t size;
size_t i, j, k;
/* parameters check */
if (NULL == fname || NULL == nx || NULL == ny || NULL == nc)
return NULL;
if (IO_PNG_U8 != dtype && IO_PNG_F32 != dtype)
return NULL;
/* open the PNG input file */
if (0 == strcmp(fname, "-"))
fp = stdin;
else if (NULL == (fp = fopen(fname, "rb")))
return NULL;
/* read in some of the signature bytes and check this signature */
if ((PNG_SIG_LEN != fread(png_sig, 1, PNG_SIG_LEN, fp))
|| 0 != png_sig_cmp(png_sig, (png_size_t) 0, PNG_SIG_LEN))
return read_png_abort(fp, NULL, NULL);
/*
* create and initialize the png_struct
* with the default stderr and error handling
*/
if (NULL == (png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
NULL, NULL, NULL)))
return read_png_abort(fp, NULL, NULL);
/* allocate/initialize the memory for image information */
if (NULL == (info_ptr = png_create_info_struct(png_ptr)))
return read_png_abort(fp, &png_ptr, NULL);
/* set error handling */
if (0 != setjmp(png_jmpbuf(png_ptr)))
/* if we get here, we had a problem reading the file */
/* free all of the memory associated with the png_ptr and info_ptr */
return read_png_abort(fp, &png_ptr, &info_ptr);
/* set up the input control using standard C streams */
png_init_io(png_ptr, fp);
/* let libpng know that some bytes have been read */
png_set_sig_bytes(png_ptr, PNG_SIG_LEN);
/*
* set the read filter transforms, to get 8bit RGB whatever the
* original file may contain:
* PNG_TRANSFORM_STRIP_16 strip 16-bit samples to 8 bits
* PNG_TRANSFORM_PACKING expand 1, 2 and 4-bit
* samples to bytes
*/
transform |= (PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING);
/* read in the entire image at once */
png_read_png(png_ptr, info_ptr, transform, NULL);
/* get image informations */
*nx = (size_t) png_get_image_width(png_ptr, info_ptr);
*ny = (size_t) png_get_image_height(png_ptr, info_ptr);
*nc = (size_t) png_get_channels(png_ptr, info_ptr);
row_pointers = png_get_rows(png_ptr, info_ptr);
/*
* allocate the output data RGB array
* deinterlace and convert png RGB RGB RGB 8bit to RRR GGG BBB
* the image is deinterlaced layer after layer
* this generic loop also works for one single channel
*/
size = *nx * *ny * *nc;
switch (dtype)
{
case IO_PNG_U8:
if (NULL == (data_u8 =
(unsigned char *) malloc(size * sizeof(unsigned char))))
return read_png_abort(fp, &png_ptr, &info_ptr);
data = (void *) data_u8;
for (k = 0; k < *nc; k++)
{
/* channel loop */
data_u8_ptr = data_u8 + (size_t) (*nx * *ny * k);
for (j = 0; j < *ny; j++)
{
/* row loop */
row_ptr = row_pointers[j] + k;
for (i = 0; i < *nx; i++)
{
/* pixel loop */
*data_u8_ptr++ = (unsigned char) *row_ptr;
row_ptr += *nc;
}
}
}
break;
case IO_PNG_F32:
if (NULL == (data_f32 = (float *) malloc(size * sizeof(float))))
return read_png_abort(fp, &png_ptr, &info_ptr);
data = (void *) data_f32;
for (k = 0; k < *nc; k++)
{
/* channel loop */
data_f32_ptr = data_f32 + (size_t) (*nx * *ny * k);
for (j = 0; j < *ny; j++)
{
/* row loop */
row_ptr = row_pointers[j] + k;
for (i = 0; i < *nx; i++)
{
/* pixel loop */
*data_f32_ptr++ = (float) *row_ptr;
row_ptr += *nc;
}
}
}
break;
}
/* clean up and free any memory allocated, close the file */
(void) read_png_abort(fp, &png_ptr, &info_ptr);
return data;
}
/**
* @brief read a PNG file into a 8bit integer array
*
* The array contains the deinterlaced channels.
* 1, 2 and 4bit images are converted to 8bit.
* 16bit images are previously downscaled to 8bit.
*
* @todo don't downscale 16bit images.
*
* @param fname PNG file name
* @param nx, ny, nc pointers to variables to be filled with the number of
* columns, lines and channels of the image
* @return pointer to an allocated unsigned char array of pixels,
* or NULL if an error happens
*/
unsigned char *read_png_u8(const char *fname,
size_t * nx, size_t * ny, size_t * nc)
{
/* read the image as unsigned char */
return (unsigned char *) read_png_raw(fname, nx, ny, nc,
PNG_TRANSFORM_IDENTITY, IO_PNG_U8);
}
/**
* @brief read a PNG file into a 8bit integer array, converted to RGB
*
* See read_png_u8() for details.
*/
unsigned char *read_png_u8_rgb(const char *fname, size_t * nx, size_t * ny)
{
size_t nc;
unsigned char *img;
/* read the image */
img = (unsigned char *) read_png_raw(fname, nx, ny, &nc,
PNG_TRANSFORM_STRIP_ALPHA,
IO_PNG_U8);
if (NULL == img)
/* error */
return NULL;
if (3 == nc)
/* already RGB */
return img;
else
{
/* convert to RGB */
unsigned char *ptr_r, *ptr_g, *ptr_b, *ptr_end;
/* resize the image */
img = realloc(img, 3 * *nx * *ny * sizeof(unsigned char));
/* gray->RGB conversion */
ptr_r = img;
ptr_end = ptr_r + *nx * *ny;
ptr_g = img + *nx * *ny;
ptr_b = img + 2 * *nx * *ny;
while (ptr_r < ptr_end)
{
*ptr_g++ = *ptr_r;
*ptr_b++ = *ptr_r++;
}
return img;
}
}
/**
* @brief read a PNG file into a 8bit integer array, converted to gray
*
* See read_png_u8() for details.
*/
unsigned char *read_png_u8_gray(const char *fname, size_t * nx, size_t * ny)
{
size_t nc;
unsigned char *img;
/* read the image */
img = (unsigned char *) read_png_raw(fname, nx, ny, &nc,
PNG_TRANSFORM_STRIP_ALPHA,
IO_PNG_U8);
if (NULL == img)
/* error */
return NULL;
if (1 == nc)
/* already gray */
return img;
else
{
/* convert to gray */
unsigned char *ptr_r, *ptr_g, *ptr_b, *ptr_gray, *ptr_end;
/*
* RGB->gray conversion
* Y = (6969 * R + 23434 * G + 2365 * B)/32768
* integer approximation of
* Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
*/
ptr_r = img;
ptr_g = img + *nx * *ny;
ptr_b = img + 2 * *nx * *ny;
ptr_gray = img;
ptr_end = ptr_gray + *nx * *ny;
while (ptr_gray < ptr_end)
*ptr_gray++ = (unsigned char) (6969 * *ptr_r++
+ 23434 * *ptr_g++
+ 2365 * *ptr_b++) / 32768;
/* resize and return the image */
img = realloc(img, *nx * *ny * sizeof(unsigned char));
return img;
}
}
/**
* @brief read a PNG file into a 32bit float array
*
* The array contains the deinterlaced channels.
* 1, 2, 4 and 8bit images are converted to float values
* between 0. and 1., 3., 15. or 255.
* 16bit images are also downscaled to 8bit before conversion.
*
* @param fname PNG file name
* @param nx, ny, nc pointers to variables to be filled with the number of
* columns, lines and channels of the image
* @return pointer to an allocated unsigned char array of pixels,
* or NULL if an error happens
*/
float *read_png_f32(const char *fname, size_t * nx, size_t * ny, size_t * nc)
{
/* read the image as float */
return (float *) read_png_raw(fname, nx, ny, nc,
PNG_TRANSFORM_IDENTITY, IO_PNG_F32);
}
/**
* @brief read a PNG file into a 32bit float array, converted to RGB
*
* See read_png_f32() for details.
*/
float *read_png_f32_rgb(const char *fname, size_t * nx, size_t * ny)
{
size_t nc;
float *img;
/* read the image */
img = (float *) read_png_raw(fname, nx, ny, &nc,
PNG_TRANSFORM_STRIP_ALPHA, IO_PNG_F32);
if (NULL == img)
/* error */
return NULL;
if (3 == nc)
/* already RGB */
return img;
else
{
/* convert to RGB */
float *ptr_r, *ptr_g, *ptr_b, *ptr_end;
/* resize the image */
img = realloc(img, 3 * *nx * *ny * sizeof(float));
/* gray->RGB conversion */
ptr_r = img;
ptr_end = ptr_r + *nx * *ny;
ptr_g = img + *nx * *ny;
ptr_b = img + 2 * *nx * *ny;
while (ptr_r < ptr_end)
{
*ptr_g++ = *ptr_r;
*ptr_b++ = *ptr_r++;
}
return img;
}
}
/**
* @brief read a PNG file into a 32bit float array, converted to gray
*
* See read_png_f32() for details.
*/
float *read_png_f32_gray(const char *fname, size_t * nx, size_t * ny)
{
size_t nc;
float *img;
/* read the image */
img = (float *) read_png_raw(fname, nx, ny, &nc,
PNG_TRANSFORM_STRIP_ALPHA, IO_PNG_F32);
if (NULL == img)
/* error */
return NULL;
if (1 == nc)
/* already gray */
return img;
else
{
/* convert to gray */
float *ptr_r, *ptr_g, *ptr_b, *ptr_gray, *ptr_end;
/*
* RGB->gray conversion
* Y = (6969 * R + 23434 * G + 2365 * B)/32768
* integer approximation of
* Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
*/
ptr_r = img;
ptr_g = img + *nx * *ny;
ptr_b = img + 2 * *nx * *ny;
ptr_gray = img;
ptr_end = ptr_gray + *nx * *ny;
while (ptr_gray < ptr_end)
*ptr_gray++ = (float) (6969 * *ptr_r++
+ 23434 * *ptr_g++
+ 2365 * *ptr_b++) / 32768;
/* resize and return the image */
img = realloc(img, *nx * *ny * sizeof(float));
return img;
}
}
/*
* WRITE
*/
/**
* @brief internal function used to cleanup the memory when
* png_write_raw() fails
*
* @param fp file pointer to close, ignored if NULL
* @param idata, row_pointers arrays to free, ignored if NULL
* @param png_ptr_p, info_ptr_p, pointers to PNG structure pointers,
* ignored if NULL
* @return -1
*/
static int write_png_abort(FILE * fp,
png_byte * idata, png_bytep * row_pointers,
png_structp * png_ptr_p, png_infop * info_ptr_p)
{
png_destroy_write_struct(png_ptr_p, info_ptr_p);
if (NULL != row_pointers)
free(row_pointers);
if (NULL != idata)
free(idata);
if (NULL != fp && stdout != fp)
(void) fclose(fp);
return -1;
}
/**
* @brief internal function used to write a byte array as a PNG file
*
* The PNG file is written as a 8bit image file, interlaced,
* truecolor. Depending on the number of channels, the color model is
* gray, gray+alpha, rgb, rgb+alpha.
*
* @todo handle 16bit
*
* @param fname PNG file name, "-" means stdout
* @param data deinterlaced (RRR..GGG..BBB..AAA) image byte array
* @param nx, ny, nc number of columns, lines and channels
* @param dtype identifier for the data type to be used for output
* @return 0 if everything OK, -1 if an error occured
*/
static int write_png_raw(const char *fname, const void *data,
size_t nx, size_t ny, size_t nc, int dtype)
{
png_structp png_ptr;
png_infop info_ptr;
png_byte *idata = NULL, *idata_ptr = NULL;
png_bytep *row_pointers = NULL;
png_byte bit_depth;
/* volatile : because of setjmp/longjmp */
FILE *volatile fp;
const unsigned char *data_u8 = NULL;
const unsigned char *data_u8_ptr = NULL;
const float *data_f32 = NULL;
const float *data_f32_ptr = NULL;
float tmp;
int color_type, interlace, compression, filter;
size_t size;
size_t i, j, k;
/* parameters check */
if (0 >= nx || 0 >= ny || 0 >= nc)
return -1;
if (NULL == fname || NULL == data)
return -1;
if (IO_PNG_U8 != dtype && IO_PNG_F32 != dtype)
return -1;
/* open the PNG output file */
if (0 == strcmp(fname, "-"))
fp = stdout;
else if (NULL == (fp = fopen(fname, "wb")))
return -1;
/* allocate the interlaced array and row pointers */
size = nx * ny * nc;
if (NULL == (idata = (png_byte *) malloc(size * sizeof(png_byte))))
return write_png_abort(fp, NULL, NULL, NULL, NULL);
if (NULL == (row_pointers = (png_bytep *) malloc(ny * sizeof(png_bytep))))
return write_png_abort(fp, idata, NULL, NULL, NULL);
/*
* create and initialize the png_struct
* with the default stderr and error handling
*/
if (NULL == (png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
NULL, NULL, NULL)))
return write_png_abort(fp, idata, row_pointers, NULL, NULL);
/* allocate/initialize the memory for image information */
if (NULL == (info_ptr = png_create_info_struct(png_ptr)))
return write_png_abort(fp, idata, row_pointers, &png_ptr, NULL);
/* set error handling */
if (0 != setjmp(png_jmpbuf(png_ptr)))
/* if we get here, we had a problem reading the file */
return write_png_abort(fp, idata, row_pointers, &png_ptr, &info_ptr);
/* set up the input control using standard C streams */
png_init_io(png_ptr, fp);
/* set image informations */
bit_depth = 8;
switch (nc)
{
case 1:
color_type = PNG_COLOR_TYPE_GRAY;
break;
case 2:
color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
break;
case 3:
color_type = PNG_COLOR_TYPE_RGB;
break;
case 4:
color_type = PNG_COLOR_TYPE_RGB_ALPHA;
break;
default:
png_destroy_read_struct(&png_ptr, NULL, NULL);
free(row_pointers);
free(idata);
(void) fclose(fp);
return -1;
}
interlace = PNG_INTERLACE_ADAM7;
compression = PNG_COMPRESSION_TYPE_BASE;
filter = PNG_FILTER_TYPE_BASE;
/* set image header */
png_set_IHDR(png_ptr, info_ptr, (png_uint_32) nx, (png_uint_32) ny,
bit_depth, color_type, interlace, compression, filter);
/* TODO : significant bit (sBIT), gamma (gAMA), comments (text) chunks */
png_write_info(png_ptr, info_ptr);
/*
* interlace and convert RRR GGG BBB to RGB RGB RGB
* the image is interlaced layer after layer
* this involves more memory exchange, but allows a generic loop
*/
switch (dtype)
{
case IO_PNG_U8:
data_u8 = (unsigned char *) data;
for (k = 0; k < nc; k++)
{
/* channel loop */
data_u8_ptr = data_u8 + (size_t) (nx * ny * k);
idata_ptr = idata + (size_t) k;
for (j = 0; j < ny; j++)
{
/* row loop */
for (i = 0; i < nx; i++)
{
/* pixel loop */
*idata_ptr = (png_byte) * data_u8_ptr++;
idata_ptr += nc;
}
}
}
break;
case IO_PNG_F32:
data_f32 = (float *) data;
for (k = 0; k < nc; k++)
{
/* channel loop */
data_f32_ptr = data_f32 + (size_t) (nx * ny * k);
idata_ptr = idata + (size_t) k;
for (j = 0; j < ny; j++)
{
/* row loop */
for (i = 0; i < nx; i++)
{
/* pixel loop */
tmp = floor(*data_f32_ptr++ + .5);
*idata_ptr = (png_byte) (tmp < 0. ? 0. :
(tmp > 255. ? 255. : tmp));
idata_ptr += nc;
}
}
}
break;
}
/* set row pointers */
for (j = 0; j < ny; j++)
row_pointers[j] = idata + (size_t) (nc * nx * j);
/* write out the entire image and end it */
png_write_image(png_ptr, row_pointers);
png_write_end(png_ptr, info_ptr);
/* clean up and free any memory allocated, close the file */
(void) write_png_abort(fp, idata, row_pointers, &png_ptr, &info_ptr);
return 0;
}
/**
* @brief write a 8bit unsigned integer array into a PNG file
*
* @param fname PNG file name
* @param data array to write
* @param nx, ny, nc number of columns, lines and channels of the image
* @return 0 if everything OK, -1 if an error occured
*/
int write_png_u8(const char *fname, const unsigned char *data,
size_t nx, size_t ny, size_t nc)
{
return write_png_raw(fname, (void *) data,
(png_uint_32) nx, (png_uint_32) ny, (png_byte) nc,
IO_PNG_U8);
}
/**
* @brief write a float array into a PNG file
*
* The float values are rounded to 8bit integers, and bounded to [0, 255].
*
* @todo handle 16bit images and flexible min/max
*
* @param fname PNG file name
* @param data array to write
* @param nx, ny, nc number of columns, lines and channels of the image
* @return 0 if everything OK, -1 if an error occured
*/
int write_png_f32(const char *fname, const float *data,
size_t nx, size_t ny, size_t nc)
{
return write_png_raw(fname, (void *) data,
(png_uint_32) nx, (png_uint_32) ny, (png_byte) nc,
IO_PNG_F32);
}

View file

@ -0,0 +1,19 @@
#ifdef __cplusplus
extern "C" {
#endif
#define IO_PNG_VERSION 0.20100727
/* io_png.c */
unsigned char *read_png_u8(const char *fname, size_t *nx, size_t *ny, size_t *nc);
unsigned char *read_png_u8_rgb(const char *fname, size_t *nx, size_t *ny);
unsigned char *read_png_u8_gray(const char *fname, size_t *nx, size_t *ny);
float *read_png_f32(const char *fname, size_t *nx, size_t *ny, size_t *nc);
float *read_png_f32_rgb(const char *fname, size_t *nx, size_t *ny);
float *read_png_f32_gray(const char *fname, size_t *nx, size_t *ny);
int write_png_u8(const char *fname, const unsigned char *data, size_t nx, size_t ny, size_t nc);
int write_png_f32(const char *fname, const float *data, size_t nx, size_t ny, size_t nc);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,16 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View file

@ -0,0 +1,2 @@
ADD_SUBDIRECTORY(zlib)
ADD_SUBDIRECTORY(png)

View file

@ -0,0 +1,122 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/CMakeFiles/progress.marks
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

View file

@ -0,0 +1,41 @@
# Install script for directory: /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
IF(BUILD_TYPE)
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME "")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT)
IF(COMPONENT)
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
# Install shared libraries without execute permission?
IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
SET(CMAKE_INSTALL_SO_NO_EXE "1")
ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
IF(NOT CMAKE_INSTALL_LOCAL_ONLY)
# Include the install script for each subdirectory.
INCLUDE("/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/cmake_install.cmake")
INCLUDE("/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/cmake_install.cmake")
ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY)

View file

@ -0,0 +1,49 @@
# Copyright 2010 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# This makefile imports and compiles libraries libraries
# for local use in static form
DEST_DIR = build
LIB_DIR = $(DEST_DIR)/lib
INC_DIR = $(DEST_DIR)/include
#
# COMMON
#
default : all
all : zlib libpng libtiff libjpeg
$(LIB_DIR) $(INC_DIR) :
mkdir -p $@
$(LIB_DIR)/% $(INC_DIR)/% :
cp $(filter %.h %.a, $^) $@
-include makefile.zlib
-include makefile.libpng
-include makefile.libjpeg
-include makefile.libtiff
#
# HOUSEKEEPING
#
.PHONY : clean distclean scrub
clean :
$(RM) -r $(ZLIB_DIR)
$(RM) -r $(LIBPNG_DIR)
$(RM) -r $(LIBJPEG_DIR)
$(RM) -r $(LIBTIFF_DIR)
distclean : clean
$(RM) -r $(DEST_DIR)
scrub : distclean
$(RM) $(ZLIB_ARC)
$(RM) $(LIBPNG_ARC)
$(RM) $(LIBJPEG_ARC)
$(RM) $(LIBTIFF_ARC)

View file

@ -0,0 +1,49 @@
# Copyright 2010 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# This makefile imports and compiles libraries libraries
# for local use in static form
LIBJPEG_LIB = $(LIB_DIR)/libjpeg.a
LIBJPEG_INC = $(addprefix $(INC_DIR), jconfig.h jerror.h jmorecfg.h jpeglib.h)
LIBJPEG_FILES = $(LIBJPEG_LIB) $(LIBJPEG_INC)
LIBJPEG_DIR = jpeg-8b
LIBJPEG_ARC = jpegsrc.v8b.tar.gz
LIBJPEG_URL = http://www.ijg.org/files/jpegsrc.v8b.tar.gz
#
# LIBJPEG
#
.PHONY : libjpeg
libjpeg : $(LIBJPEG_DIR)
$(LIBJPEG_FILES) : $(LIB_DIR) $(INC_DIR)
$(LIB_DIR)/libjpeg.a : $(LIBJPEG_DIR)/lib/libjpeg.a
$(INC_DIR)/jconfig.h : $(LIBJPEG_DIR)/include/jconfig.h
$(INC_DIR)/jerror.h : $(LIBJPEG_DIR)/include/jerror.h
$(INC_DIR)/jmorecfg.h : $(LIBJPEG_DIR)/include/jmorecfg.h
$(INC_DIR)/jpeglib.h : $(LIBJPEG_DIR)/include/jpeglib.h
$(LIBJPEG_DIR)/lib/libjpeg.a : $(LIBJPEG_DIR)
cd ./$(LIBJPEG_DIR)/; ./configure \
--enable-static \
--disable-shared \
--prefix=$$PWD
$(MAKE) -C $(LIBJPEG_DIR) libjpeg.la
$(MAKE) -C $(LIBJPEG_DIR) install
$(LIBJPEG_DIR)/jconfig.h : $(LIBJPEG_DIR)
$(LIBJPEG_DIR)/jerror.h : $(LIBJPEG_DIR)
$(LIBJPEG_DIR)/jmorecfg.h : $(LIBJPEG_DIR)
$(LIBJPEG_DIR)/jpeglib.h : $(LIBJPEG_DIR)
$(LIBJPEG_DIR) : $(LIBJPEG_ARC)
tar xvzf $<
touch $@
$(LIBJPEG_ARC) :
curl -L $(LIBJPEG_URL) > $@

View file

@ -0,0 +1,45 @@
# Copyright 2010 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# This makefile imports and compiles libraries libraries
# for local use in static form
LIBPNG_LIB = $(LIB_DIR)/libpng.a
LIBPNG_INC = $(addprefix $(INC_DIR)/, png.h pngconf.h)
LIBPNG_FILES = $(LIBPNG_LIB) $(LIBPNG_INC)
LIBPNG_DIR = libpng-1.4.3
LIBPNG_ARC = libpng-1.4.3.tar.gz
LIBPNG_URL = http://sourceforge.net/projects/libpng/files/01-libpng-master/1.4.3/libpng-1.4.3.tar.gz/download
#
# LIBPNG
#
.PHONY : libpng
libpng : $(LIBPNG_FILES)
$(LIBPNG_FILES) : $(LIB_DIR) $(INC_DIR)
$(LIB_DIR)/libpng.a : $(LIBPNG_DIR)/lib/libpng.a
$(INC_DIR)/png.h : $(LIBPNG_DIR)/png.h
$(INC_DIR)/pngconf.h : $(LIBPNG_DIR)/pngconf.h
$(LIBPNG_DIR)/lib/libpng.a : $(LIBPNG_DIR) $(ZLIB_FILES)
cd ./$(LIBPNG_DIR)/; ./configure \
--enable-static \
--disable-shared \
--prefix=$$PWD
$(MAKE) -C $(LIBPNG_DIR) libpng14.la ZLIBLIB=../ ZLIBINC=../
$(MAKE) -C $(LIBPNG_DIR) install
$(LIBPNG_DIR)/png.h : $(LIBPNG_DIR)
$(LIBPNG_DIR)/pngconf.h : $(LIBPNG_DIR)
$(LIBPNG_DIR) : $(LIBPNG_ARC)
tar xvzf $<
touch $@
$(LIBPNG_ARC) :
curl -L $(LIBPNG_URL) > $@

View file

@ -0,0 +1,55 @@
# Copyright 2010 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# This makefile imports and compiles libraries libraries
# for local use in static form
LIBTIFF_LIB = $(LIB_DIR)/libtiff.a
LIBTIFF_INC = $(addprefix $(INC_DIR)/, tiffconf.h tiff.h tiffio.h tiffvers.h)
LIBTIFF_FILES = $(LIBTIFF_LIB) $(LIBTIFF_INC)
LIBTIFF_DIR = tiff-3.9.4
LIBTIFF_ARC = tiff-3.9.4.tar.gz
LIBTIFF_URL = http://download.osgeo.org/libtiff/tiff-3.9.4.tar.gz
#
# LIBTIFF
#
.PHONY : libtiff
libtiff : $(LIBTIFF_FILES)
$(LIBTIFF_FILES) : $(LIB_DIR) $(INC_DIR)
$(LIB_DIR)/libtiff.a : $(LIBTIFF_DIR)/lib/libtiff.a
$(INC_DIR)/tiff.h : $(LIBTIFF_DIR)/include/tiff.h
$(INC_DIR)/tiffio.h : $(LIBTIFF_DIR)/include/tiffio.h
$(INC_DIR)/tiffconf.h : $(LIBTIFF_DIR)/include/tiffconf.h
$(INC_DIR)/tiffvers.h : $(LIBTIFF_DIR)/include/tiffvers.h
$(LIBTIFF_DIR)/lib/libtiff.a : $(LIBTIFF_DIR) $(ZLIB_FILES) $(LIBJPEG_FILES)
cd ./$(LIBTIFF_DIR)/; ./configure \
--with-zlib-include-dir=../ \
--with-zlib-lib-dir=../ \
--with-jpeg-include-dir=../ \
--with-jpeg-lib-dir=../ \
--disable-cxx \
--enable-static \
--disable-shared \
--disable-rpath --prefix=$$PWD
$(MAKE) -C $(LIBTIFF_DIR)/port libport.la
$(MAKE) -C $(LIBTIFF_DIR)/libtiff libtiff.la
$(MAKE) -C $(LIBTIFF_DIR)/libtiff install
$(LIBTIFF_DIR)/include/tiff.h : $(LIBTIFF_DIR)
$(LIBTIFF_DIR)/include/tiffio.h : $(LIBTIFF_DIR)
$(LIBTIFF_DIR)/include/tiffconf.h : $(LIBTIFF_DIR)
$(LIBTIFF_DIR)/include/tiffvers.h : $(LIBTIFF_DIR)
$(LIBTIFF_DIR) : $(LIBTIFF_ARC)
tar xvzf $<
touch $@
$(LIBTIFF_ARC) :
curl -L $(LIBTIFF_URL) > $@

View file

@ -0,0 +1,41 @@
# Copyright 2010 Nicolas Limare <nicolas.limare@cmla.ens-cachan.fr>
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty provided
# the copyright notice and this notice are preserved. This file is
# offered as-is, without any warranty.
#
# This makefile imports and compiles libraries libraries
# for local use in static form
ZLIB_LIB = $(LIB_DIR)/libz.a
ZLIB_INC = $(addprefix $(INC_DIR)/, zlib.h zconf.h)
ZLIB_FILES = $(ZLIB_LIB) $(ZLIB_INC)
ZLIB_DIR = zlib-1.2.5
ZLIB_ARC = zlib-1.2.5.tar.gz
ZLIB_URL = http://sourceforge.net/projects/libpng/files/zlib/1.2.5/zlib-1.2.5.tar.gz/download
#
# ZLIB
#
.PHONY : zlib
zlib : $(ZLIB_FILES)
$(ZLIB_FILES) : $(LIB_DIR) $(INC_DIR)
$(LIB_DIR)/libz.a : $(ZLIB_DIR)/libz.a
$(INC_DIR)/zlib.h : $(ZLIB_DIR)/zlib.h
$(INC_DIR)/zconf.h : $(ZLIB_DIR)/zconf.h
$(ZLIB_DIR)/libz.a : $(ZLIB_DIR)
cd ./$(ZLIB_DIR)/; ./configure --static
$(MAKE) -C $(ZLIB_DIR) libz.a
$(ZLIB_DIR)/zlib.h : $(ZLIB_DIR)
$(ZLIB_DIR)/zconf.h : $(ZLIB_DIR)
$(ZLIB_DIR) : $(ZLIB_ARC)
tar xvzf $<
touch $@
$(ZLIB_ARC) :
curl -L $(ZLIB_URL) > $@

View file

@ -0,0 +1,16 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View file

@ -0,0 +1,132 @@
#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">])
#IncludeRegexScan: ^.*$
#IncludeRegexComplain: ^$
#IncludeRegexTransform:
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
../zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
crtdbg.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
pngusr.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngusr.h
config.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/config.h
windows.h
-
stdio.h
-
stdio.h
-
sys/types.h
-
setjmp.h
-
strings.h
-
string.h
-
stdlib.h
-
fp.h
-
math.h
-
m68881.h
-
mem.h
-
alloc.h
-
malloc.h
-
time.h
-
dos.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngerror.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pnggccrd.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngget.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngmem.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngpread.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngread.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrio.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrtran.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrutil.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngset.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngtrans.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngvcrd.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwio.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwrite.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwtran.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwutil.c
png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
windows.h
-
sys/types.h
-
unistd.h
-
unixio.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h

View file

@ -0,0 +1,38 @@
# The set of languages for which implicit dependencies are needed:
SET(CMAKE_DEPENDS_LANGUAGES
"C"
)
# The set of files for implicit dependencies of each language:
SET(CMAKE_DEPENDS_CHECK_C
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/png.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngerror.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pnggccrd.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngget.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngget.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngmem.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngpread.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngread.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngread.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrio.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrtran.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrutil.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngset.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngset.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngtrans.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngvcrd.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwio.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwrite.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwtran.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwutil.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o"
)
SET(CMAKE_C_COMPILER_ID "GNU")
# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/DependInfo.cmake"
)
# The include file search paths:
SET(CMAKE_C_TARGET_INCLUDE_PATH
"io_png/libs/png/../zlib"
)
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})

View file

@ -0,0 +1,519 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# Include any dependencies generated for this target.
include io_png/libs/png/CMakeFiles/png.dir/depend.make
# Include the progress variables for this target.
include io_png/libs/png/CMakeFiles/png.dir/progress.make
# Include the compile flags for this target's objects.
include io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/png/pngget.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_1)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngget.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngget.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngget.c
io_png/libs/png/CMakeFiles/png.dir/pngget.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngget.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngget.c > CMakeFiles/png.dir/pngget.c.i
io_png/libs/png/CMakeFiles/png.dir/pngget.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngget.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngget.c -o CMakeFiles/png.dir/pngget.c.s
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngget.c.o
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/png/pngrio.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_2)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngrio.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrio.c
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngrio.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrio.c > CMakeFiles/png.dir/pngrio.c.i
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngrio.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrio.c -o CMakeFiles/png.dir/pngrio.c.s
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/png/pngwrite.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_3)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngwrite.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwrite.c
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngwrite.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwrite.c > CMakeFiles/png.dir/pngwrite.c.i
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngwrite.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwrite.c -o CMakeFiles/png.dir/pngwrite.c.s
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/png/png.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_4)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/png.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/png.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.c
io_png/libs/png/CMakeFiles/png.dir/png.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/png.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.c > CMakeFiles/png.dir/png.c.i
io_png/libs/png/CMakeFiles/png.dir/png.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/png.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.c -o CMakeFiles/png.dir/png.c.s
io_png/libs/png/CMakeFiles/png.dir/png.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/png.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/png.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/png.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/png.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/png.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/png.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/png.c.o
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/png/pngmem.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_5)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngmem.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngmem.c
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngmem.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngmem.c > CMakeFiles/png.dir/pngmem.c.i
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngmem.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngmem.c -o CMakeFiles/png.dir/pngmem.c.s
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/png/pngrtran.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_6)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngrtran.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrtran.c
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngrtran.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrtran.c > CMakeFiles/png.dir/pngrtran.c.i
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngrtran.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrtran.c -o CMakeFiles/png.dir/pngrtran.c.s
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/png/pngtrans.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_7)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngtrans.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngtrans.c
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngtrans.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngtrans.c > CMakeFiles/png.dir/pngtrans.c.i
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngtrans.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngtrans.c -o CMakeFiles/png.dir/pngtrans.c.s
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/png/pngwtran.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_8)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngwtran.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwtran.c
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngwtran.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwtran.c > CMakeFiles/png.dir/pngwtran.c.i
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngwtran.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwtran.c -o CMakeFiles/png.dir/pngwtran.c.s
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/png/pngerror.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_9)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngerror.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngerror.c
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngerror.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngerror.c > CMakeFiles/png.dir/pngerror.c.i
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngerror.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngerror.c -o CMakeFiles/png.dir/pngerror.c.s
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/png/pngpread.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_10)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngpread.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngpread.c
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngpread.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngpread.c > CMakeFiles/png.dir/pngpread.c.i
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngpread.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngpread.c -o CMakeFiles/png.dir/pngpread.c.s
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/png/pngrutil.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_11)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngrutil.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrutil.c
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngrutil.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrutil.c > CMakeFiles/png.dir/pngrutil.c.i
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngrutil.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrutil.c -o CMakeFiles/png.dir/pngrutil.c.s
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o: io_png/libs/png/pngvcrd.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_12)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngvcrd.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngvcrd.c
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngvcrd.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngvcrd.c > CMakeFiles/png.dir/pngvcrd.c.i
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngvcrd.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngvcrd.c -o CMakeFiles/png.dir/pngvcrd.c.s
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/png/pngwutil.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_13)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngwutil.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwutil.c
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngwutil.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwutil.c > CMakeFiles/png.dir/pngwutil.c.i
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngwutil.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwutil.c -o CMakeFiles/png.dir/pngwutil.c.s
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o: io_png/libs/png/pnggccrd.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_14)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pnggccrd.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pnggccrd.c
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pnggccrd.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pnggccrd.c > CMakeFiles/png.dir/pnggccrd.c.i
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pnggccrd.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pnggccrd.c -o CMakeFiles/png.dir/pnggccrd.c.s
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/png/pngread.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_15)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngread.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngread.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngread.c
io_png/libs/png/CMakeFiles/png.dir/pngread.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngread.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngread.c > CMakeFiles/png.dir/pngread.c.i
io_png/libs/png/CMakeFiles/png.dir/pngread.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngread.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngread.c -o CMakeFiles/png.dir/pngread.c.s
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngread.c.o
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/png/pngset.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_16)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngset.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngset.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngset.c
io_png/libs/png/CMakeFiles/png.dir/pngset.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngset.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngset.c > CMakeFiles/png.dir/pngset.c.i
io_png/libs/png/CMakeFiles/png.dir/pngset.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngset.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngset.c -o CMakeFiles/png.dir/pngset.c.s
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngset.c.o
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/png/CMakeFiles/png.dir/flags.make
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/png/pngwio.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_17)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/png.dir/pngwio.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwio.c
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/png.dir/pngwio.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwio.c > CMakeFiles/png.dir/pngwio.c.i
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/png.dir/pngwio.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwio.c -o CMakeFiles/png.dir/pngwio.c.s
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.requires:
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.provides: io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.requires
$(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.provides.build
.PHONY : io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.provides
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.provides.build: io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o
# Object files for target png
png_OBJECTS = \
"CMakeFiles/png.dir/pngget.c.o" \
"CMakeFiles/png.dir/pngrio.c.o" \
"CMakeFiles/png.dir/pngwrite.c.o" \
"CMakeFiles/png.dir/png.c.o" \
"CMakeFiles/png.dir/pngmem.c.o" \
"CMakeFiles/png.dir/pngrtran.c.o" \
"CMakeFiles/png.dir/pngtrans.c.o" \
"CMakeFiles/png.dir/pngwtran.c.o" \
"CMakeFiles/png.dir/pngerror.c.o" \
"CMakeFiles/png.dir/pngpread.c.o" \
"CMakeFiles/png.dir/pngrutil.c.o" \
"CMakeFiles/png.dir/pngvcrd.c.o" \
"CMakeFiles/png.dir/pngwutil.c.o" \
"CMakeFiles/png.dir/pnggccrd.c.o" \
"CMakeFiles/png.dir/pngread.c.o" \
"CMakeFiles/png.dir/pngset.c.o" \
"CMakeFiles/png.dir/pngwio.c.o"
# External object files for target png
png_EXTERNAL_OBJECTS =
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngget.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/png.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngread.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngset.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/build.make
io_png/libs/png/libpng.a: io_png/libs/png/CMakeFiles/png.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking C static library libpng.a"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && $(CMAKE_COMMAND) -P CMakeFiles/png.dir/cmake_clean_target.cmake
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/png.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
io_png/libs/png/CMakeFiles/png.dir/build: io_png/libs/png/libpng.a
.PHONY : io_png/libs/png/CMakeFiles/png.dir/build
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngget.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/png.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngread.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngset.c.o.requires
io_png/libs/png/CMakeFiles/png.dir/requires: io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o.requires
.PHONY : io_png/libs/png/CMakeFiles/png.dir/requires
io_png/libs/png/CMakeFiles/png.dir/clean:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png && $(CMAKE_COMMAND) -P CMakeFiles/png.dir/cmake_clean.cmake
.PHONY : io_png/libs/png/CMakeFiles/png.dir/clean
io_png/libs/png/CMakeFiles/png.dir/depend:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/png.dir/DependInfo.cmake --color=$(COLOR)
.PHONY : io_png/libs/png/CMakeFiles/png.dir/depend

View file

@ -0,0 +1,26 @@
FILE(REMOVE_RECURSE
"CMakeFiles/png.dir/pngget.c.o"
"CMakeFiles/png.dir/pngrio.c.o"
"CMakeFiles/png.dir/pngwrite.c.o"
"CMakeFiles/png.dir/png.c.o"
"CMakeFiles/png.dir/pngmem.c.o"
"CMakeFiles/png.dir/pngrtran.c.o"
"CMakeFiles/png.dir/pngtrans.c.o"
"CMakeFiles/png.dir/pngwtran.c.o"
"CMakeFiles/png.dir/pngerror.c.o"
"CMakeFiles/png.dir/pngpread.c.o"
"CMakeFiles/png.dir/pngrutil.c.o"
"CMakeFiles/png.dir/pngvcrd.c.o"
"CMakeFiles/png.dir/pngwutil.c.o"
"CMakeFiles/png.dir/pnggccrd.c.o"
"CMakeFiles/png.dir/pngread.c.o"
"CMakeFiles/png.dir/pngset.c.o"
"CMakeFiles/png.dir/pngwio.c.o"
"libpng.pdb"
"libpng.a"
)
# Per-language clean rules from dependency scanning.
FOREACH(lang C)
INCLUDE(CMakeFiles/png.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)

View file

@ -0,0 +1,3 @@
FILE(REMOVE_RECURSE
"libpng.a"
)

View file

@ -0,0 +1,97 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
io_png/libs/png/CMakeFiles/png.dir/png.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngerror.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pnggccrd.c
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngget.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngmem.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngpread.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngread.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrio.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrtran.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngrutil.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngset.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngtrans.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngvcrd.c
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwio.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwrite.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwtran.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/png.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/pngwutil.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h

View file

@ -0,0 +1,97 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/png/png.c
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/png.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/png/pngerror.c
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o: io_png/libs/png/pnggccrd.c
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/png/pngget.c
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngget.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/png/pngmem.c
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/png/pngpread.c
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/png/pngread.c
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngread.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/png/pngrio.c
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/png/pngrtran.c
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/png/pngrutil.c
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/png/pngset.c
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngset.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/png/pngtrans.c
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o: io_png/libs/png/pngvcrd.c
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/png/pngwio.c
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/png/pngwrite.c
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/png/pngwtran.c
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o: io_png/libs/zlib/zlib.h
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/png/png.h
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/png/pngconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/png/pngwutil.c
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/zlib/zconf.h
io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o: io_png/libs/zlib/zlib.h

View file

@ -0,0 +1,8 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# compile C with /usr/bin/cc
C_FLAGS = -I/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/../zlib
C_DEFINES =

View file

@ -0,0 +1,2 @@
/usr/bin/ar cr libpng.a CMakeFiles/png.dir/pngget.c.o CMakeFiles/png.dir/pngrio.c.o CMakeFiles/png.dir/pngwrite.c.o CMakeFiles/png.dir/png.c.o CMakeFiles/png.dir/pngmem.c.o CMakeFiles/png.dir/pngrtran.c.o CMakeFiles/png.dir/pngtrans.c.o CMakeFiles/png.dir/pngwtran.c.o CMakeFiles/png.dir/pngerror.c.o CMakeFiles/png.dir/pngpread.c.o CMakeFiles/png.dir/pngrutil.c.o CMakeFiles/png.dir/pngvcrd.c.o CMakeFiles/png.dir/pngwutil.c.o CMakeFiles/png.dir/pnggccrd.c.o CMakeFiles/png.dir/pngread.c.o CMakeFiles/png.dir/pngset.c.o CMakeFiles/png.dir/pngwio.c.o
/usr/bin/ranlib libpng.a

View file

@ -0,0 +1,18 @@
CMAKE_PROGRESS_1 = 21
CMAKE_PROGRESS_2 = 22
CMAKE_PROGRESS_3 = 23
CMAKE_PROGRESS_4 = 24
CMAKE_PROGRESS_5 = 25
CMAKE_PROGRESS_6 = 26
CMAKE_PROGRESS_7 = 27
CMAKE_PROGRESS_8 = 28
CMAKE_PROGRESS_9 = 29
CMAKE_PROGRESS_10 = 30
CMAKE_PROGRESS_11 = 31
CMAKE_PROGRESS_12 = 32
CMAKE_PROGRESS_13 = 33
CMAKE_PROGRESS_14 = 34
CMAKE_PROGRESS_15 = 35
CMAKE_PROGRESS_16 = 36
CMAKE_PROGRESS_17 = 37

View file

@ -0,0 +1,19 @@
PROJECT(png)
SET(PNG_SRCS
pngget.c pngrio.c pngwrite.c png.c pngmem.c pngrtran.c pngtrans.c
pngwtran.c pngerror.c pngpread.c pngrutil.c pngvcrd.c pngwutil.c pnggccrd.c
pngread.c pngset.c pngwio.c pngconf.h png.h
)
IF (WIN32)
ADD_DEFINITIONS(-DPNG_STATIC)
# TODO(keir): I don't know why, but CMake *refuses* to add this to the
# command line flags. After much frustration, I am giving up and leaving the
# compile errors. Please, someone who knows CMake, try to fix this.
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
ENDIF (WIN32)
INCLUDE_DIRECTORIES(../zlib)
ADD_LIBRARY(png ${PNG_SRCS} )
TARGET_LINK_LIBRARIES(png zlib)

View file

@ -0,0 +1,109 @@
This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.2.6, August 15, 2004, through 1.2.37, June 4, 2009, are
Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
Cosmin Truta
libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
Simon-Pierre Cadieux
Eric S. Raymond
Gilles Vollant
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the
library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is with
the user.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-0.96,
with the following individuals added to the list of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996, 1997 Andreas Dilger
Distributed according to the same disclaimer and license as libpng-0.88,
with the following individuals added to the list of Contributing Authors:
John Bowler
Kevin Bracey
Sam Bushell
Magnus Holmgren
Greg Roelofs
Tom Tanner
libpng versions 0.5, May 1995, through 0.88, January 1996, are
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
assume no liability for direct, indirect, incidental, special, exemplary,
or consequential damages, which may result from the use of the PNG
Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
A "png_get_copyright" function is available, for convenient use in "about"
boxes and the like:
printf("%s",png_get_copyright(NULL));
Also, the PNG logo (in PNG format, of course) is supplied in the
files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
June 4, 2009

View file

@ -0,0 +1,596 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png/CMakeFiles/progress.marks
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/png/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/png/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/png/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/png/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
io_png/libs/png/CMakeFiles/png.dir/rule:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/png/CMakeFiles/png.dir/rule
.PHONY : io_png/libs/png/CMakeFiles/png.dir/rule
# Convenience name for target.
png: io_png/libs/png/CMakeFiles/png.dir/rule
.PHONY : png
# fast build rule for target.
png/fast:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/build
.PHONY : png/fast
png.o: png.c.o
.PHONY : png.o
# target to build an object file
png.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/png.c.o
.PHONY : png.c.o
png.i: png.c.i
.PHONY : png.i
# target to preprocess a source file
png.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/png.c.i
.PHONY : png.c.i
png.s: png.c.s
.PHONY : png.s
# target to generate assembly for a file
png.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/png.c.s
.PHONY : png.c.s
pngerror.o: pngerror.c.o
.PHONY : pngerror.o
# target to build an object file
pngerror.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngerror.c.o
.PHONY : pngerror.c.o
pngerror.i: pngerror.c.i
.PHONY : pngerror.i
# target to preprocess a source file
pngerror.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngerror.c.i
.PHONY : pngerror.c.i
pngerror.s: pngerror.c.s
.PHONY : pngerror.s
# target to generate assembly for a file
pngerror.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngerror.c.s
.PHONY : pngerror.c.s
pnggccrd.o: pnggccrd.c.o
.PHONY : pnggccrd.o
# target to build an object file
pnggccrd.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.o
.PHONY : pnggccrd.c.o
pnggccrd.i: pnggccrd.c.i
.PHONY : pnggccrd.i
# target to preprocess a source file
pnggccrd.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.i
.PHONY : pnggccrd.c.i
pnggccrd.s: pnggccrd.c.s
.PHONY : pnggccrd.s
# target to generate assembly for a file
pnggccrd.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pnggccrd.c.s
.PHONY : pnggccrd.c.s
pngget.o: pngget.c.o
.PHONY : pngget.o
# target to build an object file
pngget.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngget.c.o
.PHONY : pngget.c.o
pngget.i: pngget.c.i
.PHONY : pngget.i
# target to preprocess a source file
pngget.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngget.c.i
.PHONY : pngget.c.i
pngget.s: pngget.c.s
.PHONY : pngget.s
# target to generate assembly for a file
pngget.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngget.c.s
.PHONY : pngget.c.s
pngmem.o: pngmem.c.o
.PHONY : pngmem.o
# target to build an object file
pngmem.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngmem.c.o
.PHONY : pngmem.c.o
pngmem.i: pngmem.c.i
.PHONY : pngmem.i
# target to preprocess a source file
pngmem.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngmem.c.i
.PHONY : pngmem.c.i
pngmem.s: pngmem.c.s
.PHONY : pngmem.s
# target to generate assembly for a file
pngmem.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngmem.c.s
.PHONY : pngmem.c.s
pngpread.o: pngpread.c.o
.PHONY : pngpread.o
# target to build an object file
pngpread.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngpread.c.o
.PHONY : pngpread.c.o
pngpread.i: pngpread.c.i
.PHONY : pngpread.i
# target to preprocess a source file
pngpread.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngpread.c.i
.PHONY : pngpread.c.i
pngpread.s: pngpread.c.s
.PHONY : pngpread.s
# target to generate assembly for a file
pngpread.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngpread.c.s
.PHONY : pngpread.c.s
pngread.o: pngread.c.o
.PHONY : pngread.o
# target to build an object file
pngread.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngread.c.o
.PHONY : pngread.c.o
pngread.i: pngread.c.i
.PHONY : pngread.i
# target to preprocess a source file
pngread.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngread.c.i
.PHONY : pngread.c.i
pngread.s: pngread.c.s
.PHONY : pngread.s
# target to generate assembly for a file
pngread.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngread.c.s
.PHONY : pngread.c.s
pngrio.o: pngrio.c.o
.PHONY : pngrio.o
# target to build an object file
pngrio.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrio.c.o
.PHONY : pngrio.c.o
pngrio.i: pngrio.c.i
.PHONY : pngrio.i
# target to preprocess a source file
pngrio.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrio.c.i
.PHONY : pngrio.c.i
pngrio.s: pngrio.c.s
.PHONY : pngrio.s
# target to generate assembly for a file
pngrio.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrio.c.s
.PHONY : pngrio.c.s
pngrtran.o: pngrtran.c.o
.PHONY : pngrtran.o
# target to build an object file
pngrtran.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.o
.PHONY : pngrtran.c.o
pngrtran.i: pngrtran.c.i
.PHONY : pngrtran.i
# target to preprocess a source file
pngrtran.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.i
.PHONY : pngrtran.c.i
pngrtran.s: pngrtran.c.s
.PHONY : pngrtran.s
# target to generate assembly for a file
pngrtran.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrtran.c.s
.PHONY : pngrtran.c.s
pngrutil.o: pngrutil.c.o
.PHONY : pngrutil.o
# target to build an object file
pngrutil.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.o
.PHONY : pngrutil.c.o
pngrutil.i: pngrutil.c.i
.PHONY : pngrutil.i
# target to preprocess a source file
pngrutil.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.i
.PHONY : pngrutil.c.i
pngrutil.s: pngrutil.c.s
.PHONY : pngrutil.s
# target to generate assembly for a file
pngrutil.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngrutil.c.s
.PHONY : pngrutil.c.s
pngset.o: pngset.c.o
.PHONY : pngset.o
# target to build an object file
pngset.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngset.c.o
.PHONY : pngset.c.o
pngset.i: pngset.c.i
.PHONY : pngset.i
# target to preprocess a source file
pngset.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngset.c.i
.PHONY : pngset.c.i
pngset.s: pngset.c.s
.PHONY : pngset.s
# target to generate assembly for a file
pngset.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngset.c.s
.PHONY : pngset.c.s
pngtrans.o: pngtrans.c.o
.PHONY : pngtrans.o
# target to build an object file
pngtrans.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.o
.PHONY : pngtrans.c.o
pngtrans.i: pngtrans.c.i
.PHONY : pngtrans.i
# target to preprocess a source file
pngtrans.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.i
.PHONY : pngtrans.c.i
pngtrans.s: pngtrans.c.s
.PHONY : pngtrans.s
# target to generate assembly for a file
pngtrans.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngtrans.c.s
.PHONY : pngtrans.c.s
pngvcrd.o: pngvcrd.c.o
.PHONY : pngvcrd.o
# target to build an object file
pngvcrd.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.o
.PHONY : pngvcrd.c.o
pngvcrd.i: pngvcrd.c.i
.PHONY : pngvcrd.i
# target to preprocess a source file
pngvcrd.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.i
.PHONY : pngvcrd.c.i
pngvcrd.s: pngvcrd.c.s
.PHONY : pngvcrd.s
# target to generate assembly for a file
pngvcrd.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngvcrd.c.s
.PHONY : pngvcrd.c.s
pngwio.o: pngwio.c.o
.PHONY : pngwio.o
# target to build an object file
pngwio.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwio.c.o
.PHONY : pngwio.c.o
pngwio.i: pngwio.c.i
.PHONY : pngwio.i
# target to preprocess a source file
pngwio.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwio.c.i
.PHONY : pngwio.c.i
pngwio.s: pngwio.c.s
.PHONY : pngwio.s
# target to generate assembly for a file
pngwio.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwio.c.s
.PHONY : pngwio.c.s
pngwrite.o: pngwrite.c.o
.PHONY : pngwrite.o
# target to build an object file
pngwrite.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.o
.PHONY : pngwrite.c.o
pngwrite.i: pngwrite.c.i
.PHONY : pngwrite.i
# target to preprocess a source file
pngwrite.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.i
.PHONY : pngwrite.c.i
pngwrite.s: pngwrite.c.s
.PHONY : pngwrite.s
# target to generate assembly for a file
pngwrite.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwrite.c.s
.PHONY : pngwrite.c.s
pngwtran.o: pngwtran.c.o
.PHONY : pngwtran.o
# target to build an object file
pngwtran.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.o
.PHONY : pngwtran.c.o
pngwtran.i: pngwtran.c.i
.PHONY : pngwtran.i
# target to preprocess a source file
pngwtran.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.i
.PHONY : pngwtran.c.i
pngwtran.s: pngwtran.c.s
.PHONY : pngwtran.s
# target to generate assembly for a file
pngwtran.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwtran.c.s
.PHONY : pngwtran.c.s
pngwutil.o: pngwutil.c.o
.PHONY : pngwutil.o
# target to build an object file
pngwutil.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.o
.PHONY : pngwutil.c.o
pngwutil.i: pngwutil.c.i
.PHONY : pngwutil.i
# target to preprocess a source file
pngwutil.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.i
.PHONY : pngwutil.c.i
pngwutil.s: pngwutil.c.s
.PHONY : pngwutil.s
# target to generate assembly for a file
pngwutil.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/png/CMakeFiles/png.dir/build.make io_png/libs/png/CMakeFiles/png.dir/pngwutil.c.s
.PHONY : pngwutil.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... png"
@echo "... rebuild_cache"
@echo "... png.o"
@echo "... png.i"
@echo "... png.s"
@echo "... pngerror.o"
@echo "... pngerror.i"
@echo "... pngerror.s"
@echo "... pnggccrd.o"
@echo "... pnggccrd.i"
@echo "... pnggccrd.s"
@echo "... pngget.o"
@echo "... pngget.i"
@echo "... pngget.s"
@echo "... pngmem.o"
@echo "... pngmem.i"
@echo "... pngmem.s"
@echo "... pngpread.o"
@echo "... pngpread.i"
@echo "... pngpread.s"
@echo "... pngread.o"
@echo "... pngread.i"
@echo "... pngread.s"
@echo "... pngrio.o"
@echo "... pngrio.i"
@echo "... pngrio.s"
@echo "... pngrtran.o"
@echo "... pngrtran.i"
@echo "... pngrtran.s"
@echo "... pngrutil.o"
@echo "... pngrutil.i"
@echo "... pngrutil.s"
@echo "... pngset.o"
@echo "... pngset.i"
@echo "... pngset.s"
@echo "... pngtrans.o"
@echo "... pngtrans.i"
@echo "... pngtrans.s"
@echo "... pngvcrd.o"
@echo "... pngvcrd.i"
@echo "... pngvcrd.s"
@echo "... pngwio.o"
@echo "... pngwio.i"
@echo "... pngwio.s"
@echo "... pngwrite.o"
@echo "... pngwrite.i"
@echo "... pngwrite.s"
@echo "... pngwtran.o"
@echo "... pngwtran.i"
@echo "... pngwtran.s"
@echo "... pngwutil.o"
@echo "... pngwutil.i"
@echo "... pngwutil.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

View file

@ -0,0 +1,267 @@
README for libpng version 1.2.37 - June 4, 2009 (shared library 12.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
Libpng comes in several distribution formats. Get libpng-*.tar.gz,
libpng-*.tar.lzma, or libpng-*.tar.bz2 if you want UNIX-style line
endings in the text files, or lpng*.7z or lpng*.zip if you want DOS-style
line endings. You can get UNIX-style line endings from the *.zip file
by using "unzip -a" but there seems to be no simple way to recover
UNIX-style line endings from the *.7z file. The *.tar.lzma file is
recommended for *NIX users instead.
Version 0.89 was the first official release of libpng. Don't let the
fact that it's the first release fool you. The libpng library has been in
extensive use and testing since mid-1995. By late 1997 it had
finally gotten to the stage where there hadn't been significant
changes to the API in some time, and people have a bad feeling about
libraries with versions < 1.0. Version 1.0.0 was released in
March 1998.
****
Note that some of the changes to the png_info structure render this
version of the library binary incompatible with libpng-0.89 or
earlier versions if you are using a shared library. The type of the
"filler" parameter for png_set_filler() has changed from png_byte to
png_uint_32, which will affect shared-library applications that use
this function.
To avoid problems with changes to the internals of png_info_struct,
new APIs have been made available in 0.95 to avoid direct application
access to info_ptr. These functions are the png_set_<chunk> and
png_get_<chunk> functions. These functions should be used when
accessing/storing the info_struct data, rather than manipulating it
directly, to avoid such problems in the future.
It is important to note that the APIs do not make current programs
that access the info struct directly incompatible with the new
library. However, it is strongly suggested that new programs use
the new APIs (as shown in example.c and pngtest.c), and older programs
be converted to the new format, to facilitate upgrades in the future.
****
Additions since 0.90 include the ability to compile libpng as a
Windows DLL, and new APIs for accessing data in the info struct.
Experimental functions include the ability to set weighting and cost
factors for row filter selection, direct reads of integers from buffers
on big-endian processors that support misaligned data access, faster
methods of doing alpha composition, and more accurate 16->8 bit color
conversion.
The additions since 0.89 include the ability to read from a PNG stream
which has had some (or all) of the signature bytes read by the calling
application. This also allows the reading of embedded PNG streams that
do not have the PNG file signature. As well, it is now possible to set
the library action on the detection of chunk CRC errors. It is possible
to set different actions based on whether the CRC error occurred in a
critical or an ancillary chunk.
The changes made to the library, and bugs fixed are based on discussions
on the png-mng-implement mailing list
and not on material submitted privately to Guy, Andreas, or Glenn. They will
forward any good suggestions to the list.
For a detailed description on using libpng, read libpng.txt. For
examples of libpng in a program, see example.c and pngtest.c. For usage
information and restrictions (what little they are) on libpng, see
png.h. For a description on using zlib (the compression library used by
libpng) and zlib's restrictions, see zlib.h
I have included a general makefile, as well as several machine and
compiler specific ones, but you may have to modify one for your own needs.
You should use zlib 1.0.4 or later to run this, but it MAY work with
versions as old as zlib 0.95. Even so, there are bugs in older zlib
versions which can cause the output of invalid compression streams for
some images. You will definitely need zlib 1.0.4 or later if you are
taking advantage of the MS-DOS "far" structure allocation for the small
and medium memory models. You should also note that zlib is a
compression library that is useful for more things than just PNG files.
You can use zlib as a drop-in replacement for fread() and fwrite() if
you are so inclined.
zlib should be available at the same place that libpng is, or at
ftp://ftp.simplesystems.org/pub/png/src/
You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
these at http://www.libpng.org/pub/png/pngdocs.html
This code is currently being archived at libpng.sf.net in the
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
at GO GRAPHSUP. If you can't find it in any of those places,
e-mail me, and I'll help you find it.
If you have any code changes, requests, problems, etc., please e-mail
them to me. Also, I'd appreciate any make files or project files,
and any modifications you needed to make to get libpng to compile,
along with a #define variable to tell what compiler/system you are on.
If you needed to add transformations to libpng, or wish libpng would
provide the image in a different way, drop me a note (and code, if
possible), so I can consider supporting the transformation.
Finally, if you get any warning messages when compiling libpng
(note: not zlib), and they are easy to fix, I'd appreciate the
fix. Please mention "libpng" somewhere in the subject line. Thanks.
This release was created and will be supported by myself (of course
based in a large way on Guy's and Andreas' earlier work), and the PNG group.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
You can't reach Guy, the original libpng author, at the addresses
given in previous versions of this document. He and Andreas will read mail
addressed to the png-mng-implement list, however.
Please do not send general questions about PNG. Send them to
the (png-mng-misc at lists.sourceforge.net, subscription required, visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement to subscribe)
On the other hand,
please do not send libpng questions to that address, send them to me
or to the png-mng-implement list. I'll
get them in the end anyway. If you have a question about something
in the PNG specification that is related to using libpng, send it
to me. Send me any questions that start with "I was using libpng,
and ...". If in doubt, send questions to me. I'll bounce them
to others, if necessary.
Please do not send suggestions on how to change PNG. We have
been discussing PNG for twelve years now, and it is official and
finished. If you have suggestions for libpng, however, I'll
gladly listen. Even if your suggestion is not used immediately,
it may be used later.
Files in this distribution:
ANNOUNCE => Announcement of this version, with recent changes
CHANGES => Description of changes between libpng versions
KNOWNBUG => List of known bugs and deficiencies
LICENSE => License to use and redistribute libpng
README => This file
TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance
example.c => Example code for using libpng functions
libpng-*-*-diff.txt => Diff from previous release
libpng.3 => manual page for libpng (includes libpng.txt)
libpng.txt => Description of libpng and its functions
libpngpf.3 => manual page for libpng's private functions
png.5 => manual page for the PNG format
png.c => Basic interface functions common to library
png.h => Library function and interface declarations
pngconf.h => System specific library configuration
pngerror.c => Error/warning message I/O functions
pngget.c => Functions for retrieving info from struct
pngmem.c => Memory handling functions
pngbar.png => PNG logo, 88x31
pngnow.png => PNG logo, 98x31
pngpread.c => Progressive reading functions
pngread.c => Read data/helper high-level functions
pngrio.c => Lowest-level data read I/O functions
pngrtran.c => Read data transformation functions
pngrutil.c => Read data utility functions
pngset.c => Functions for storing data into the info_struct
pngtest.c => Library test program
pngtest.png => Library test sample image
pngtrans.c => Common data transformation functions
pngwio.c => Lowest-level write I/O functions
pngwrite.c => High-level write functions
pngwtran.c => Write data transformations
pngwutil.c => Write utility functions
contrib => Contributions
gregbook => source code for PNG reading and writing, from
Greg Roelofs' "PNG: The Definitive Guide",
O'Reilly, 1999
msvctest => Builds and runs pngtest using a MSVC workspace
pngminus => Simple pnm2png and png2pnm programs
pngsuite => Test images
visupng => Contains a MSVC workspace for VisualPng
projects => Contains project files and workspaces for building DLL
beos => Contains a Beos workspace for building libpng
c5builder => Contains a Borland workspace for building libpng
and zlib
visualc6 => Contains a Microsoft Visual C++ (MSVC) workspace
for building libpng and zlib
netware.txt => Contains instructions for downloading a set of
project files for building libpng and zlib on
Netware.
wince.txt => Contains instructions for downloading a Microsoft
Visual C++ (Windows CD Toolkit) workspace for
building libpng and zlib on WindowsCE
scripts => Directory containing scripts for building libpng:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.37)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.37)
makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.37,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
ftp://ftp.cs.wisc.edu/ghost)
makefile.aix => AIX makefile
makefile.cygwin => Cygwin/gcc makefile
makefile.darwin => Darwin makefile
makefile.dec => DEC Alpha UNIX makefile
makefile.freebsd => FreeBSD makefile
makefile.hpgcc => HPUX makefile using gcc
makefile.hpux => HPUX (10.20 and 11.00) makefile
makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit
makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
makefile.netbsd => NetBSD/cc makefile, PNGGCCRD, makes libpng.so.
makefile.ne12bsd => NetBSD/cc makefile, PNGGCCRD, makes libpng12.so
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
(gcc, creates libpng12.so.0.1.2.37)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng12.so.0.1.2.37)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng12.so.0.1.2.37)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
makefile.amiga => Amiga makefile
smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC
compiler (Requires SCOPTIONS, copied from
scripts/SCOPTIONS.ppc)
makefile.atari => Atari makefile
makefile.beos => BEOS makefile for X86
makefile.bor => Borland makefile (uses bcc)
makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
makefile.tc3 => Turbo C 3.0 makefile
makefile.dj2 => DJGPP 2 makefile
makefile.msc => Microsoft C makefile
makefile.vcawin32=> makefile for Microsoft Visual C++ 5.0 and
later (uses assembler code tuned for Intel MMX
platform)
makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and
later (does not use assembler code)
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
SCOPTIONS.ppc => Used with smakefile.ppc
Good luck, and happy coding.
-Glenn Randers-Pehrson (current maintainer)
Internet: glennrp at users.sourceforge.net
-Andreas Eric Dilger (former maintainer, 1996-1997)
Internet: adilger at enel.ucalgary.ca
Web: http://members.shaw.ca/adilger/
-Guy Eric Schalnat (original author and former maintainer, 1995-1996)
(formerly of Group 42, Inc)
Internet: gschal at infinet.com

View file

@ -0,0 +1,34 @@
# Install script for directory: /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/png
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
IF(BUILD_TYPE)
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME "")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT)
IF(COMPONENT)
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
# Install shared libraries without execute permission?
IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
SET(CMAKE_INSTALL_SO_NO_EXE "1")
ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)

View file

@ -0,0 +1,835 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
* Last changed in libpng 1.2.37 [June 4, 2009]
* This file has been placed in the public domain by the authors.
* Maintained 1998-2009 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
/* This is an example of how to use libpng to read and write PNG files.
* The file libpng.txt is much more verbose then this. If you have not
* read it, do so first. This was designed to be a starting point of an
* implementation. This is not officially part of libpng, is hereby placed
* in the public domain, and therefore does not require a copyright notice.
*
* This file does not currently compile, because it is missing certain
* parts, like allocating memory to hold an image. You will have to
* supply these parts to get it to compile. For an example of a minimal
* working PNG reader/writer, see pngtest.c, included in this distribution;
* see also the programs in the contrib directory.
*/
#include "png.h"
/* The png_jmpbuf() macro, used in error handling, became available in
* libpng version 1.0.6. If you want to be able to run your code with older
* versions of libpng, you must define the macro yourself (but only if it
* is not already defined by libpng!).
*/
#ifndef png_jmpbuf
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif
/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp()
* returns zero if the image is a PNG and nonzero if it isn't a PNG.
*
* The function check_if_png() shown here, but not used, returns nonzero (true)
* if the file can be opened and is a PNG, 0 (false) otherwise.
*
* If this call is successful, and you are going to keep the file open,
* you should call png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); once
* you have created the png_ptr, so that libpng knows your application
* has read that many bytes from the start of the file. Make sure you
* don't call png_set_sig_bytes() with more than 8 bytes read or give it
* an incorrect number of bytes read, or you will either have read too
* many bytes (your fault), or you are telling libpng to read the wrong
* number of magic bytes (also your fault).
*
* Many applications already read the first 2 or 4 bytes from the start
* of the image to determine the file type, so it would be easiest just
* to pass the bytes to png_sig_cmp() or even skip that if you know
* you have a PNG file, and call png_set_sig_bytes().
*/
#define PNG_BYTES_TO_CHECK 4
int check_if_png(char *file_name, FILE **fp)
{
char buf[PNG_BYTES_TO_CHECK];
/* Open the prospective PNG file. */
if ((*fp = fopen(file_name, "rb")) == NULL)
return 0;
/* Read in some of the signature bytes */
if (fread(buf, 1, PNG_BYTES_TO_CHECK, *fp) != PNG_BYTES_TO_CHECK)
return 0;
/* Compare the first PNG_BYTES_TO_CHECK bytes of the signature.
Return nonzero (true) if they match */
return(!png_sig_cmp(buf, (png_size_t)0, PNG_BYTES_TO_CHECK));
}
/* Read a PNG file. You may want to return an error code if the read
* fails (depending upon the failure). There are two "prototypes" given
* here - one where we are given the filename, and we need to open the
* file, and the other where we are given an open file (possibly with
* some or all of the magic bytes read - see comments above).
*/
#ifdef open_file /* prototype 1 */
void read_png(char *file_name) /* We need to open the file */
{
png_structp png_ptr;
png_infop info_ptr;
unsigned int sig_read = 0;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
FILE *fp;
if ((fp = fopen(file_name, "rb")) == NULL)
return (ERROR);
#else no_open_file /* prototype 2 */
void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
{
png_structp png_ptr;
png_infop info_ptr;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
#endif no_open_file /* Only use one prototype! */
/* Create and initialize the png_struct with the desired error handler
* functions. If you want to use the default stderr and longjump method,
* you can supply NULL for the last three parameters. We also supply the
* the compiler header file version, so that we know if the application
* was compiled with a compatible version of the library. REQUIRED
*/
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (png_ptr == NULL)
{
fclose(fp);
return (ERROR);
}
/* Allocate/initialize the memory for image information. REQUIRED. */
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL)
{
fclose(fp);
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
return (ERROR);
}
/* Set error handling if you are using the setjmp/longjmp method (this is
* the normal method of doing things with libpng). REQUIRED unless you
* set up your own error handlers in the png_create_read_struct() earlier.
*/
if (setjmp(png_jmpbuf(png_ptr)))
{
/* Free all of the memory associated with the png_ptr and info_ptr */
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
fclose(fp);
/* If we get here, we had a problem reading the file */
return (ERROR);
}
/* One of the following I/O initialization methods is REQUIRED */
#ifdef streams /* PNG file I/O method 1 */
/* Set up the input control if you are using standard C streams */
png_init_io(png_ptr, fp);
#else no_streams /* PNG file I/O method 2 */
/* If you are using replacement read functions, instead of calling
* png_init_io() here you would call:
*/
png_set_read_fn(png_ptr, (void *)user_io_ptr, user_read_fn);
/* where user_io_ptr is a structure you want available to the callbacks */
#endif no_streams /* Use only one I/O method! */
/* If we have already read some of the signature */
png_set_sig_bytes(png_ptr, sig_read);
#ifdef hilevel
/*
* If you have enough memory to read in the entire image at once,
* and you need to specify only transforms that can be controlled
* with one of the PNG_TRANSFORM_* bits (this presently excludes
* dithering, filling, setting background, and doing gamma
* adjustment), then you can read the entire image (including
* pixels) into the info structure with this call:
*/
png_read_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
#else
/* OK, you're doing it the hard way, with the lower-level functions */
/* The call to png_read_info() gives us all of the information from the
* PNG file before the first IDAT (image data chunk). REQUIRED
*/
png_read_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
&interlace_type, int_p_NULL, int_p_NULL);
/* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the
* transformations only work on specific types of images, and many
* are mutually exclusive.
*/
/* Tell libpng to strip 16 bit/color files down to 8 bits/color */
png_set_strip_16(png_ptr);
/* Strip alpha bytes from the input data without combining with the
* background (not recommended).
*/
png_set_strip_alpha(png_ptr);
/* Extract multiple pixels with bit depths of 1, 2, and 4 from a single
* byte into separate bytes (useful for paletted and grayscale images).
*/
png_set_packing(png_ptr);
/* Change the order of packed pixels to least significant bit first
* (not useful if you are using png_set_packing). */
png_set_packswap(png_ptr);
/* Expand paletted colors into true RGB triplets */
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
/* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
png_set_expand_gray_1_2_4_to_8(png_ptr);
/* Expand paletted or RGB images with transparency to full alpha channels
* so the data will be available as RGBA quartets.
*/
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
png_set_tRNS_to_alpha(png_ptr);
/* Set the background color to draw transparent and alpha images over.
* It is possible to set the red, green, and blue components directly
* for paletted images instead of supplying a palette index. Note that
* even if the PNG file supplies a background, you are not required to
* use it - you should use the (solid) application background if it has one.
*/
png_color_16 my_background, *image_background;
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
png_set_background(png_ptr, image_background,
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
else
png_set_background(png_ptr, &my_background,
PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
/* Some suggestions as to how to get a screen gamma value
*
* Note that screen gamma is the display_exponent, which includes
* the CRT_exponent and any correction for viewing conditions
*/
if (/* We have a user-defined screen gamma value */)
{
screen_gamma = user-defined screen_gamma;
}
/* This is one way that applications share the same screen gamma value */
else if ((gamma_str = getenv("SCREEN_GAMMA")) != NULL)
{
screen_gamma = atof(gamma_str);
}
/* If we don't have another value */
else
{
screen_gamma = 2.2; /* A good guess for a PC monitor in a dimly
lit room */
screen_gamma = 1.7 or 1.0; /* A good guess for Mac systems */
}
/* Tell libpng to handle the gamma conversion for you. The final call
* is a good guess for PC generated images, but it should be configurable
* by the user at run time by the user. It is strongly suggested that
* your application support gamma correction.
*/
int intent;
if (png_get_sRGB(png_ptr, info_ptr, &intent))
png_set_gamma(png_ptr, screen_gamma, 0.45455);
else
{
double image_gamma;
if (png_get_gAMA(png_ptr, info_ptr, &image_gamma))
png_set_gamma(png_ptr, screen_gamma, image_gamma);
else
png_set_gamma(png_ptr, screen_gamma, 0.45455);
}
/* Dither RGB files down to 8 bit palette or reduce palettes
* to the number of colors available on your screen.
*/
if (color_type & PNG_COLOR_MASK_COLOR)
{
int num_palette;
png_colorp palette;
/* This reduces the image to the application supplied palette */
if (/* We have our own palette */)
{
/* An array of colors to which the image should be dithered */
png_color std_color_cube[MAX_SCREEN_COLORS];
png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
MAX_SCREEN_COLORS, png_uint_16p_NULL, 0);
}
/* This reduces the image to the palette supplied in the file */
else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
{
png_uint_16p histogram = NULL;
png_get_hIST(png_ptr, info_ptr, &histogram);
png_set_dither(png_ptr, palette, num_palette,
max_screen_colors, histogram, 0);
}
}
/* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr);
/* If you want to shift the pixel values from the range [0,255] or
* [0,65535] to the original [0,7] or [0,31], or whatever range the
* colors were originally in:
*/
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_sBIT))
{
png_color_8p sig_bit_p;
png_get_sBIT(png_ptr, info_ptr, &sig_bit_p);
png_set_shift(png_ptr, sig_bit_p);
}
/* Flip the RGB pixels to BGR (or RGBA to BGRA) */
if (color_type & PNG_COLOR_MASK_COLOR)
png_set_bgr(png_ptr);
/* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
png_set_swap_alpha(png_ptr);
/* Swap bytes of 16 bit files to least significant byte first */
png_set_swap(png_ptr);
/* Add filler (or alpha) byte (before/after each RGB triplet) */
png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
/* Turn on interlace handling. REQUIRED if you are not using
* png_read_image(). To see how to handle interlacing passes,
* see the png_read_row() method below:
*/
number_passes = png_set_interlace_handling(png_ptr);
/* Optional call to gamma correct and add the background to the palette
* and update info structure. REQUIRED if you are expecting libpng to
* update the palette for you (ie you selected such a transform above).
*/
png_read_update_info(png_ptr, info_ptr);
/* Allocate the memory to hold the image using the fields of info_ptr. */
/* The easiest way to read the image: */
png_bytep row_pointers[height];
/* Clear the pointer array */
for (row = 0; row < height; row++)
row_pointers[row] = NULL;
for (row = 0; row < height; row++)
row_pointers[row] = png_malloc(png_ptr, png_get_rowbytes(png_ptr,
info_ptr));
/* Now it's time to read the image. One of these methods is REQUIRED */
#ifdef entire /* Read the entire image in one go */
png_read_image(png_ptr, row_pointers);
#else no_entire /* Read the image one or more scanlines at a time */
/* The other way to read images - deal with interlacing: */
for (pass = 0; pass < number_passes; pass++)
{
#ifdef single /* Read the image a single row at a time */
for (y = 0; y < height; y++)
{
png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL, 1);
}
#else no_single /* Read the image several rows at a time */
for (y = 0; y < height; y += number_of_rows)
{
#ifdef sparkle /* Read the image using the "sparkle" effect. */
png_read_rows(png_ptr, &row_pointers[y], png_bytepp_NULL,
number_of_rows);
#else no_sparkle /* Read the image using the "rectangle" effect */
png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
number_of_rows);
#endif no_sparkle /* Use only one of these two methods */
}
/* If you want to display the image after every pass, do so here */
#endif no_single /* Use only one of these two methods */
}
#endif no_entire /* Use only one of these two methods */
/* Read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr);
#endif hilevel
/* At this point you have read the entire image */
/* Clean up after the read, and free any memory allocated - REQUIRED */
png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
/* Close the file */
fclose(fp);
/* That's it */
return (OK);
}
/* Progressively read a file */
int
initialize_png_reader(png_structp *png_ptr, png_infop *info_ptr)
{
/* Create and initialize the png_struct with the desired error handler
* functions. If you want to use the default stderr and longjump method,
* you can supply NULL for the last three parameters. We also check that
* the library version is compatible in case we are using dynamically
* linked libraries.
*/
*png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (*png_ptr == NULL)
{
*info_ptr = NULL;
return (ERROR);
}
*info_ptr = png_create_info_struct(png_ptr);
if (*info_ptr == NULL)
{
png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
return (ERROR);
}
if (setjmp(png_jmpbuf((*png_ptr))))
{
png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
return (ERROR);
}
/* This one's new. You will need to provide all three
* function callbacks, even if you aren't using them all.
* If you aren't using all functions, you can specify NULL
* parameters. Even when all three functions are NULL,
* you need to call png_set_progressive_read_fn().
* These functions shouldn't be dependent on global or
* static variables if you are decoding several images
* simultaneously. You should store stream specific data
* in a separate struct, given as the second parameter,
* and retrieve the pointer from inside the callbacks using
* the function png_get_progressive_ptr(png_ptr).
*/
png_set_progressive_read_fn(*png_ptr, (void *)stream_data,
info_callback, row_callback, end_callback);
return (OK);
}
int
process_data(png_structp *png_ptr, png_infop *info_ptr,
png_bytep buffer, png_uint_32 length)
{
if (setjmp(png_jmpbuf((*png_ptr))))
{
/* Free the png_ptr and info_ptr memory on error */
png_destroy_read_struct(png_ptr, info_ptr, png_infopp_NULL);
return (ERROR);
}
/* This one's new also. Simply give it chunks of data as
* they arrive from the data stream (in order, of course).
* On segmented machines, don't give it any more than 64K.
* The library seems to run fine with sizes of 4K, although
* you can give it much less if necessary (I assume you can
* give it chunks of 1 byte, but I haven't tried with less
* than 256 bytes yet). When this function returns, you may
* want to display any rows that were generated in the row
* callback, if you aren't already displaying them there.
*/
png_process_data(*png_ptr, *info_ptr, buffer, length);
return (OK);
}
info_callback(png_structp png_ptr, png_infop info)
{
/* Do any setup here, including setting any of the transformations
* mentioned in the Reading PNG files section. For now, you _must_
* call either png_start_read_image() or png_read_update_info()
* after all the transformations are set (even if you don't set
* any). You may start getting rows before png_process_data()
* returns, so this is your last chance to prepare for that.
*/
}
row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass)
{
/*
* This function is called for every row in the image. If the
* image is interlaced, and you turned on the interlace handler,
* this function will be called for every row in every pass.
*
* In this function you will receive a pointer to new row data from
* libpng called new_row that is to replace a corresponding row (of
* the same data format) in a buffer allocated by your application.
*
* The new row data pointer "new_row" may be NULL, indicating there is
* no new data to be replaced (in cases of interlace loading).
*
* If new_row is not NULL then you need to call
* png_progressive_combine_row() to replace the corresponding row as
* shown below:
*/
/* Check if row_num is in bounds. */
if ((row_num >= 0) && (row_num < height))
{
/* Get pointer to corresponding row in our
* PNG read buffer.
*/
png_bytep old_row = ((png_bytep *)our_data)[row_num];
/* If both rows are allocated then copy the new row
* data to the corresponding row data.
*/
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
}
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
* may make your life easier.
*
* For the non-NULL rows of interlaced images, you must call
* png_progressive_combine_row() passing in the new row and the
* old row, as demonstrated above. You can call this function for
* NULL rows (it will just return) and for non-interlaced images
* (it just does the png_memcpy for you) if it will make the code
* easier. Thus, you can just do this for all cases:
*/
png_progressive_combine_row(png_ptr, old_row, new_row);
/* where old_row is what was displayed for previous rows. Note
* that the first pass (pass == 0 really) will completely cover
* the old row, so the rows do not have to be initialized. After
* the first pass (and only for interlaced images), you will have
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
}
end_callback(png_structp png_ptr, png_infop info)
{
/* This function is called when the whole image has been read,
* including any chunks after the image (up to and including
* the IEND). You will usually have the same info chunk as you
* had in the header, although some data may have been added
* to the comments and time fields.
*
* Most people won't do much here, perhaps setting a flag that
* marks the image as finished.
*/
}
/* Write a png file */
void write_png(char *file_name /* , ... other image information ... */)
{
FILE *fp;
png_structp png_ptr;
png_infop info_ptr;
png_colorp palette;
/* Open the file */
fp = fopen(file_name, "wb");
if (fp == NULL)
return (ERROR);
/* Create and initialize the png_struct with the desired error handler
* functions. If you want to use the default stderr and longjump method,
* you can supply NULL for the last three parameters. We also check that
* the library version is compatible with the one used at compile time,
* in case we are using dynamically linked libraries. REQUIRED.
*/
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
png_voidp user_error_ptr, user_error_fn, user_warning_fn);
if (png_ptr == NULL)
{
fclose(fp);
return (ERROR);
}
/* Allocate/initialize the image information data. REQUIRED */
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL)
{
fclose(fp);
png_destroy_write_struct(&png_ptr, png_infopp_NULL);
return (ERROR);
}
/* Set error handling. REQUIRED if you aren't supplying your own
* error handling functions in the png_create_write_struct() call.
*/
if (setjmp(png_jmpbuf(png_ptr)))
{
/* If we get here, we had a problem writing the file */
fclose(fp);
png_destroy_write_struct(&png_ptr, &info_ptr);
return (ERROR);
}
/* One of the following I/O initialization functions is REQUIRED */
#ifdef streams /* I/O initialization method 1 */
/* Set up the output control if you are using standard C streams */
png_init_io(png_ptr, fp);
#else no_streams /* I/O initialization method 2 */
/* If you are using replacement write functions, instead of calling
* png_init_io() here you would call
*/
png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn,
user_IO_flush_function);
/* where user_io_ptr is a structure you want available to the callbacks */
#endif no_streams /* Only use one initialization method */
#ifdef hilevel
/* This is the easy way. Use it if you already have all the
* image info living in the structure. You could "|" many
* PNG_TRANSFORM flags into the png_transforms integer here.
*/
png_write_png(png_ptr, info_ptr, png_transforms, png_voidp_NULL);
#else
/* This is the hard way */
/* Set the image information here. Width and height are up to 2^31,
* bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on
* the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY,
* PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB,
* or PNG_COLOR_TYPE_RGB_ALPHA. interlace is either PNG_INTERLACE_NONE or
* PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST
* currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED
*/
png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, PNG_COLOR_TYPE_???,
PNG_INTERLACE_????, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
/* Set the palette if there is one. REQUIRED for indexed-color images */
palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH
* png_sizeof(png_color));
/* ... Set palette colors ... */
png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH);
/* You must not free palette here, because png_set_PLTE only makes a link to
* the palette that you malloced. Wait until you are about to destroy
* the png structure.
*/
/* Optional significant bit (sBIT) chunk */
png_color_8 sig_bit;
/* If we are dealing with a grayscale image then */
sig_bit.gray = true_bit_depth;
/* Otherwise, if we are dealing with a color image then */
sig_bit.red = true_red_bit_depth;
sig_bit.green = true_green_bit_depth;
sig_bit.blue = true_blue_bit_depth;
/* If the image has an alpha channel then */
sig_bit.alpha = true_alpha_bit_depth;
png_set_sBIT(png_ptr, info_ptr, &sig_bit);
/* Optional gamma chunk is strongly suggested if you have any guess
* as to the correct gamma of the image.
*/
png_set_gAMA(png_ptr, info_ptr, gamma);
/* Optionally write comments into the image */
text_ptr[0].key = "Title";
text_ptr[0].text = "Mona Lisa";
text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[1].key = "Author";
text_ptr[1].text = "Leonardo DaVinci";
text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr[2].key = "Description";
text_ptr[2].text = "<long text>";
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
#ifdef PNG_iTXt_SUPPORTED
text_ptr[0].lang = NULL;
text_ptr[1].lang = NULL;
text_ptr[2].lang = NULL;
#endif
png_set_text(png_ptr, info_ptr, text_ptr, 3);
/* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */
/* Note that if sRGB is present the gAMA and cHRM chunks must be ignored
* on read and, if your application chooses to write them, they must
* be written in accordance with the sRGB profile
*/
/* Write the file header information. REQUIRED */
png_write_info(png_ptr, info_ptr);
/* If you want, you can write the info in two steps, in case you need to
* write your private chunk ahead of PLTE:
*
* png_write_info_before_PLTE(write_ptr, write_info_ptr);
* write_my_chunk();
* png_write_info(png_ptr, info_ptr);
*
* However, given the level of known- and unknown-chunk support in 1.2.0
* and up, this should no longer be necessary.
*/
/* Once we write out the header, the compression type on the text
* chunks gets changed to PNG_TEXT_COMPRESSION_NONE_WR or
* PNG_TEXT_COMPRESSION_zTXt_WR, so it doesn't get written out again
* at the end.
*/
/* Set up the transformations you want. Note that these are
* all optional. Only call them if you want them.
*/
/* Invert monochrome pixels */
png_set_invert_mono(png_ptr);
/* Shift the pixels up to a legal bit depth and fill in
* as appropriate to correctly scale the image.
*/
png_set_shift(png_ptr, &sig_bit);
/* Pack pixels into bytes */
png_set_packing(png_ptr);
/* Swap location of alpha bytes from ARGB to RGBA */
png_set_swap_alpha(png_ptr);
/* Get rid of filler (OR ALPHA) bytes, pack XRGB/RGBX/ARGB/RGBA into
* RGB (4 channels -> 3 channels). The second parameter is not used.
*/
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
/* Flip BGR pixels to RGB */
png_set_bgr(png_ptr);
/* Swap bytes of 16-bit files to most significant byte first */
png_set_swap(png_ptr);
/* Swap bits of 1, 2, 4 bit packed pixel formats */
png_set_packswap(png_ptr);
/* Turn on interlace handling if you are not using png_write_image() */
if (interlacing)
number_passes = png_set_interlace_handling(png_ptr);
else
number_passes = 1;
/* The easiest way to write the image (you may have a different memory
* layout, however, so choose what fits your needs best). You need to
* use the first method if you aren't handling interlacing yourself.
*/
png_uint_32 k, height, width;
png_byte image[height][width*bytes_per_pixel];
png_bytep row_pointers[height];
if (height > PNG_UINT_32_MAX/png_sizeof(png_bytep))
png_error (png_ptr, "Image is too tall to process in memory");
for (k = 0; k < height; k++)
row_pointers[k] = image + k*width*bytes_per_pixel;
/* One of the following output methods is REQUIRED */
#ifdef entire /* Write out the entire image data in one call */
png_write_image(png_ptr, row_pointers);
/* The other way to write the image - deal with interlacing */
#else no_entire /* Write out the image data by one or more scanlines */
/* The number of passes is either 1 for non-interlaced images,
* or 7 for interlaced images.
*/
for (pass = 0; pass < number_passes; pass++)
{
/* Write a few rows at a time. */
png_write_rows(png_ptr, &row_pointers[first_row], number_of_rows);
/* If you are only writing one row at a time, this works */
for (y = 0; y < height; y++)
png_write_rows(png_ptr, &row_pointers[y], 1);
}
#endif no_entire /* Use only one output method */
/* You can write optional chunks like tEXt, zTXt, and tIME at the end
* as well. Shouldn't be necessary in 1.2.0 and up as all the public
* chunks are supported and you can use png_set_unknown_chunks() to
* register unknown chunks into the info structure to be written out.
*/
/* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr);
#endif hilevel
/* If you png_malloced a palette, free it here (don't free info_ptr->palette,
* as recommended in versions 1.0.5m and earlier of this example; if
* libpng mallocs info_ptr->palette, libpng will free it). If you
* allocated it with malloc() instead of png_malloc(), use free() instead
* of png_free().
*/
png_free(png_ptr, palette);
palette = NULL;
/* Similarly, if you png_malloced any data that you passed in with
* png_set_something(), such as a hist or trans array, free it here,
* when you can be sure that libpng is through with it.
*/
png_free(png_ptr, trans);
trans = NULL;
/* Whenever you use png_free() it is a good idea to set the pointer to
* NULL in case your application inadvertently tries to png_free() it
* again. When png_free() sees a NULL it returns without action, thus
* avoiding the double-free security problem.
*/
/* Clean up after the write, and free any memory allocated */
png_destroy_write_struct(&png_ptr, &info_ptr);
/* Close the file */
fclose(fp);
/* That's it */
return (OK);
}
#endif /* if 0 */

View file

@ -0,0 +1,922 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
#define PNG_INTERNAL
#define PNG_NO_EXTERN
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_2_37 Your_png_h_is_not_version_1_2_37;
/* Version information for C files. This had better match the version
* string defined in png.h. */
#ifdef PNG_USE_GLOBAL_ARRAYS
/* png_libpng_ver was changed to a function in version 1.0.5c */
PNG_CONST char png_libpng_ver[18] = PNG_LIBPNG_VER_STRING;
#ifdef PNG_READ_SUPPORTED
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
PNG_CONST png_byte FARDATA png_sig[8] = {137, 80, 78, 71, 13, 10, 26, 10};
#endif /* PNG_READ_SUPPORTED */
/* Invoke global declarations for constant strings for known chunk types */
PNG_IHDR;
PNG_IDAT;
PNG_IEND;
PNG_PLTE;
PNG_bKGD;
PNG_cHRM;
PNG_gAMA;
PNG_hIST;
PNG_iCCP;
PNG_iTXt;
PNG_oFFs;
PNG_pCAL;
PNG_sCAL;
PNG_pHYs;
PNG_sBIT;
PNG_sPLT;
PNG_sRGB;
PNG_tEXt;
PNG_tIME;
PNG_tRNS;
PNG_zTXt;
#ifdef PNG_READ_SUPPORTED
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Start of interlace block */
PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
/* Offset to next interlace block */
PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
/* Start of interlace block in the y direction */
PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
/* Height of interlace block. This is not currently used - if you need
* it, uncomment it here and in png.h
PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
/* Mask to determine which pixels are valid in a pass */
PNG_CONST int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
/* Mask to determine which pixels to overwrite while displaying */
PNG_CONST int FARDATA png_pass_dsp_mask[]
= {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_USE_GLOBAL_ARRAYS */
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
* stream we can set num_bytes = 8 so that libpng will not attempt to read
* or write any of the magic bytes before it starts on the IHDR.
*/
#ifdef PNG_READ_SUPPORTED
void PNGAPI
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
{
if (png_ptr == NULL)
return;
png_debug(1, "in png_set_sig_bytes");
if (num_bytes > 8)
png_error(png_ptr, "Too many bytes for PNG signature.");
png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);
}
/* Checks whether the supplied bytes match the PNG signature. We allow
* checking less than the full 8-byte signature so that those apps that
* already read the first few bytes of a file to determine the file type
* can simply check the remaining bytes for extra assurance. Returns
* an integer less than, equal to, or greater than zero if sig is found,
* respectively, to be less than, to match, or be greater than the correct
* PNG signature (this is the same behaviour as strcmp, memcmp, etc).
*/
int PNGAPI
png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
if (num_to_check > 8)
num_to_check = 8;
else if (num_to_check < 1)
return (-1);
if (start > 7)
return (-1);
if (start + num_to_check > 8)
num_to_check = 8 - start;
return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
}
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
/* (Obsolete) function to check signature bytes. It does not allow one
* to check a partial signature. This function might be removed in the
* future - use png_sig_cmp(). Returns true (nonzero) if the file is PNG.
*/
int PNGAPI
png_check_sig(png_bytep sig, int num)
{
return ((int)!png_sig_cmp(sig, (png_size_t)0, (png_size_t)num));
}
#endif
#endif /* PNG_READ_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Function to allocate memory for zlib and clear it to 0. */
#ifdef PNG_1_0_X
voidpf PNGAPI
#else
voidpf /* private */
#endif
png_zalloc(voidpf png_ptr, uInt items, uInt size)
{
png_voidp ptr;
png_structp p=(png_structp)png_ptr;
png_uint_32 save_flags=p->flags;
png_uint_32 num_bytes;
if (png_ptr == NULL)
return (NULL);
if (items > PNG_UINT_32_MAX/size)
{
png_warning (p, "Potential overflow in png_zalloc()");
return (NULL);
}
num_bytes = (png_uint_32)items * size;
p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
p->flags=save_flags;
#if defined(PNG_1_0_X) && !defined(PNG_NO_ZALLOC_ZERO)
if (ptr == NULL)
return ((voidpf)ptr);
if (num_bytes > (png_uint_32)0x8000L)
{
png_memset(ptr, 0, (png_size_t)0x8000L);
png_memset((png_bytep)ptr + (png_size_t)0x8000L, 0,
(png_size_t)(num_bytes - (png_uint_32)0x8000L));
}
else
{
png_memset(ptr, 0, (png_size_t)num_bytes);
}
#endif
return ((voidpf)ptr);
}
/* Function to free memory for zlib */
#ifdef PNG_1_0_X
void PNGAPI
#else
void /* private */
#endif
png_zfree(voidpf png_ptr, voidpf ptr)
{
png_free((png_structp)png_ptr, (png_voidp)ptr);
}
/* Reset the CRC variable to 32 bits of 1's. Care must be taken
* in case CRC is > 32 bits to leave the top bits 0.
*/
void /* PRIVATE */
png_reset_crc(png_structp png_ptr)
{
png_ptr->crc = crc32(0, Z_NULL, 0);
}
/* Calculate the CRC over a section of data. We can only pass as
* much data to this routine as the largest single buffer size. We
* also check that this data will actually be used before going to the
* trouble of calculating it.
*/
void /* PRIVATE */
png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length)
{
int need_crc = 1;
if (png_ptr->chunk_name[0] & 0x20) /* ancillary */
{
if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) ==
(PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))
need_crc = 0;
}
else /* critical */
{
if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)
need_crc = 0;
}
if (need_crc)
png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length);
}
/* Allocate the memory for an info_struct for the application. We don't
* really need the png_ptr, but it could potentially be useful in the
* future. This should be used in favour of malloc(png_sizeof(png_info))
* and png_info_init() so that applications that want to use a shared
* libpng don't have to be recompiled if png_info changes size.
*/
png_infop PNGAPI
png_create_info_struct(png_structp png_ptr)
{
png_infop info_ptr;
png_debug(1, "in png_create_info_struct");
if (png_ptr == NULL)
return (NULL);
#ifdef PNG_USER_MEM_SUPPORTED
info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
png_ptr->malloc_fn, png_ptr->mem_ptr);
#else
info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
#endif
if (info_ptr != NULL)
png_info_init_3(&info_ptr, png_sizeof(png_info));
return (info_ptr);
}
/* This function frees the memory associated with a single info struct.
* Normally, one would use either png_destroy_read_struct() or
* png_destroy_write_struct() to free an info struct, but this may be
* useful for some applications.
*/
void PNGAPI
png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
{
png_infop info_ptr = NULL;
if (png_ptr == NULL)
return;
png_debug(1, "in png_destroy_info_struct");
if (info_ptr_ptr != NULL)
info_ptr = *info_ptr_ptr;
if (info_ptr != NULL)
{
png_info_destroy(png_ptr, info_ptr);
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2((png_voidp)info_ptr, png_ptr->free_fn,
png_ptr->mem_ptr);
#else
png_destroy_struct((png_voidp)info_ptr);
#endif
*info_ptr_ptr = NULL;
}
}
/* Initialize the info structure. This is now an internal function (0.89)
* and applications using it are urged to use png_create_info_struct()
* instead.
*/
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
#undef png_info_init
void PNGAPI
png_info_init(png_infop info_ptr)
{
/* We only come here via pre-1.0.12-compiled applications */
png_info_init_3(&info_ptr, 0);
}
#endif
void PNGAPI
png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
{
png_infop info_ptr = *ptr_ptr;
if (info_ptr == NULL)
return;
png_debug(1, "in png_info_init_3");
if (png_sizeof(png_info) > png_info_struct_size)
{
png_destroy_struct(info_ptr);
info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
*ptr_ptr = info_ptr;
}
/* Set everything to 0 */
png_memset(info_ptr, 0, png_sizeof(png_info));
}
#ifdef PNG_FREE_ME_SUPPORTED
void PNGAPI
png_data_freer(png_structp png_ptr, png_infop info_ptr,
int freer, png_uint_32 mask)
{
png_debug(1, "in png_data_freer");
if (png_ptr == NULL || info_ptr == NULL)
return;
if (freer == PNG_DESTROY_WILL_FREE_DATA)
info_ptr->free_me |= mask;
else if (freer == PNG_USER_WILL_FREE_DATA)
info_ptr->free_me &= ~mask;
else
png_warning(png_ptr,
"Unknown freer parameter in png_data_freer.");
}
#endif
void PNGAPI
png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
int num)
{
png_debug(1, "in png_free_data");
if (png_ptr == NULL || info_ptr == NULL)
return;
#if defined(PNG_TEXT_SUPPORTED)
/* Free text item num or (if num == -1) all text items */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
#else
if (mask & PNG_FREE_TEXT)
#endif
{
if (num != -1)
{
if (info_ptr->text && info_ptr->text[num].key)
{
png_free(png_ptr, info_ptr->text[num].key);
info_ptr->text[num].key = NULL;
}
}
else
{
int i;
for (i = 0; i < info_ptr->num_text; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i);
png_free(png_ptr, info_ptr->text);
info_ptr->text = NULL;
info_ptr->num_text=0;
}
}
#endif
#if defined(PNG_tRNS_SUPPORTED)
/* Free any tRNS entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
#else
if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))
#endif
{
png_free(png_ptr, info_ptr->trans);
info_ptr->trans = NULL;
info_ptr->valid &= ~PNG_INFO_tRNS;
#ifndef PNG_FREE_ME_SUPPORTED
png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
#endif
}
#endif
#if defined(PNG_sCAL_SUPPORTED)
/* Free any sCAL entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
#else
if (mask & PNG_FREE_SCAL)
#endif
{
#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
png_free(png_ptr, info_ptr->scal_s_width);
png_free(png_ptr, info_ptr->scal_s_height);
info_ptr->scal_s_width = NULL;
info_ptr->scal_s_height = NULL;
#endif
info_ptr->valid &= ~PNG_INFO_sCAL;
}
#endif
#if defined(PNG_pCAL_SUPPORTED)
/* Free any pCAL entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
#else
if (mask & PNG_FREE_PCAL)
#endif
{
png_free(png_ptr, info_ptr->pcal_purpose);
png_free(png_ptr, info_ptr->pcal_units);
info_ptr->pcal_purpose = NULL;
info_ptr->pcal_units = NULL;
if (info_ptr->pcal_params != NULL)
{
int i;
for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
{
png_free(png_ptr, info_ptr->pcal_params[i]);
info_ptr->pcal_params[i]=NULL;
}
png_free(png_ptr, info_ptr->pcal_params);
info_ptr->pcal_params = NULL;
}
info_ptr->valid &= ~PNG_INFO_pCAL;
}
#endif
#if defined(PNG_iCCP_SUPPORTED)
/* Free any iCCP entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
#else
if (mask & PNG_FREE_ICCP)
#endif
{
png_free(png_ptr, info_ptr->iccp_name);
png_free(png_ptr, info_ptr->iccp_profile);
info_ptr->iccp_name = NULL;
info_ptr->iccp_profile = NULL;
info_ptr->valid &= ~PNG_INFO_iCCP;
}
#endif
#if defined(PNG_sPLT_SUPPORTED)
/* Free a given sPLT entry, or (if num == -1) all sPLT entries */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
#else
if (mask & PNG_FREE_SPLT)
#endif
{
if (num != -1)
{
if (info_ptr->splt_palettes)
{
png_free(png_ptr, info_ptr->splt_palettes[num].name);
png_free(png_ptr, info_ptr->splt_palettes[num].entries);
info_ptr->splt_palettes[num].name = NULL;
info_ptr->splt_palettes[num].entries = NULL;
}
}
else
{
if (info_ptr->splt_palettes_num)
{
int i;
for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i);
png_free(png_ptr, info_ptr->splt_palettes);
info_ptr->splt_palettes = NULL;
info_ptr->splt_palettes_num = 0;
}
info_ptr->valid &= ~PNG_INFO_sPLT;
}
}
#endif
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
if (png_ptr->unknown_chunk.data)
{
png_free(png_ptr, png_ptr->unknown_chunk.data);
png_ptr->unknown_chunk.data = NULL;
}
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
#else
if (mask & PNG_FREE_UNKN)
#endif
{
if (num != -1)
{
if (info_ptr->unknown_chunks)
{
png_free(png_ptr, info_ptr->unknown_chunks[num].data);
info_ptr->unknown_chunks[num].data = NULL;
}
}
else
{
int i;
if (info_ptr->unknown_chunks_num)
{
for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i);
png_free(png_ptr, info_ptr->unknown_chunks);
info_ptr->unknown_chunks = NULL;
info_ptr->unknown_chunks_num = 0;
}
}
}
#endif
#if defined(PNG_hIST_SUPPORTED)
/* Free any hIST entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_HIST) & info_ptr->free_me)
#else
if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))
#endif
{
png_free(png_ptr, info_ptr->hist);
info_ptr->hist = NULL;
info_ptr->valid &= ~PNG_INFO_hIST;
#ifndef PNG_FREE_ME_SUPPORTED
png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
#endif
}
#endif
/* Free any PLTE entry that was internally allocated */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
#else
if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE))
#endif
{
png_zfree(png_ptr, info_ptr->palette);
info_ptr->palette = NULL;
info_ptr->valid &= ~PNG_INFO_PLTE;
#ifndef PNG_FREE_ME_SUPPORTED
png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
#endif
info_ptr->num_palette = 0;
}
#if defined(PNG_INFO_IMAGE_SUPPORTED)
/* Free any image bits attached to the info structure */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
#else
if (mask & PNG_FREE_ROWS)
#endif
{
if (info_ptr->row_pointers)
{
int row;
for (row = 0; row < (int)info_ptr->height; row++)
{
png_free(png_ptr, info_ptr->row_pointers[row]);
info_ptr->row_pointers[row]=NULL;
}
png_free(png_ptr, info_ptr->row_pointers);
info_ptr->row_pointers=NULL;
}
info_ptr->valid &= ~PNG_INFO_IDAT;
}
#endif
#ifdef PNG_FREE_ME_SUPPORTED
if (num == -1)
info_ptr->free_me &= ~mask;
else
info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
#endif
}
/* This is an internal routine to free any memory that the info struct is
* pointing to before re-using it or freeing the struct itself. Recall
* that png_free() checks for NULL pointers for us.
*/
void /* PRIVATE */
png_info_destroy(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_info_destroy");
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
png_ptr->chunk_list=NULL;
png_ptr->num_chunk_list = 0;
}
#endif
png_info_init_3(&info_ptr, png_sizeof(png_info));
}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
/* This function returns a pointer to the io_ptr associated with the user
* functions. The application should free any memory associated with this
* pointer before png_write_destroy() or png_read_destroy() are called.
*/
png_voidp PNGAPI
png_get_io_ptr(png_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
return (png_ptr->io_ptr);
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if !defined(PNG_NO_STDIO)
/* Initialize the default input/output functions for the PNG file. If you
* use your own read or write routines, you can call either png_set_read_fn()
* or png_set_write_fn() instead of png_init_io(). If you have defined
* PNG_NO_STDIO, you must use a function of your own because "FILE *" isn't
* necessarily available.
*/
void PNGAPI
png_init_io(png_structp png_ptr, png_FILE_p fp)
{
png_debug(1, "in png_init_io");
if (png_ptr == NULL)
return;
png_ptr->io_ptr = (png_voidp)fp;
}
#endif
#if defined(PNG_TIME_RFC1123_SUPPORTED)
/* Convert the supplied time into an RFC 1123 string suitable for use in
* a "Creation Time" or other text-based time string.
*/
png_charp PNGAPI
png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
{
static PNG_CONST char short_months[12][4] =
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
if (png_ptr == NULL)
return (NULL);
if (png_ptr->time_buffer == NULL)
{
png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
png_sizeof(char)));
}
#if defined(_WIN32_WCE)
{
wchar_t time_buf[29];
wsprintf(time_buf, TEXT("%d %S %d %02d:%02d:%02d +0000"),
ptime->day % 32, short_months[(ptime->month - 1) % 12],
ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61);
WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29,
NULL, NULL);
}
#else
#ifdef USE_FAR_KEYWORD
{
char near_time_buf[29];
png_snprintf6(near_time_buf, 29, "%d %s %d %02d:%02d:%02d +0000",
ptime->day % 32, short_months[(ptime->month - 1) % 12],
ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61);
png_memcpy(png_ptr->time_buffer, near_time_buf,
29*png_sizeof(char));
}
#else
png_snprintf6(png_ptr->time_buffer, 29, "%d %s %d %02d:%02d:%02d +0000",
ptime->day % 32, short_months[(ptime->month - 1) % 12],
ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61);
#endif
#endif /* _WIN32_WCE */
return ((png_charp)png_ptr->time_buffer);
}
#endif /* PNG_TIME_RFC1123_SUPPORTED */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) "\n libpng version 1.2.37 - June 4, 2009\n\
Copyright (c) 1998-2009 Glenn Randers-Pehrson\n\
Copyright (c) 1996-1997 Andreas Dilger\n\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
}
/* The following return the library version as a short string in the
* format 1.0.0 through 99.99.99zz. To get the version of *.h files
* used with your application, print out PNG_LIBPNG_VER_STRING, which
* is defined in png.h.
* Note: now there is no difference between png_get_libpng_ver() and
* png_get_header_ver(). Due to the version_nn_nn_nn typedef guard,
* it is guaranteed that png.c uses the correct version of png.h.
*/
png_charp PNGAPI
png_get_libpng_ver(png_structp png_ptr)
{
/* Version of *.c files used when building libpng */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_LIBPNG_VER_STRING);
}
png_charp PNGAPI
png_get_header_ver(png_structp png_ptr)
{
/* Version of *.h files used when building libpng */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_LIBPNG_VER_STRING);
}
png_charp PNGAPI
png_get_header_version(png_structp png_ptr)
{
/* Returns longer string containing both version and date */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_HEADER_VERSION_STRING
#ifndef PNG_READ_SUPPORTED
" (NO READ SUPPORT)"
#endif
"\n");
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int PNGAPI
png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
{
/* Check chunk_name and return "keep" value if it's on the list, else 0 */
int i;
png_bytep p;
if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list<=0)
return 0;
p = png_ptr->chunk_list + png_ptr->num_chunk_list*5 - 5;
for (i = png_ptr->num_chunk_list; i; i--, p -= 5)
if (!png_memcmp(chunk_name, p, 4))
return ((int)*(p + 4));
return 0;
}
#endif
/* This function, added to libpng-1.0.6g, is untested. */
int PNGAPI
png_reset_zstream(png_structp png_ptr)
{
if (png_ptr == NULL)
return Z_STREAM_ERROR;
return (inflateReset(&png_ptr->zstream));
}
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
/* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI
png_access_version_number(void)
{
/* Version of *.c files used when building libpng */
return((png_uint_32) PNG_LIBPNG_VER);
}
#if defined(PNG_READ_SUPPORTED) && defined(PNG_ASSEMBLER_CODE_SUPPORTED)
#if !defined(PNG_1_0_X)
/* This function was added to libpng 1.2.0 */
int PNGAPI
png_mmx_support(void)
{
/* Obsolete, to be removed from libpng-1.4.0 */
return -1;
}
#endif /* PNG_1_0_X */
#endif /* PNG_READ_SUPPORTED && PNG_ASSEMBLER_CODE_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#ifdef PNG_SIZE_T
/* Added at libpng version 1.2.6 */
PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
png_size_t PNGAPI
png_convert_size(size_t size)
{
if (size > (png_size_t)-1)
PNG_ABORT(); /* We haven't got access to png_ptr, so no png_error() */
return ((png_size_t)size);
}
#endif /* PNG_SIZE_T */
/* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */
#if defined(PNG_cHRM_SUPPORTED)
#if !defined(PNG_NO_CHECK_cHRM)
/*
* Multiply two 32-bit numbers, V1 and V2, using 32-bit
* arithmetic, to produce a 64 bit result in the HI/LO words.
*
* A B
* x C D
* ------
* AD || BD
* AC || CB || 0
*
* where A and B are the high and low 16-bit words of V1,
* C and D are the 16-bit words of V2, AD is the product of
* A and D, and X || Y is (X << 16) + Y.
*/
void png_64bit_product (long v1, long v2, unsigned long *hi_product,
unsigned long *lo_product)
{
int a, b, c, d;
long lo, hi, x, y;
a = (v1 >> 16) & 0xffff;
b = v1 & 0xffff;
c = (v2 >> 16) & 0xffff;
d = v2 & 0xffff;
lo = b * d; /* BD */
x = a * d + c * b; /* AD + CB */
y = ((lo >> 16) & 0xffff) + x;
lo = (lo & 0xffff) | ((y & 0xffff) << 16);
hi = (y >> 16) & 0xffff;
hi += a * c; /* AC */
*hi_product = (unsigned long)hi;
*lo_product = (unsigned long)lo;
}
int /* private */
png_check_cHRM_fixed(png_structp png_ptr,
png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,
png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,
png_fixed_point blue_x, png_fixed_point blue_y)
{
int ret = 1;
unsigned long xy_hi,xy_lo,yx_hi,yx_lo;
png_debug(1, "in function png_check_cHRM_fixed");
if (png_ptr == NULL)
return 0;
if (white_x < 0 || white_y <= 0 ||
red_x < 0 || red_y < 0 ||
green_x < 0 || green_y < 0 ||
blue_x < 0 || blue_y < 0)
{
png_warning(png_ptr,
"Ignoring attempt to set negative chromaticity value");
ret = 0;
}
if (white_x > (png_fixed_point) PNG_UINT_31_MAX ||
white_y > (png_fixed_point) PNG_UINT_31_MAX ||
red_x > (png_fixed_point) PNG_UINT_31_MAX ||
red_y > (png_fixed_point) PNG_UINT_31_MAX ||
green_x > (png_fixed_point) PNG_UINT_31_MAX ||
green_y > (png_fixed_point) PNG_UINT_31_MAX ||
blue_x > (png_fixed_point) PNG_UINT_31_MAX ||
blue_y > (png_fixed_point) PNG_UINT_31_MAX )
{
png_warning(png_ptr,
"Ignoring attempt to set chromaticity value exceeding 21474.83");
ret = 0;
}
if (white_x > 100000L - white_y)
{
png_warning(png_ptr, "Invalid cHRM white point");
ret = 0;
}
if (red_x > 100000L - red_y)
{
png_warning(png_ptr, "Invalid cHRM red point");
ret = 0;
}
if (green_x > 100000L - green_y)
{
png_warning(png_ptr, "Invalid cHRM green point");
ret = 0;
}
if (blue_x > 100000L - blue_y)
{
png_warning(png_ptr, "Invalid cHRM blue point");
ret = 0;
}
png_64bit_product(green_x - red_x, blue_y - red_y, &xy_hi, &xy_lo);
png_64bit_product(green_y - red_y, blue_x - red_x, &yx_hi, &yx_lo);
if (xy_hi == yx_hi && xy_lo == yx_lo)
{
png_warning(png_ptr,
"Ignoring attempt to set cHRM RGB triangle with zero area");
ret = 0;
}
return ret;
}
#endif /* NO_PNG_CHECK_cHRM */
#endif /* PNG_cHRM_SUPPORTED */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,361 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* This file provides a location for all error handling. Users who
* need special error handling are expected to write replacement functions
* and use png_set_error_fn() to use those functions. See the instructions
* at each function.
*/
#define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
static void /* PRIVATE */
png_default_error PNGARG((png_structp png_ptr,
png_const_charp error_message));
#ifndef PNG_NO_WARNINGS
static void /* PRIVATE */
png_default_warning PNGARG((png_structp png_ptr,
png_const_charp warning_message));
#endif /* PNG_NO_WARNINGS */
/* This function is called whenever there is a fatal error. This function
* should not be changed. If there is a need to handle errors differently,
* you should supply a replacement error function and use png_set_error_fn()
* to replace the error function at run-time.
*/
#ifndef PNG_NO_ERROR_TEXT
void PNGAPI
png_error(png_structp png_ptr, png_const_charp error_message)
{
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
char msg[16];
if (png_ptr != NULL)
{
if (png_ptr->flags&
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
{
if (*error_message == '#')
{
/* Strip "#nnnn " from beginning of error message. */
int offset;
for (offset = 1; offset<15; offset++)
if (error_message[offset] == ' ')
break;
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
{
int i;
for (i = 0; i < offset - 1; i++)
msg[i] = error_message[i + 1];
msg[i - 1] = '\0';
error_message = msg;
}
else
error_message += offset;
}
else
{
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
{
msg[0] = '0';
msg[1] = '\0';
error_message = msg;
}
}
}
}
#endif
if (png_ptr != NULL && png_ptr->error_fn != NULL)
(*(png_ptr->error_fn))(png_ptr, error_message);
/* If the custom handler doesn't exist, or if it returns,
use the default handler, which will not return. */
png_default_error(png_ptr, error_message);
}
#else
void PNGAPI
png_err(png_structp png_ptr)
{
if (png_ptr != NULL && png_ptr->error_fn != NULL)
(*(png_ptr->error_fn))(png_ptr, '\0');
/* If the custom handler doesn't exist, or if it returns,
use the default handler, which will not return. */
png_default_error(png_ptr, '\0');
}
#endif /* PNG_NO_ERROR_TEXT */
#ifndef PNG_NO_WARNINGS
/* This function is called whenever there is a non-fatal error. This function
* should not be changed. If there is a need to handle warnings differently,
* you should supply a replacement warning function and use
* png_set_error_fn() to replace the warning function at run-time.
*/
void PNGAPI
png_warning(png_structp png_ptr, png_const_charp warning_message)
{
int offset = 0;
if (png_ptr != NULL)
{
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (png_ptr->flags&
(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
#endif
{
if (*warning_message == '#')
{
for (offset = 1; offset < 15; offset++)
if (warning_message[offset] == ' ')
break;
}
}
}
if (png_ptr != NULL && png_ptr->warning_fn != NULL)
(*(png_ptr->warning_fn))(png_ptr, warning_message + offset);
else
png_default_warning(png_ptr, warning_message + offset);
}
#endif /* PNG_NO_WARNINGS */
/* These utilities are used internally to build an error message that relates
* to the current chunk. The chunk name comes from png_ptr->chunk_name,
* this is used to prefix the message. The message is limited in length
* to 63 bytes, the name characters are output as hex digits wrapped in []
* if the character is invalid.
*/
#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
static PNG_CONST char png_digit[16] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'
};
#define PNG_MAX_ERROR_TEXT 64
#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT)
static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
error_message)
{
int iout = 0, iin = 0;
while (iin < 4)
{
int c = png_ptr->chunk_name[iin++];
if (isnonalpha(c))
{
buffer[iout++] = '[';
buffer[iout++] = png_digit[(c & 0xf0) >> 4];
buffer[iout++] = png_digit[c & 0x0f];
buffer[iout++] = ']';
}
else
{
buffer[iout++] = (png_byte)c;
}
}
if (error_message == NULL)
buffer[iout] = '\0';
else
{
buffer[iout++] = ':';
buffer[iout++] = ' ';
png_memcpy(buffer + iout, error_message, PNG_MAX_ERROR_TEXT);
buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0';
}
}
#ifdef PNG_READ_SUPPORTED
void PNGAPI
png_chunk_error(png_structp png_ptr, png_const_charp error_message)
{
char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL)
png_error(png_ptr, error_message);
else
{
png_format_buffer(png_ptr, msg, error_message);
png_error(png_ptr, msg);
}
}
#endif /* PNG_READ_SUPPORTED */
#endif /* !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT) */
#ifndef PNG_NO_WARNINGS
void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{
char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL)
png_warning(png_ptr, warning_message);
else
{
png_format_buffer(png_ptr, msg, warning_message);
png_warning(png_ptr, msg);
}
}
#endif /* PNG_NO_WARNINGS */
/* This is the default error handling function. Note that replacements for
* this function MUST NOT RETURN, or the program will likely crash. This
* function is used by default, or if the program supplies NULL for the
* error function pointer in png_set_error_fn().
*/
static void /* PRIVATE */
png_default_error(png_structp png_ptr, png_const_charp error_message)
{
#ifndef PNG_NO_CONSOLE_IO
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*error_message == '#')
{
/* Strip "#nnnn " from beginning of error message. */
int offset;
char error_number[16];
for (offset = 0; offset<15; offset++)
{
error_number[offset] = error_message[offset + 1];
if (error_message[offset] == ' ')
break;
}
if ((offset > 1) && (offset < 15))
{
error_number[offset - 1] = '\0';
fprintf(stderr, "libpng error no. %s: %s",
error_number, error_message + offset + 1);
fprintf(stderr, PNG_STRING_NEWLINE);
}
else
{
fprintf(stderr, "libpng error: %s, offset=%d",
error_message, offset);
fprintf(stderr, PNG_STRING_NEWLINE);
}
}
else
#endif
{
fprintf(stderr, "libpng error: %s", error_message);
fprintf(stderr, PNG_STRING_NEWLINE);
}
#endif
#ifdef PNG_SETJMP_SUPPORTED
if (png_ptr)
{
# ifdef USE_FAR_KEYWORD
{
jmp_buf jmpbuf;
png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
longjmp(jmpbuf, 1);
}
# else
longjmp(png_ptr->jmpbuf, 1);
# endif
}
#else
PNG_ABORT();
#endif
#ifdef PNG_NO_CONSOLE_IO
error_message = error_message; /* Make compiler happy */
#endif
}
#ifndef PNG_NO_WARNINGS
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
* here if you don't want them to. In the default configuration, png_ptr is
* not used, but it is passed in case it may be useful.
*/
static void /* PRIVATE */
png_default_warning(png_structp png_ptr, png_const_charp warning_message)
{
#ifndef PNG_NO_CONSOLE_IO
# ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*warning_message == '#')
{
int offset;
char warning_number[16];
for (offset = 0; offset < 15; offset++)
{
warning_number[offset] = warning_message[offset + 1];
if (warning_message[offset] == ' ')
break;
}
if ((offset > 1) && (offset < 15))
{
warning_number[offset + 1] = '\0';
fprintf(stderr, "libpng warning no. %s: %s",
warning_number, warning_message + offset);
fprintf(stderr, PNG_STRING_NEWLINE);
}
else
{
fprintf(stderr, "libpng warning: %s",
warning_message);
fprintf(stderr, PNG_STRING_NEWLINE);
}
}
else
# endif
{
fprintf(stderr, "libpng warning: %s", warning_message);
fprintf(stderr, PNG_STRING_NEWLINE);
}
#else
warning_message = warning_message; /* Make compiler happy */
#endif
png_ptr = png_ptr; /* Make compiler happy */
}
#endif /* PNG_NO_WARNINGS */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT
* return to the calling routine or serious problems will occur. The return
* method used in the default routine calls longjmp(png_ptr->jmpbuf, 1)
*/
void PNGAPI
png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warning_fn)
{
if (png_ptr == NULL)
return;
png_ptr->error_ptr = error_ptr;
png_ptr->error_fn = error_fn;
png_ptr->warning_fn = warning_fn;
}
/* This function returns a pointer to the error_ptr associated with the user
* functions. The application should free any memory associated with this
* pointer before png_write_destroy and png_read_destroy are called.
*/
png_voidp PNGAPI
png_get_error_ptr(png_structp png_ptr)
{
if (png_ptr == NULL)
return NULL;
return ((png_voidp)png_ptr->error_ptr);
}
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
void PNGAPI
png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
{
if (png_ptr != NULL)
{
png_ptr->flags &=
((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
}
}
#endif
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View file

@ -0,0 +1,103 @@
/* pnggccrd.c was removed from libpng-1.2.20. */
/* This code snippet is for use by configure's compilation test. */
#if (!defined _MSC_VER) && \
defined(PNG_ASSEMBLER_CODE_SUPPORTED) && \
defined(PNG_MMX_CODE_SUPPORTED)
int PNGAPI png_dummy_mmx_support(void);
static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested
int PNGAPI
png_dummy_mmx_support(void) __attribute__((noinline));
int PNGAPI
png_dummy_mmx_support(void)
{
int result;
#if defined(PNG_MMX_CODE_SUPPORTED) // superfluous, but what the heck
__asm__ __volatile__ (
#if defined(__x86_64__)
"pushq %%rbx \n\t" // rbx gets clobbered by CPUID instruction
"pushq %%rcx \n\t" // so does rcx...
"pushq %%rdx \n\t" // ...and rdx (but rcx & rdx safe on Linux)
"pushfq \n\t" // save Eflag to stack
"popq %%rax \n\t" // get Eflag from stack into rax
"movq %%rax, %%rcx \n\t" // make another copy of Eflag in rcx
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
"pushq %%rax \n\t" // save modified Eflag back to stack
"popfq \n\t" // restore modified value to Eflag reg
"pushfq \n\t" // save Eflag to stack
"popq %%rax \n\t" // get Eflag from stack
"pushq %%rcx \n\t" // save original Eflag to stack
"popfq \n\t" // restore original Eflag
#else
"pushl %%ebx \n\t" // ebx gets clobbered by CPUID instruction
"pushl %%ecx \n\t" // so does ecx...
"pushl %%edx \n\t" // ...and edx (but ecx & edx safe on Linux)
"pushfl \n\t" // save Eflag to stack
"popl %%eax \n\t" // get Eflag from stack into eax
"movl %%eax, %%ecx \n\t" // make another copy of Eflag in ecx
"xorl $0x200000, %%eax \n\t" // toggle ID bit in Eflag (i.e., bit 21)
"pushl %%eax \n\t" // save modified Eflag back to stack
"popfl \n\t" // restore modified value to Eflag reg
"pushfl \n\t" // save Eflag to stack
"popl %%eax \n\t" // get Eflag from stack
"pushl %%ecx \n\t" // save original Eflag to stack
"popfl \n\t" // restore original Eflag
#endif
"xorl %%ecx, %%eax \n\t" // compare new Eflag with original Eflag
"jz 0f \n\t" // if same, CPUID instr. is not supported
"xorl %%eax, %%eax \n\t" // set eax to zero
// ".byte 0x0f, 0xa2 \n\t" // CPUID instruction (two-byte opcode)
"cpuid \n\t" // get the CPU identification info
"cmpl $1, %%eax \n\t" // make sure eax return non-zero value
"jl 0f \n\t" // if eax is zero, MMX is not supported
"xorl %%eax, %%eax \n\t" // set eax to zero and...
"incl %%eax \n\t" // ...increment eax to 1. This pair is
// faster than the instruction "mov eax, 1"
"cpuid \n\t" // get the CPU identification info again
"andl $0x800000, %%edx \n\t" // mask out all bits but MMX bit (23)
"cmpl $0, %%edx \n\t" // 0 = MMX not supported
"jz 0f \n\t" // non-zero = yes, MMX IS supported
"movl $1, %%eax \n\t" // set return value to 1
"jmp 1f \n\t" // DONE: have MMX support
"0: \n\t" // .NOT_SUPPORTED: target label for jump instructions
"movl $0, %%eax \n\t" // set return value to 0
"1: \n\t" // .RETURN: target label for jump instructions
#if defined(__x86_64__)
"popq %%rdx \n\t" // restore rdx
"popq %%rcx \n\t" // restore rcx
"popq %%rbx \n\t" // restore rbx
#else
"popl %%edx \n\t" // restore edx
"popl %%ecx \n\t" // restore ecx
"popl %%ebx \n\t" // restore ebx
#endif
// "ret \n\t" // DONE: no MMX support
// (fall through to standard C "ret")
: "=a" (result) // output list
: // any variables used on input (none)
// no clobber list
// , "%ebx", "%ecx", "%edx" // GRR: we handle these manually
// , "memory" // if write to a variable gcc thought was in a reg
// , "cc" // "condition codes" (flag bits)
);
_mmx_supported = result;
#else
_mmx_supported = 0;
#endif /* PNG_MMX_CODE_SUPPORTED */
return _mmx_supported;
}
#endif

View file

@ -0,0 +1,939 @@
/* pngget.c - retrieval of values from info struct
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
#define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
png_uint_32 PNGAPI
png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->valid & flag);
else
return(0);
}
png_uint_32 PNGAPI
png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->rowbytes);
else
return(0);
}
#if defined(PNG_INFO_IMAGE_SUPPORTED)
png_bytepp PNGAPI
png_get_rows(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->row_pointers);
else
return(0);
}
#endif
#ifdef PNG_EASY_ACCESS_SUPPORTED
/* Easy access to info, added in libpng-0.99 */
png_uint_32 PNGAPI
png_get_image_width(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->width;
return (0);
}
png_uint_32 PNGAPI
png_get_image_height(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->height;
return (0);
}
png_byte PNGAPI
png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->bit_depth;
return (0);
}
png_byte PNGAPI
png_get_color_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->color_type;
return (0);
}
png_byte PNGAPI
png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->filter_type;
return (0);
}
png_byte PNGAPI
png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->interlace_type;
return (0);
}
png_byte PNGAPI
png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->compression_type;
return (0);
}
png_uint_32 PNGAPI
png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_pixels_per_meter");
if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
return (0);
else
return (info_ptr->x_pixels_per_unit);
}
#else
return (0);
#endif
return (0);
}
png_uint_32 PNGAPI
png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter");
if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
return (0);
else
return (info_ptr->y_pixels_per_unit);
}
#else
return (0);
#endif
return (0);
}
png_uint_32 PNGAPI
png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER ||
info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit)
return (0);
else
return (info_ptr->x_pixels_per_unit);
}
#else
return (0);
#endif
return (0);
}
#ifdef PNG_FLOATING_POINT_SUPPORTED
float PNGAPI
png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_pHYs)
{
png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
if (info_ptr->x_pixels_per_unit == 0)
return ((float)0.0);
else
return ((float)((float)info_ptr->y_pixels_per_unit
/(float)info_ptr->x_pixels_per_unit));
}
#else
return (0.0);
#endif
return ((float)0.0);
}
#endif
png_int_32 PNGAPI
png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
return (0);
else
return (info_ptr->x_offset);
}
#else
return (0);
#endif
return (0);
}
png_int_32 PNGAPI
png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
return (0);
else
return (info_ptr->y_offset);
}
#else
return (0);
#endif
return (0);
}
png_int_32 PNGAPI
png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
return (0);
else
return (info_ptr->x_offset);
}
#else
return (0);
#endif
return (0);
}
png_int_32 PNGAPI
png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
if (info_ptr->valid & PNG_INFO_oFFs)
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
return (0);
else
return (info_ptr->y_offset);
}
#else
return (0);
#endif
return (0);
}
#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
png_uint_32 PNGAPI
png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
{
return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr)
*.0254 +.5));
}
png_uint_32 PNGAPI
png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
{
return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr)
*.0254 +.5));
}
png_uint_32 PNGAPI
png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
{
return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr)
*.0254 +.5));
}
float PNGAPI
png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr)
{
return ((float)png_get_x_offset_microns(png_ptr, info_ptr)
*.00003937);
}
float PNGAPI
png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
{
return ((float)png_get_y_offset_microns(png_ptr, info_ptr)
*.00003937);
}
#if defined(PNG_pHYs_SUPPORTED)
png_uint_32 PNGAPI
png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "pHYs");
if (res_x != NULL)
{
*res_x = info_ptr->x_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
if (res_y != NULL)
{
*res_y = info_ptr->y_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
if (unit_type != NULL)
{
*unit_type = (int)info_ptr->phys_unit_type;
retval |= PNG_INFO_pHYs;
if (*unit_type == 1)
{
if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50);
if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50);
}
}
}
return (retval);
}
#endif /* PNG_pHYs_SUPPORTED */
#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
/* png_get_channels really belongs in here, too, but it's been around longer */
#endif /* PNG_EASY_ACCESS_SUPPORTED */
png_byte PNGAPI
png_get_channels(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->channels);
else
return (0);
}
png_bytep PNGAPI
png_get_signature(png_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->signature);
else
return (NULL);
}
#if defined(PNG_bKGD_SUPPORTED)
png_uint_32 PNGAPI
png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
png_color_16p *background)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)
&& background != NULL)
{
png_debug1(1, "in %s retrieval function", "bKGD");
*background = &(info_ptr->background);
return (PNG_INFO_bKGD);
}
return (0);
}
#endif
#if defined(PNG_cHRM_SUPPORTED)
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
double *white_x, double *white_y, double *red_x, double *red_y,
double *green_x, double *green_y, double *blue_x, double *blue_y)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (white_x != NULL)
*white_x = (double)info_ptr->x_white;
if (white_y != NULL)
*white_y = (double)info_ptr->y_white;
if (red_x != NULL)
*red_x = (double)info_ptr->x_red;
if (red_y != NULL)
*red_y = (double)info_ptr->y_red;
if (green_x != NULL)
*green_x = (double)info_ptr->x_green;
if (green_y != NULL)
*green_y = (double)info_ptr->y_green;
if (blue_x != NULL)
*blue_x = (double)info_ptr->x_blue;
if (blue_y != NULL)
*blue_y = (double)info_ptr->y_blue;
return (PNG_INFO_cHRM);
}
return (0);
}
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,
png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
png_fixed_point *blue_x, png_fixed_point *blue_y)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (white_x != NULL)
*white_x = info_ptr->int_x_white;
if (white_y != NULL)
*white_y = info_ptr->int_y_white;
if (red_x != NULL)
*red_x = info_ptr->int_x_red;
if (red_y != NULL)
*red_y = info_ptr->int_y_red;
if (green_x != NULL)
*green_x = info_ptr->int_x_green;
if (green_y != NULL)
*green_y = info_ptr->int_y_green;
if (blue_x != NULL)
*blue_x = info_ptr->int_x_blue;
if (blue_y != NULL)
*blue_y = info_ptr->int_y_blue;
return (PNG_INFO_cHRM);
}
return (0);
}
#endif
#endif
#if defined(PNG_gAMA_SUPPORTED)
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
&& file_gamma != NULL)
{
png_debug1(1, "in %s retrieval function", "gAMA");
*file_gamma = (double)info_ptr->gamma;
return (PNG_INFO_gAMA);
}
return (0);
}
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
png_fixed_point *int_file_gamma)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
&& int_file_gamma != NULL)
{
png_debug1(1, "in %s retrieval function", "gAMA");
*int_file_gamma = info_ptr->int_gamma;
return (PNG_INFO_gAMA);
}
return (0);
}
#endif
#endif
#if defined(PNG_sRGB_SUPPORTED)
png_uint_32 PNGAPI
png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
&& file_srgb_intent != NULL)
{
png_debug1(1, "in %s retrieval function", "sRGB");
*file_srgb_intent = (int)info_ptr->srgb_intent;
return (PNG_INFO_sRGB);
}
return (0);
}
#endif
#if defined(PNG_iCCP_SUPPORTED)
png_uint_32 PNGAPI
png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
&& name != NULL && profile != NULL && proflen != NULL)
{
png_debug1(1, "in %s retrieval function", "iCCP");
*name = info_ptr->iccp_name;
*profile = info_ptr->iccp_profile;
/* Compression_type is a dummy so the API won't have to change
* if we introduce multiple compression types later.
*/
*proflen = (int)info_ptr->iccp_proflen;
*compression_type = (int)info_ptr->iccp_compression;
return (PNG_INFO_iCCP);
}
return (0);
}
#endif
#if defined(PNG_sPLT_SUPPORTED)
png_uint_32 PNGAPI
png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
png_sPLT_tpp spalettes)
{
if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
{
*spalettes = info_ptr->splt_palettes;
return ((png_uint_32)info_ptr->splt_palettes_num);
}
return (0);
}
#endif
#if defined(PNG_hIST_SUPPORTED)
png_uint_32 PNGAPI
png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
&& hist != NULL)
{
png_debug1(1, "in %s retrieval function", "hIST");
*hist = info_ptr->hist;
return (PNG_INFO_hIST);
}
return (0);
}
#endif
png_uint_32 PNGAPI
png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *width, png_uint_32 *height, int *bit_depth,
int *color_type, int *interlace_type, int *compression_type,
int *filter_type)
{
if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL &&
bit_depth != NULL && color_type != NULL)
{
png_debug1(1, "in %s retrieval function", "IHDR");
*width = info_ptr->width;
*height = info_ptr->height;
*bit_depth = info_ptr->bit_depth;
if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16)
png_error(png_ptr, "Invalid bit depth");
*color_type = info_ptr->color_type;
if (info_ptr->color_type > 6)
png_error(png_ptr, "Invalid color type");
if (compression_type != NULL)
*compression_type = info_ptr->compression_type;
if (filter_type != NULL)
*filter_type = info_ptr->filter_type;
if (interlace_type != NULL)
*interlace_type = info_ptr->interlace_type;
/* Check for potential overflow of rowbytes */
if (*width == 0 || *width > PNG_UINT_31_MAX)
png_error(png_ptr, "Invalid image width");
if (*height == 0 || *height > PNG_UINT_31_MAX)
png_error(png_ptr, "Invalid image height");
if (info_ptr->width > (PNG_UINT_32_MAX
>> 3) /* 8-byte RGBA pixels */
- 64 /* bigrowbuf hack */
- 1 /* filter byte */
- 7*8 /* rounding of width to multiple of 8 pixels */
- 8) /* extra max_pixel_depth pad */
{
png_warning(png_ptr,
"Width too large for libpng to process image data.");
}
return (1);
}
return (0);
}
#if defined(PNG_oFFs_SUPPORTED)
png_uint_32 PNGAPI
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
&& offset_x != NULL && offset_y != NULL && unit_type != NULL)
{
png_debug1(1, "in %s retrieval function", "oFFs");
*offset_x = info_ptr->x_offset;
*offset_y = info_ptr->y_offset;
*unit_type = (int)info_ptr->offset_unit_type;
return (PNG_INFO_oFFs);
}
return (0);
}
#endif
#if defined(PNG_pCAL_SUPPORTED)
png_uint_32 PNGAPI
png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
png_charp *units, png_charpp *params)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)
&& purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
nparams != NULL && units != NULL && params != NULL)
{
png_debug1(1, "in %s retrieval function", "pCAL");
*purpose = info_ptr->pcal_purpose;
*X0 = info_ptr->pcal_X0;
*X1 = info_ptr->pcal_X1;
*type = (int)info_ptr->pcal_type;
*nparams = (int)info_ptr->pcal_nparams;
*units = info_ptr->pcal_units;
*params = info_ptr->pcal_params;
return (PNG_INFO_pCAL);
}
return (0);
}
#endif
#if defined(PNG_sCAL_SUPPORTED)
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
int *unit, double *width, double *height)
{
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_sCAL))
{
*unit = info_ptr->scal_unit;
*width = info_ptr->scal_pixel_width;
*height = info_ptr->scal_pixel_height;
return (PNG_INFO_sCAL);
}
return(0);
}
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
int *unit, png_charpp width, png_charpp height)
{
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_sCAL))
{
*unit = info_ptr->scal_unit;
*width = info_ptr->scal_s_width;
*height = info_ptr->scal_s_height;
return (PNG_INFO_sCAL);
}
return(0);
}
#endif
#endif
#endif
#if defined(PNG_pHYs_SUPPORTED)
png_uint_32 PNGAPI
png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "pHYs");
if (res_x != NULL)
{
*res_x = info_ptr->x_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
if (res_y != NULL)
{
*res_y = info_ptr->y_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
if (unit_type != NULL)
{
*unit_type = (int)info_ptr->phys_unit_type;
retval |= PNG_INFO_pHYs;
}
}
return (retval);
}
#endif
png_uint_32 PNGAPI
png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
int *num_palette)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)
&& palette != NULL)
{
png_debug1(1, "in %s retrieval function", "PLTE");
*palette = info_ptr->palette;
*num_palette = info_ptr->num_palette;
png_debug1(3, "num_palette = %d", *num_palette);
return (PNG_INFO_PLTE);
}
return (0);
}
#if defined(PNG_sBIT_SUPPORTED)
png_uint_32 PNGAPI
png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
&& sig_bit != NULL)
{
png_debug1(1, "in %s retrieval function", "sBIT");
*sig_bit = &(info_ptr->sig_bit);
return (PNG_INFO_sBIT);
}
return (0);
}
#endif
#if defined(PNG_TEXT_SUPPORTED)
png_uint_32 PNGAPI
png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
int *num_text)
{
if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
{
png_debug1(1, "in %s retrieval function",
(png_ptr->chunk_name[0] == '\0' ? "text"
: (png_const_charp)png_ptr->chunk_name));
if (text_ptr != NULL)
*text_ptr = info_ptr->text;
if (num_text != NULL)
*num_text = info_ptr->num_text;
return ((png_uint_32)info_ptr->num_text);
}
if (num_text != NULL)
*num_text = 0;
return(0);
}
#endif
#if defined(PNG_tIME_SUPPORTED)
png_uint_32 PNGAPI
png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)
&& mod_time != NULL)
{
png_debug1(1, "in %s retrieval function", "tIME");
*mod_time = &(info_ptr->mod_time);
return (PNG_INFO_tIME);
}
return (0);
}
#endif
#if defined(PNG_tRNS_SUPPORTED)
png_uint_32 PNGAPI
png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
png_bytep *trans, int *num_trans, png_color_16p *trans_values)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
{
png_debug1(1, "in %s retrieval function", "tRNS");
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (trans != NULL)
{
*trans = info_ptr->trans;
retval |= PNG_INFO_tRNS;
}
if (trans_values != NULL)
*trans_values = &(info_ptr->trans_values);
}
else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
{
if (trans_values != NULL)
{
*trans_values = &(info_ptr->trans_values);
retval |= PNG_INFO_tRNS;
}
if (trans != NULL)
*trans = NULL;
}
if (num_trans != NULL)
{
*num_trans = info_ptr->num_trans;
retval |= PNG_INFO_tRNS;
}
}
return (retval);
}
#endif
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
png_uint_32 PNGAPI
png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
png_unknown_chunkpp unknowns)
{
if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
{
*unknowns = info_ptr->unknown_chunks;
return ((png_uint_32)info_ptr->unknown_chunks_num);
}
return (0);
}
#endif
#if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
png_byte PNGAPI
png_get_rgb_to_gray_status (png_structp png_ptr)
{
return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
}
#endif
#if defined(PNG_USER_CHUNKS_SUPPORTED)
png_voidp PNGAPI
png_get_user_chunk_ptr(png_structp png_ptr)
{
return (png_ptr? png_ptr->user_chunk_ptr : NULL);
}
#endif
#ifdef PNG_WRITE_SUPPORTED
png_uint_32 PNGAPI
png_get_compression_buffer_size(png_structp png_ptr)
{
return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
}
#endif
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
#ifndef PNG_1_0_X
/* This function was added to libpng 1.2.0 and should exist by default */
png_uint_32 PNGAPI
png_get_asm_flags (png_structp png_ptr)
{
/* Obsolete, to be removed from libpng-1.4.0 */
return (png_ptr? 0L: 0L);
}
/* This function was added to libpng 1.2.0 and should exist by default */
png_uint_32 PNGAPI
png_get_asm_flagmask (int flag_select)
{
/* Obsolete, to be removed from libpng-1.4.0 */
flag_select=flag_select;
return 0L;
}
/* GRR: could add this: && defined(PNG_MMX_CODE_SUPPORTED) */
/* This function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
png_get_mmx_flagmask (int flag_select, int *compilerID)
{
/* Obsolete, to be removed from libpng-1.4.0 */
flag_select=flag_select;
*compilerID = -1; /* unknown (i.e., no asm/MMX code compiled) */
return 0L;
}
/* This function was added to libpng 1.2.0 */
png_byte PNGAPI
png_get_mmx_bitdepth_threshold (png_structp png_ptr)
{
/* Obsolete, to be removed from libpng-1.4.0 */
return (png_ptr? 0: 0);
}
/* This function was added to libpng 1.2.0 */
png_uint_32 PNGAPI
png_get_mmx_rowbytes_threshold (png_structp png_ptr)
{
/* Obsolete, to be removed from libpng-1.4.0 */
return (png_ptr? 0L: 0L);
}
#endif /* ?PNG_1_0_X */
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
/* These functions were added to libpng 1.2.6 */
png_uint_32 PNGAPI
png_get_user_width_max (png_structp png_ptr)
{
return (png_ptr? png_ptr->user_width_max : 0);
}
png_uint_32 PNGAPI
png_get_user_height_max (png_structp png_ptr)
{
return (png_ptr? png_ptr->user_height_max : 0);
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View file

@ -0,0 +1,617 @@
/* pngmem.c - stub functions for memory allocation
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* This file provides a location for all memory allocation. Users who
* need special memory handling are expected to supply replacement
* functions for png_malloc() and png_free(), and to use
* png_create_read_struct_2() and png_create_write_struct_2() to
* identify the replacement functions.
*/
#define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
/* Borland DOS special memory handler */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
/* If you change this, be sure to change the one in png.h also */
/* Allocate memory for a png_struct. The malloc and memset can be replaced
by a single call to calloc() if this is thought to improve performance. */
png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
}
/* Alternate version of png_create_struct, for use with user-defined malloc. */
png_voidp /* PRIVATE */
png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
{
#endif /* PNG_USER_MEM_SUPPORTED */
png_size_t size;
png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info);
else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct);
else
return (png_get_copyright(NULL));
#ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL)
{
png_struct dummy_struct;
png_structp png_ptr = &dummy_struct;
png_ptr->mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
}
else
#endif /* PNG_USER_MEM_SUPPORTED */
struct_ptr = (png_voidp)farmalloc(size);
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
return (struct_ptr);
}
/* Free memory allocated by a png_create_struct() call */
void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
}
/* Free memory allocated by a png_create_struct() call */
void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
png_voidp mem_ptr)
{
#endif
if (struct_ptr != NULL)
{
#ifdef PNG_USER_MEM_SUPPORTED
if (free_fn != NULL)
{
png_struct dummy_struct;
png_structp png_ptr = &dummy_struct;
png_ptr->mem_ptr=mem_ptr;
(*(free_fn))(png_ptr, struct_ptr);
return;
}
#endif /* PNG_USER_MEM_SUPPORTED */
farfree (struct_ptr);
}
}
/* Allocate memory. For reasonable files, size should never exceed
* 64K. However, zlib may allocate more then 64K if you don't tell
* it not to. See zconf.h and png.h for more information. zlib does
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.
*
* Borland seems to have a problem in DOS mode for exactly 64K.
* It gives you a segment with an offset of 8 (perhaps to store its
* memory stuff). zlib doesn't like this at all, so we have to
* detect and deal with it. This code should not be needed in
* Windows or OS/2 modes, and only in 16 bit mode. This code has
* been updated by Alexander Lehmann for version 0.89 to waste less
* memory.
*
* Note that we can't use png_size_t for the "size" declaration,
* since on some systems a png_size_t is a 16-bit quantity, and as a
* result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems.
*/
png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
if (png_ptr == NULL || size == 0)
return (NULL);
#ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
else
ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory!");
return (ret);
}
png_voidp PNGAPI
png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
#endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || size == 0)
return (NULL);
#ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L)
{
png_warning(png_ptr, "Cannot Allocate > 64K");
ret = NULL;
}
else
#endif
if (size != (size_t)size)
ret = NULL;
else if (size == (png_uint_32)65536L)
{
if (png_ptr->offset_table == NULL)
{
/* Try to see if we need to do any of this fancy stuff */
ret = farmalloc(size);
if (ret == NULL || ((png_size_t)ret & 0xffff))
{
int num_blocks;
png_uint_32 total_size;
png_bytep table;
int i;
png_byte huge * hptr;
if (ret != NULL)
{
farfree(ret);
ret = NULL;
}
if (png_ptr->zlib_window_bits > 14)
num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14));
else
num_blocks = 1;
if (png_ptr->zlib_mem_level >= 7)
num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7));
else
num_blocks++;
total_size = ((png_uint_32)65536L) * (png_uint_32)num_blocks+16;
table = farmalloc(total_size);
if (table == NULL)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
else
png_warning(png_ptr, "Out Of Memory.");
#endif
return (NULL);
}
if ((png_size_t)table & 0xfff0)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr,
"Farmalloc didn't return normalized pointer");
else
png_warning(png_ptr,
"Farmalloc didn't return normalized pointer");
#endif
return (NULL);
}
png_ptr->offset_table = table;
png_ptr->offset_table_ptr = farmalloc(num_blocks *
png_sizeof(png_bytep));
if (png_ptr->offset_table_ptr == NULL)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
else
png_warning(png_ptr, "Out Of memory.");
#endif
return (NULL);
}
hptr = (png_byte huge *)table;
if ((png_size_t)hptr & 0xf)
{
hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */
}
for (i = 0; i < num_blocks; i++)
{
png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
hptr = hptr + (png_uint_32)65536L; /* "+=" fails on TC++3.0 */
}
png_ptr->offset_table_number = num_blocks;
png_ptr->offset_table_count = 0;
png_ptr->offset_table_count_free = 0;
}
}
if (png_ptr->offset_table_count >= png_ptr->offset_table_number)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory."); /* Note "o" and "M" */
else
png_warning(png_ptr, "Out of Memory.");
#endif
return (NULL);
}
ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];
}
else
ret = farmalloc(size);
#ifndef PNG_USER_MEM_SUPPORTED
if (ret == NULL)
{
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory."); /* Note "o" and "m" */
else
png_warning(png_ptr, "Out of memory."); /* Note "o" and "m" */
}
#endif
return (ret);
}
/* Free a pointer allocated by png_malloc(). In the default
* configuration, png_ptr is not used, but is passed in case it
* is needed. If ptr is NULL, return without taking any action.
*/
void PNGAPI
png_free(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
return;
#ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->free_fn != NULL)
{
(*(png_ptr->free_fn))(png_ptr, ptr);
return;
}
else
png_free_default(png_ptr, ptr);
}
void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr)
{
#endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || ptr == NULL)
return;
if (png_ptr->offset_table != NULL)
{
int i;
for (i = 0; i < png_ptr->offset_table_count; i++)
{
if (ptr == png_ptr->offset_table_ptr[i])
{
ptr = NULL;
png_ptr->offset_table_count_free++;
break;
}
}
if (png_ptr->offset_table_count_free == png_ptr->offset_table_count)
{
farfree(png_ptr->offset_table);
farfree(png_ptr->offset_table_ptr);
png_ptr->offset_table = NULL;
png_ptr->offset_table_ptr = NULL;
}
}
if (ptr != NULL)
{
farfree(ptr);
}
}
#else /* Not the Borland DOS special memory handler */
/* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably. */
png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, png_malloc_ptr_NULL, png_voidp_NULL));
}
/* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably. */
png_voidp /* PRIVATE */
png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
{
#endif /* PNG_USER_MEM_SUPPORTED */
png_size_t size;
png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info);
else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct);
else
return (NULL);
#ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL)
{
png_struct dummy_struct;
png_structp png_ptr = &dummy_struct;
png_ptr->mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(png_ptr, size);
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
return (struct_ptr);
}
#endif /* PNG_USER_MEM_SUPPORTED */
#if defined(__TURBOC__) && !defined(__FLAT__)
struct_ptr = (png_voidp)farmalloc(size);
#else
# if defined(_MSC_VER) && defined(MAXSEG_64K)
struct_ptr = (png_voidp)halloc(size, 1);
# else
struct_ptr = (png_voidp)malloc(size);
# endif
#endif
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
return (struct_ptr);
}
/* Free memory allocated by a png_create_struct() call */
void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, png_free_ptr_NULL, png_voidp_NULL);
}
/* Free memory allocated by a png_create_struct() call */
void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
png_voidp mem_ptr)
{
#endif /* PNG_USER_MEM_SUPPORTED */
if (struct_ptr != NULL)
{
#ifdef PNG_USER_MEM_SUPPORTED
if (free_fn != NULL)
{
png_struct dummy_struct;
png_structp png_ptr = &dummy_struct;
png_ptr->mem_ptr=mem_ptr;
(*(free_fn))(png_ptr, struct_ptr);
return;
}
#endif /* PNG_USER_MEM_SUPPORTED */
#if defined(__TURBOC__) && !defined(__FLAT__)
farfree(struct_ptr);
#else
# if defined(_MSC_VER) && defined(MAXSEG_64K)
hfree(struct_ptr);
# else
free(struct_ptr);
# endif
#endif
}
}
/* Allocate memory. For reasonable files, size should never exceed
* 64K. However, zlib may allocate more then 64K if you don't tell
* it not to. See zconf.h and png.h for more information. zlib does
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.
*/
png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
#ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr == NULL || size == 0)
return (NULL);
if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
else
ret = (png_malloc_default(png_ptr, size));
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory!");
return (ret);
}
png_voidp PNGAPI
png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
#endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || size == 0)
return (NULL);
#ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Cannot Allocate > 64K");
else
#endif
return NULL;
}
#endif
/* Check for overflow */
#if defined(__TURBOC__) && !defined(__FLAT__)
if (size != (unsigned long)size)
ret = NULL;
else
ret = farmalloc(size);
#else
# if defined(_MSC_VER) && defined(MAXSEG_64K)
if (size != (unsigned long)size)
ret = NULL;
else
ret = halloc(size, 1);
# else
if (size != (size_t)size)
ret = NULL;
else
ret = malloc((size_t)size);
# endif
#endif
#ifndef PNG_USER_MEM_SUPPORTED
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory");
#endif
return (ret);
}
/* Free a pointer allocated by png_malloc(). If ptr is NULL, return
* without taking any action.
*/
void PNGAPI
png_free(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
return;
#ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->free_fn != NULL)
{
(*(png_ptr->free_fn))(png_ptr, ptr);
return;
}
else
png_free_default(png_ptr, ptr);
}
void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
return;
#endif /* PNG_USER_MEM_SUPPORTED */
#if defined(__TURBOC__) && !defined(__FLAT__)
farfree(ptr);
#else
# if defined(_MSC_VER) && defined(MAXSEG_64K)
hfree(ptr);
# else
free(ptr);
# endif
#endif
}
#endif /* Not Borland DOS special memory handler */
#if defined(PNG_1_0_X)
# define png_malloc_warn png_malloc
#else
/* This function was added at libpng version 1.2.3. The png_malloc_warn()
* function will set up png_malloc() to issue a png_warning and return NULL
* instead of issuing a png_error, if it fails to allocate the requested
* memory.
*/
png_voidp PNGAPI
png_malloc_warn(png_structp png_ptr, png_uint_32 size)
{
png_voidp ptr;
png_uint_32 save_flags;
if (png_ptr == NULL)
return (NULL);
save_flags = png_ptr->flags;
png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
ptr = (png_voidp)png_malloc((png_structp)png_ptr, size);
png_ptr->flags=save_flags;
return(ptr);
}
#endif
png_voidp PNGAPI
png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
png_uint_32 length)
{
png_size_t size;
size = (png_size_t)length;
if ((png_uint_32)size != length)
png_error(png_ptr, "Overflow in png_memcpy_check.");
return(png_memcpy (s1, s2, size));
}
png_voidp PNGAPI
png_memset_check (png_structp png_ptr, png_voidp s1, int value,
png_uint_32 length)
{
png_size_t size;
size = (png_size_t)length;
if ((png_uint_32)size != length)
png_error(png_ptr, "Overflow in png_memset_check.");
return (png_memset (s1, value, size));
}
#ifdef PNG_USER_MEM_SUPPORTED
/* This function is called when the application wants to use another method
* of allocating and freeing memory.
*/
void PNGAPI
png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
malloc_fn, png_free_ptr free_fn)
{
if (png_ptr != NULL)
{
png_ptr->mem_ptr = mem_ptr;
png_ptr->malloc_fn = malloc_fn;
png_ptr->free_fn = free_fn;
}
}
/* This function returns a pointer to the mem_ptr associated with the user
* functions. The application should free any memory associated with this
* pointer before png_write_destroy and png_read_destroy are called.
*/
png_voidp PNGAPI
png_get_mem_ptr(png_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
return ((png_voidp)png_ptr->mem_ptr);
}
#endif /* PNG_USER_MEM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,174 @@
/* pngrio.c - functions for data input
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* This file provides a location for all input. Users who need
* special handling are expected to write a function that has the same
* arguments as this and performs a similar function, but that possibly
* has a different input method. Note that you shouldn't change this
* function, but rather write a replacement function and then make
* libpng use it at run time with png_set_read_fn(...).
*/
#define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED)
/* Read the data from whatever input you are using. The default routine
* reads from a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
* buffering if you are using unbuffered reads. This should never be asked
* to read more then 64K on a 16 bit machine.
*/
void /* PRIVATE */
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_debug1(4, "reading %d bytes", (int)length);
if (png_ptr->read_data_fn != NULL)
(*(png_ptr->read_data_fn))(png_ptr, data, length);
else
png_error(png_ptr, "Call to NULL read function");
}
#if !defined(PNG_NO_STDIO)
/* This is the function that does the actual reading of data. If you are
* not reading from a standard C stream, you should create a replacement
* read_data function and use it at run time with png_set_read_fn(), rather
* than changing the library.
*/
#ifndef USE_FAR_KEYWORD
void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
if (png_ptr == NULL)
return;
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
* instead of an int, which is what fread() actually returns.
*/
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = (png_size_t)fread(data, (png_size_t)1, length,
(png_FILE_p)png_ptr->io_ptr);
#endif
if (check != length)
png_error(png_ptr, "Read Error");
}
#else
/* This is the model-independent version. Since the standard I/O library
can't handle far buffers in the medium and small models, we have to copy
the data.
*/
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
static void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
int check;
png_byte *n_data;
png_FILE_p io_ptr;
if (png_ptr == NULL)
return;
/* Check if data really is near. If so, use usual code. */
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)n_data == data)
{
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = fread(n_data, 1, length, io_ptr);
#endif
}
else
{
png_byte buf[NEAR_BUF_SIZE];
png_size_t read, remaining, err;
check = 0;
remaining = length;
do
{
read = MIN(NEAR_BUF_SIZE, remaining);
#if defined(_WIN32_WCE)
if ( !ReadFile((HANDLE)(io_ptr), buf, read, &err, NULL) )
err = 0;
#else
err = fread(buf, (png_size_t)1, read, io_ptr);
#endif
png_memcpy(data, buf, read); /* copy far buffer to near buffer */
if (err != read)
break;
else
check += err;
data += read;
remaining -= read;
}
while (remaining != 0);
}
if ((png_uint_32)check != (png_uint_32)length)
png_error(png_ptr, "read Error");
}
#endif
#endif
/* This function allows the application to supply a new input function
* for libpng if standard C streams aren't being used.
*
* This function takes as its arguments:
* png_ptr - pointer to a png input data structure
* io_ptr - pointer to user supplied structure containing info about
* the input functions. May be NULL.
* read_data_fn - pointer to a new input function that takes as its
* arguments a pointer to a png_struct, a pointer to
* a location where input data can be stored, and a 32-bit
* unsigned int that is the number of bytes to be read.
* To exit and output any fatal error messages the new write
* function should call png_error(png_ptr, "Error msg").
* May be NULL, in which case libpng's default function will
* be used.
*/
void PNGAPI
png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
png_rw_ptr read_data_fn)
{
if (png_ptr == NULL)
return;
png_ptr->io_ptr = io_ptr;
#if !defined(PNG_NO_STDIO)
if (read_data_fn != NULL)
png_ptr->read_data_fn = read_data_fn;
else
png_ptr->read_data_fn = png_default_read_data;
#else
png_ptr->read_data_fn = read_data_fn;
#endif
/* It is an error to write to a read device */
if (png_ptr->write_data_fn != NULL)
{
png_ptr->write_data_fn = NULL;
png_warning(png_ptr,
"It's an error to set both read_data_fn and write_data_fn in the ");
png_warning(png_ptr,
"same structure. Resetting write_data_fn to NULL.");
}
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
png_ptr->output_flush_fn = NULL;
#endif
}
#endif /* PNG_READ_SUPPORTED */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,674 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* Last changed in libpng 1.2.36 [May 14, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
#define PNG_INTERNAL
#include "png.h"
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* Turn on BGR-to-RGB mapping */
void PNGAPI
png_set_bgr(png_structp png_ptr)
{
png_debug(1, "in png_set_bgr");
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_BGR;
}
#endif
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Turn on 16 bit byte swapping */
void PNGAPI
png_set_swap(png_structp png_ptr)
{
png_debug(1, "in png_set_swap");
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth == 16)
png_ptr->transformations |= PNG_SWAP_BYTES;
}
#endif
#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
/* Turn on pixel packing */
void PNGAPI
png_set_packing(png_structp png_ptr)
{
png_debug(1, "in png_set_packing");
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth < 8)
{
png_ptr->transformations |= PNG_PACK;
png_ptr->usr_bit_depth = 8;
}
}
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
/* Turn on packed pixel swapping */
void PNGAPI
png_set_packswap(png_structp png_ptr)
{
png_debug(1, "in png_set_packswap");
if (png_ptr == NULL)
return;
if (png_ptr->bit_depth < 8)
png_ptr->transformations |= PNG_PACKSWAP;
}
#endif
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
void PNGAPI
png_set_shift(png_structp png_ptr, png_color_8p true_bits)
{
png_debug(1, "in png_set_shift");
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_SHIFT;
png_ptr->shift = *true_bits;
}
#endif
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
defined(PNG_WRITE_INTERLACING_SUPPORTED)
int PNGAPI
png_set_interlace_handling(png_structp png_ptr)
{
png_debug(1, "in png_set_interlace handling");
if (png_ptr && png_ptr->interlaced)
{
png_ptr->transformations |= PNG_INTERLACE;
return (7);
}
return (1);
}
#endif
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
/* Add a filler byte on read, or remove a filler or alpha byte on write.
* The filler type has changed in v0.95 to allow future 2-byte fillers
* for 48-bit input data, as well as to avoid problems with some compilers
* that don't like bytes as parameters.
*/
void PNGAPI
png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
png_debug(1, "in png_set_filler");
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_FILLER;
png_ptr->filler = (png_byte)filler;
if (filler_loc == PNG_FILLER_AFTER)
png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
else
png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;
/* This should probably go in the "do_read_filler" routine.
* I attempted to do that in libpng-1.0.1a but that caused problems
* so I restored it in libpng-1.0.2a
*/
if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
{
png_ptr->usr_channels = 4;
}
/* Also I added this in libpng-1.0.2a (what happens when we expand
* a less-than-8-bit grayscale to GA? */
if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8)
{
png_ptr->usr_channels = 2;
}
}
#if !defined(PNG_1_0_X)
/* Added to libpng-1.2.7 */
void PNGAPI
png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
{
png_debug(1, "in png_set_add_alpha");
if (png_ptr == NULL)
return;
png_set_filler(png_ptr, filler, filler_loc);
png_ptr->transformations |= PNG_ADD_ALPHA;
}
#endif
#endif
#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
void PNGAPI
png_set_swap_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_swap_alpha");
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_SWAP_ALPHA;
}
#endif
#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
void PNGAPI
png_set_invert_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_invert_alpha");
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_INVERT_ALPHA;
}
#endif
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
void PNGAPI
png_set_invert_mono(png_structp png_ptr)
{
png_debug(1, "in png_set_invert_mono");
if (png_ptr == NULL)
return;
png_ptr->transformations |= PNG_INVERT_MONO;
}
/* Invert monochrome grayscale data */
void /* PRIVATE */
png_do_invert(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_invert");
/* This test removed from libpng version 1.0.13 and 1.2.0:
* if (row_info->bit_depth == 1 &&
*/
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row == NULL || row_info == NULL)
return;
#endif
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
png_bytep rp = row;
png_uint_32 i;
png_uint_32 istop = row_info->rowbytes;
for (i = 0; i < istop; i++)
{
*rp = (png_byte)(~(*rp));
rp++;
}
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 8)
{
png_bytep rp = row;
png_uint_32 i;
png_uint_32 istop = row_info->rowbytes;
for (i = 0; i < istop; i+=2)
{
*rp = (png_byte)(~(*rp));
rp+=2;
}
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 16)
{
png_bytep rp = row;
png_uint_32 i;
png_uint_32 istop = row_info->rowbytes;
for (i = 0; i < istop; i+=4)
{
*rp = (png_byte)(~(*rp));
*(rp+1) = (png_byte)(~(*(rp+1)));
rp+=4;
}
}
}
#endif
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Swaps byte order on 16 bit depth images */
void /* PRIVATE */
png_do_swap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_swap");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->bit_depth == 16)
{
png_bytep rp = row;
png_uint_32 i;
png_uint_32 istop= row_info->width * row_info->channels;
for (i = 0; i < istop; i++, rp += 2)
{
png_byte t = *rp;
*rp = *(rp + 1);
*(rp + 1) = t;
}
}
}
#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
static PNG_CONST png_byte onebppswaptable[256] = {
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
};
static PNG_CONST png_byte twobppswaptable[256] = {
0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0,
0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0,
0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4,
0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4,
0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8,
0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8,
0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C, 0x9C, 0xDC,
0x2C, 0x6C, 0xAC, 0xEC, 0x3C, 0x7C, 0xBC, 0xFC,
0x01, 0x41, 0x81, 0xC1, 0x11, 0x51, 0x91, 0xD1,
0x21, 0x61, 0xA1, 0xE1, 0x31, 0x71, 0xB1, 0xF1,
0x05, 0x45, 0x85, 0xC5, 0x15, 0x55, 0x95, 0xD5,
0x25, 0x65, 0xA5, 0xE5, 0x35, 0x75, 0xB5, 0xF5,
0x09, 0x49, 0x89, 0xC9, 0x19, 0x59, 0x99, 0xD9,
0x29, 0x69, 0xA9, 0xE9, 0x39, 0x79, 0xB9, 0xF9,
0x0D, 0x4D, 0x8D, 0xCD, 0x1D, 0x5D, 0x9D, 0xDD,
0x2D, 0x6D, 0xAD, 0xED, 0x3D, 0x7D, 0xBD, 0xFD,
0x02, 0x42, 0x82, 0xC2, 0x12, 0x52, 0x92, 0xD2,
0x22, 0x62, 0xA2, 0xE2, 0x32, 0x72, 0xB2, 0xF2,
0x06, 0x46, 0x86, 0xC6, 0x16, 0x56, 0x96, 0xD6,
0x26, 0x66, 0xA6, 0xE6, 0x36, 0x76, 0xB6, 0xF6,
0x0A, 0x4A, 0x8A, 0xCA, 0x1A, 0x5A, 0x9A, 0xDA,
0x2A, 0x6A, 0xAA, 0xEA, 0x3A, 0x7A, 0xBA, 0xFA,
0x0E, 0x4E, 0x8E, 0xCE, 0x1E, 0x5E, 0x9E, 0xDE,
0x2E, 0x6E, 0xAE, 0xEE, 0x3E, 0x7E, 0xBE, 0xFE,
0x03, 0x43, 0x83, 0xC3, 0x13, 0x53, 0x93, 0xD3,
0x23, 0x63, 0xA3, 0xE3, 0x33, 0x73, 0xB3, 0xF3,
0x07, 0x47, 0x87, 0xC7, 0x17, 0x57, 0x97, 0xD7,
0x27, 0x67, 0xA7, 0xE7, 0x37, 0x77, 0xB7, 0xF7,
0x0B, 0x4B, 0x8B, 0xCB, 0x1B, 0x5B, 0x9B, 0xDB,
0x2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB,
0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF,
0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF
};
static PNG_CONST png_byte fourbppswaptable[256] = {
0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,
0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0,
0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71,
0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1,
0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72,
0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2,
0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73,
0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3,
0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74,
0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4,
0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75,
0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5,
0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76,
0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6,
0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77,
0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7,
0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78,
0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8,
0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79,
0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9,
0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A,
0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA,
0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B,
0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB,
0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C,
0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC,
0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D,
0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD,
0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E,
0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE,
0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F,
0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF
};
/* Swaps pixel packing order within bytes */
void /* PRIVATE */
png_do_packswap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_packswap");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->bit_depth < 8)
{
png_bytep rp, end, table;
end = row + row_info->rowbytes;
if (row_info->bit_depth == 1)
table = (png_bytep)onebppswaptable;
else if (row_info->bit_depth == 2)
table = (png_bytep)twobppswaptable;
else if (row_info->bit_depth == 4)
table = (png_bytep)fourbppswaptable;
else
return;
for (rp = row; rp < end; rp++)
*rp = table[*rp];
}
}
#endif /* PNG_READ_PACKSWAP_SUPPORTED or PNG_WRITE_PACKSWAP_SUPPORTED */
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
/* Remove filler or alpha byte(s) */
void /* PRIVATE */
png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
{
png_debug(1, "in png_do_strip_filler");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{
png_bytep sp=row;
png_bytep dp=row;
png_uint_32 row_width=row_info->width;
png_uint_32 i;
if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
(flags & PNG_FLAG_STRIP_ALPHA))) &&
row_info->channels == 4)
{
if (row_info->bit_depth == 8)
{
/* This converts from RGBX or RGBA to RGB */
if (flags & PNG_FLAG_FILLER_AFTER)
{
dp+=3; sp+=4;
for (i = 1; i < row_width; i++)
{
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
sp++;
}
}
/* This converts from XRGB or ARGB to RGB */
else
{
for (i = 0; i < row_width; i++)
{
sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 24;
row_info->rowbytes = row_width * 3;
}
else /* if (row_info->bit_depth == 16) */
{
if (flags & PNG_FLAG_FILLER_AFTER)
{
/* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */
sp += 8; dp += 6;
for (i = 1; i < row_width; i++)
{
/* This could be (although png_memcpy is probably slower):
png_memcpy(dp, sp, 6);
sp += 8;
dp += 6;
*/
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
sp += 2;
}
}
else
{
/* This converts from XXRRGGBB or AARRGGBB to RRGGBB */
for (i = 0; i < row_width; i++)
{
/* This could be (although png_memcpy is probably slower):
png_memcpy(dp, sp, 6);
sp += 8;
dp += 6;
*/
sp+=2;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 48;
row_info->rowbytes = row_width * 6;
}
row_info->channels = 3;
}
else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY ||
(row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
(flags & PNG_FLAG_STRIP_ALPHA))) &&
row_info->channels == 2)
{
if (row_info->bit_depth == 8)
{
/* This converts from GX or GA to G */
if (flags & PNG_FLAG_FILLER_AFTER)
{
for (i = 0; i < row_width; i++)
{
*dp++ = *sp++;
sp++;
}
}
/* This converts from XG or AG to G */
else
{
for (i = 0; i < row_width; i++)
{
sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 8;
row_info->rowbytes = row_width;
}
else /* if (row_info->bit_depth == 16) */
{
if (flags & PNG_FLAG_FILLER_AFTER)
{
/* This converts from GGXX or GGAA to GG */
sp += 4; dp += 2;
for (i = 1; i < row_width; i++)
{
*dp++ = *sp++;
*dp++ = *sp++;
sp += 2;
}
}
else
{
/* This converts from XXGG or AAGG to GG */
for (i = 0; i < row_width; i++)
{
sp += 2;
*dp++ = *sp++;
*dp++ = *sp++;
}
}
row_info->pixel_depth = 16;
row_info->rowbytes = row_width * 2;
}
row_info->channels = 1;
}
if (flags & PNG_FLAG_STRIP_ALPHA)
row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
}
}
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* Swaps red and blue bytes within a pixel */
void /* PRIVATE */
png_do_bgr(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_bgr");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 row_width = row_info->width;
if (row_info->bit_depth == 8)
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
{
png_bytep rp;
png_uint_32 i;
for (i = 0, rp = row; i < row_width; i++, rp += 3)
{
png_byte save = *rp;
*rp = *(rp + 2);
*(rp + 2) = save;
}
}
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_bytep rp;
png_uint_32 i;
for (i = 0, rp = row; i < row_width; i++, rp += 4)
{
png_byte save = *rp;
*rp = *(rp + 2);
*(rp + 2) = save;
}
}
}
else if (row_info->bit_depth == 16)
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
{
png_bytep rp;
png_uint_32 i;
for (i = 0, rp = row; i < row_width; i++, rp += 6)
{
png_byte save = *rp;
*rp = *(rp + 4);
*(rp + 4) = save;
save = *(rp + 1);
*(rp + 1) = *(rp + 5);
*(rp + 5) = save;
}
}
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_bytep rp;
png_uint_32 i;
for (i = 0, rp = row; i < row_width; i++, rp += 8)
{
png_byte save = *rp;
*rp = *(rp + 4);
*(rp + 4) = save;
save = *(rp + 1);
*(rp + 1) = *(rp + 5);
*(rp + 5) = save;
}
}
}
}
}
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_LEGACY_SUPPORTED)
void PNGAPI
png_set_user_transform_info(png_structp png_ptr, png_voidp
user_transform_ptr, int user_transform_depth, int user_transform_channels)
{
png_debug(1, "in png_set_user_transform_info");
if (png_ptr == NULL)
return;
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
#else
if (user_transform_ptr || user_transform_depth || user_transform_channels)
png_warning(png_ptr,
"This version of libpng does not support user transform info");
#endif
}
#endif
/* This function returns a pointer to the user_transform_ptr associated with
* the user transform functions. The application should free any memory
* associated with this pointer before png_write_destroy and png_read_destroy
* are called.
*/
png_voidp PNGAPI
png_get_user_transform_ptr(png_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
return ((png_voidp)png_ptr->user_transform_ptr);
#else
return (NULL);
#endif
}
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */

View file

@ -0,0 +1 @@
/* pnggvrd.c was removed from libpng-1.2.20. */

View file

@ -0,0 +1,256 @@
/* pngwio.c - functions for data output
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* This file provides a location for all output. Users who need
* special handling are expected to write functions that have the same
* arguments as these and perform similar functions, but that possibly
* use different output methods. Note that you shouldn't change these
* functions, but rather write replacement functions and then change
* them at run time with png_set_write_fn(...).
*/
#define PNG_INTERNAL
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
/* Write the data to whatever output you are using. The default routine
* writes to a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
* buffering if you are using unbuffered writes. This should never be asked
* to write more than 64K on a 16 bit machine.
*/
void /* PRIVATE */
png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
if (png_ptr->write_data_fn != NULL )
(*(png_ptr->write_data_fn))(png_ptr, data, length);
else
png_error(png_ptr, "Call to NULL write function");
}
#if !defined(PNG_NO_STDIO)
/* This is the function that does the actual writing of data. If you are
* not writing to a standard C stream, you should create a replacement
* write_data function and use it at run time with png_set_write_fn(), rather
* than changing the library.
*/
#ifndef USE_FAR_KEYWORD
void PNGAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_uint_32 check;
if (png_ptr == NULL)
return;
#if defined(_WIN32_WCE)
if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
#endif
if (check != length)
png_error(png_ptr, "Write Error");
}
#else
/* This is the model-independent version. Since the standard I/O library
* can't handle far buffers in the medium and small models, we have to copy
* the data.
*/
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
void PNGAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_uint_32 check;
png_byte *near_data; /* Needs to be "png_byte *" instead of "png_bytep" */
png_FILE_p io_ptr;
if (png_ptr == NULL)
return;
/* Check if data really is near. If so, use usual code. */
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
if ((png_bytep)near_data == data)
{
#if defined(_WIN32_WCE)
if ( !WriteFile(io_ptr, near_data, length, &check, NULL) )
check = 0;
#else
check = fwrite(near_data, 1, length, io_ptr);
#endif
}
else
{
png_byte buf[NEAR_BUF_SIZE];
png_size_t written, remaining, err;
check = 0;
remaining = length;
do
{
written = MIN(NEAR_BUF_SIZE, remaining);
png_memcpy(buf, data, written); /* Copy far buffer to near buffer */
#if defined(_WIN32_WCE)
if ( !WriteFile(io_ptr, buf, written, &err, NULL) )
err = 0;
#else
err = fwrite(buf, 1, written, io_ptr);
#endif
if (err != written)
break;
else
check += err;
data += written;
remaining -= written;
}
while (remaining != 0);
}
if (check != length)
png_error(png_ptr, "Write Error");
}
#endif
#endif
/* This function is called to output any data pending writing (normally
* to disk). After png_flush is called, there should be no data pending
* writing in any buffers.
*/
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
void /* PRIVATE */
png_flush(png_structp png_ptr)
{
if (png_ptr->output_flush_fn != NULL)
(*(png_ptr->output_flush_fn))(png_ptr);
}
#if !defined(PNG_NO_STDIO)
void PNGAPI
png_default_flush(png_structp png_ptr)
{
#if !defined(_WIN32_WCE)
png_FILE_p io_ptr;
#endif
if (png_ptr == NULL)
return;
#if !defined(_WIN32_WCE)
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
fflush(io_ptr);
#endif
}
#endif
#endif
/* This function allows the application to supply new output functions for
* libpng if standard C streams aren't being used.
*
* This function takes as its arguments:
* png_ptr - pointer to a png output data structure
* io_ptr - pointer to user supplied structure containing info about
* the output functions. May be NULL.
* write_data_fn - pointer to a new output function that takes as its
* arguments a pointer to a png_struct, a pointer to
* data to be written, and a 32-bit unsigned int that is
* the number of bytes to be written. The new write
* function should call png_error(png_ptr, "Error msg")
* to exit and output any fatal error messages. May be
* NULL, in which case libpng's default function will
* be used.
* flush_data_fn - pointer to a new flush function that takes as its
* arguments a pointer to a png_struct. After a call to
* the flush function, there should be no data in any buffers
* or pending transmission. If the output method doesn't do
* any buffering of ouput, a function prototype must still be
* supplied although it doesn't have to do anything. If
* PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
* time, output_flush_fn will be ignored, although it must be
* supplied for compatibility. May be NULL, in which case
* libpng's default function will be used, if
* PNG_WRITE_FLUSH_SUPPORTED is defined. This is not
* a good idea if io_ptr does not point to a standard
* *FILE structure.
*/
void PNGAPI
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
{
if (png_ptr == NULL)
return;
png_ptr->io_ptr = io_ptr;
#if !defined(PNG_NO_STDIO)
if (write_data_fn != NULL)
png_ptr->write_data_fn = write_data_fn;
else
png_ptr->write_data_fn = png_default_write_data;
#else
png_ptr->write_data_fn = write_data_fn;
#endif
#if defined(PNG_WRITE_FLUSH_SUPPORTED)
#if !defined(PNG_NO_STDIO)
if (output_flush_fn != NULL)
png_ptr->output_flush_fn = output_flush_fn;
else
png_ptr->output_flush_fn = png_default_flush;
#else
png_ptr->output_flush_fn = output_flush_fn;
#endif
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
/* It is an error to read while writing a png file */
if (png_ptr->read_data_fn != NULL)
{
png_ptr->read_data_fn = NULL;
png_warning(png_ptr,
"Attempted to set both read_data_fn and write_data_fn in");
png_warning(png_ptr,
"the same structure. Resetting read_data_fn to NULL.");
}
}
#if defined(USE_FAR_KEYWORD)
#if defined(_MSC_VER)
void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
{
void *near_ptr;
void FAR *far_ptr;
FP_OFF(near_ptr) = FP_OFF(ptr);
far_ptr = (void FAR *)near_ptr;
if (check != 0)
if (FP_SEG(ptr) != FP_SEG(far_ptr))
png_error(png_ptr, "segment lost in conversion");
return(near_ptr);
}
# else
void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
{
void *near_ptr;
void FAR *far_ptr;
near_ptr = (void FAR *)ptr;
far_ptr = (void FAR *)near_ptr;
if (check != 0)
if (far_ptr != ptr)
png_error(png_ptr, "segment lost in conversion");
return(near_ptr);
}
# endif
# endif
#endif /* PNG_WRITE_SUPPORTED */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,572 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
* Last changed in libpng 1.2.37 [June 4, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
#define PNG_INTERNAL
#include "png.h"
#ifdef PNG_WRITE_SUPPORTED
/* Transform the data according to the user's wishes. The order of
* transformations is significant.
*/
void /* PRIVATE */
png_do_write_transformations(png_structp png_ptr)
{
png_debug(1, "in png_do_write_transformations");
if (png_ptr == NULL)
return;
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL)
(*(png_ptr->write_user_transform_fn)) /* User write transform function */
(png_ptr, /* png_ptr */
&(png_ptr->row_info), /* row_info: */
/* png_uint_32 width; width of row */
/* png_uint_32 rowbytes; number of bytes in row */
/* png_byte color_type; color type of pixels */
/* png_byte bit_depth; bit depth of samples */
/* png_byte channels; number of channels (1-4) */
/* png_byte pixel_depth; bits per pixel (depth*channels) */
png_ptr->row_buf + 1); /* start of pixel data for row */
#endif
#if defined(PNG_WRITE_FILLER_SUPPORTED)
if (png_ptr->transformations & PNG_FILLER)
png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
png_ptr->flags);
#endif
#if defined(PNG_WRITE_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)
png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
(png_uint_32)png_ptr->bit_depth);
#endif
#if defined(PNG_WRITE_SWAP_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED)
if (png_ptr->transformations & PNG_SHIFT)
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
&(png_ptr->shift));
#endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_BGR_SUPPORTED)
if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
#if defined(PNG_WRITE_INVERT_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_MONO)
png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
}
#if defined(PNG_WRITE_PACK_SUPPORTED)
/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The
* row_info bit depth should be 8 (one pixel per byte). The channels
* should be 1 (this only happens on grayscale and paletted images).
*/
void /* PRIVATE */
png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
{
png_debug(1, "in png_do_pack");
if (row_info->bit_depth == 8 &&
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
row_info->channels == 1)
{
switch ((int)bit_depth)
{
case 1:
{
png_bytep sp, dp;
int mask, v;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
sp = row;
dp = row;
mask = 0x80;
v = 0;
for (i = 0; i < row_width; i++)
{
if (*sp != 0)
v |= mask;
sp++;
if (mask > 1)
mask >>= 1;
else
{
mask = 0x80;
*dp = (png_byte)v;
dp++;
v = 0;
}
}
if (mask != 0x80)
*dp = (png_byte)v;
break;
}
case 2:
{
png_bytep sp, dp;
int shift, v;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
sp = row;
dp = row;
shift = 6;
v = 0;
for (i = 0; i < row_width; i++)
{
png_byte value;
value = (png_byte)(*sp & 0x03);
v |= (value << shift);
if (shift == 0)
{
shift = 6;
*dp = (png_byte)v;
dp++;
v = 0;
}
else
shift -= 2;
sp++;
}
if (shift != 6)
*dp = (png_byte)v;
break;
}
case 4:
{
png_bytep sp, dp;
int shift, v;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
sp = row;
dp = row;
shift = 4;
v = 0;
for (i = 0; i < row_width; i++)
{
png_byte value;
value = (png_byte)(*sp & 0x0f);
v |= (value << shift);
if (shift == 0)
{
shift = 4;
*dp = (png_byte)v;
dp++;
v = 0;
}
else
shift -= 4;
sp++;
}
if (shift != 4)
*dp = (png_byte)v;
break;
}
}
row_info->bit_depth = (png_byte)bit_depth;
row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
row_info->width);
}
}
#endif
#if defined(PNG_WRITE_SHIFT_SUPPORTED)
/* Shift pixel values to take advantage of whole range. Pass the
* true number of bits in bit_depth. The row should be packed
* according to row_info->bit_depth. Thus, if you had a row of
* bit depth 4, but the pixels only had values from 0 to 7, you
* would pass 3 as bit_depth, and this routine would translate the
* data to 0 to 15.
*/
void /* PRIVATE */
png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
{
png_debug(1, "in png_do_shift");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL &&
#else
if (
#endif
row_info->color_type != PNG_COLOR_TYPE_PALETTE)
{
int shift_start[4], shift_dec[4];
int channels = 0;
if (row_info->color_type & PNG_COLOR_MASK_COLOR)
{
shift_start[channels] = row_info->bit_depth - bit_depth->red;
shift_dec[channels] = bit_depth->red;
channels++;
shift_start[channels] = row_info->bit_depth - bit_depth->green;
shift_dec[channels] = bit_depth->green;
channels++;
shift_start[channels] = row_info->bit_depth - bit_depth->blue;
shift_dec[channels] = bit_depth->blue;
channels++;
}
else
{
shift_start[channels] = row_info->bit_depth - bit_depth->gray;
shift_dec[channels] = bit_depth->gray;
channels++;
}
if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
{
shift_start[channels] = row_info->bit_depth - bit_depth->alpha;
shift_dec[channels] = bit_depth->alpha;
channels++;
}
/* With low row depths, could only be grayscale, so one channel */
if (row_info->bit_depth < 8)
{
png_bytep bp = row;
png_uint_32 i;
png_byte mask;
png_uint_32 row_bytes = row_info->rowbytes;
if (bit_depth->gray == 1 && row_info->bit_depth == 2)
mask = 0x55;
else if (row_info->bit_depth == 4 && bit_depth->gray == 3)
mask = 0x11;
else
mask = 0xff;
for (i = 0; i < row_bytes; i++, bp++)
{
png_uint_16 v;
int j;
v = *bp;
*bp = 0;
for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0])
{
if (j > 0)
*bp |= (png_byte)((v << j) & 0xff);
else
*bp |= (png_byte)((v >> (-j)) & mask);
}
}
}
else if (row_info->bit_depth == 8)
{
png_bytep bp = row;
png_uint_32 i;
png_uint_32 istop = channels * row_info->width;
for (i = 0; i < istop; i++, bp++)
{
png_uint_16 v;
int j;
int c = (int)(i%channels);
v = *bp;
*bp = 0;
for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
{
if (j > 0)
*bp |= (png_byte)((v << j) & 0xff);
else
*bp |= (png_byte)((v >> (-j)) & 0xff);
}
}
}
else
{
png_bytep bp;
png_uint_32 i;
png_uint_32 istop = channels * row_info->width;
for (bp = row, i = 0; i < istop; i++)
{
int c = (int)(i%channels);
png_uint_16 value, v;
int j;
v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1));
value = 0;
for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
{
if (j > 0)
value |= (png_uint_16)((v << j) & (png_uint_16)0xffff);
else
value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff);
}
*bp++ = (png_byte)(value >> 8);
*bp++ = (png_byte)(value & 0xff);
}
}
}
}
#endif
#if defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
void /* PRIVATE */
png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_swap_alpha");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
/* This converts from ARGB to RGBA */
if (row_info->bit_depth == 8)
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
png_byte save = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = save;
}
}
/* This converts from AARRGGBB to RRGGBBAA */
else
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
png_byte save[2];
save[0] = *(sp++);
save[1] = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = save[0];
*(dp++) = save[1];
}
}
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
/* This converts from AG to GA */
if (row_info->bit_depth == 8)
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
png_byte save = *(sp++);
*(dp++) = *(sp++);
*(dp++) = save;
}
}
/* This converts from AAGG to GGAA */
else
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
png_byte save[2];
save[0] = *(sp++);
save[1] = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = save[0];
*(dp++) = save[1];
}
}
}
}
}
#endif
#if defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
void /* PRIVATE */
png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_invert_alpha");
#if defined(PNG_USELESS_TESTS_SUPPORTED)
if (row != NULL && row_info != NULL)
#endif
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
/* This inverts the alpha channel in RGBA */
if (row_info->bit_depth == 8)
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* Does nothing
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*/
sp+=3; dp = sp;
*(dp++) = (png_byte)(255 - *(sp++));
}
}
/* This inverts the alpha channel in RRGGBBAA */
else
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* Does nothing
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*/
sp+=6; dp = sp;
*(dp++) = (png_byte)(255 - *(sp++));
*(dp++) = (png_byte)(255 - *(sp++));
}
}
}
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
/* This inverts the alpha channel in GA */
if (row_info->bit_depth == 8)
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
*(dp++) = *(sp++);
*(dp++) = (png_byte)(255 - *(sp++));
}
}
/* This inverts the alpha channel in GGAA */
else
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* Does nothing
*(dp++) = *(sp++);
*(dp++) = *(sp++);
*/
sp+=2; dp = sp;
*(dp++) = (png_byte)(255 - *(sp++));
*(dp++) = (png_byte)(255 - *(sp++));
}
}
}
}
}
#endif
#if defined(PNG_MNG_FEATURES_SUPPORTED)
/* Undoes intrapixel differencing */
void /* PRIVATE */
png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_intrapixel");
if (
#if defined(PNG_USELESS_TESTS_SUPPORTED)
row != NULL && row_info != NULL &&
#endif
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
int bytes_per_pixel;
png_uint_32 row_width = row_info->width;
if (row_info->bit_depth == 8)
{
png_bytep rp;
png_uint_32 i;
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
bytes_per_pixel = 3;
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
bytes_per_pixel = 4;
else
return;
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{
*(rp) = (png_byte)((*rp - *(rp+1))&0xff);
*(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff);
}
}
else if (row_info->bit_depth == 16)
{
png_bytep rp;
png_uint_32 i;
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
bytes_per_pixel = 6;
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
bytes_per_pixel = 8;
else
return;
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{
png_uint_32 s0 = (*(rp ) << 8) | *(rp+1);
png_uint_32 s1 = (*(rp+2) << 8) | *(rp+3);
png_uint_32 s2 = (*(rp+4) << 8) | *(rp+5);
png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL);
png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
*(rp ) = (png_byte)((red >> 8) & 0xff);
*(rp+1) = (png_byte)(red & 0xff);
*(rp+4) = (png_byte)((blue >> 8) & 0xff);
*(rp+5) = (png_byte)(blue & 0xff);
}
}
}
}
#endif /* PNG_MNG_FEATURES_SUPPORTED */
#endif /* PNG_WRITE_SUPPORTED */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,16 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View file

@ -0,0 +1,172 @@
#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">])
#IncludeRegexScan: ^.*$
#IncludeRegexComplain: ^$
#IncludeRegexTransform:
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/adler32.c
zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/compress.c
zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.c
stdio.h
-
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
limits.h
-
crc32.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.c
deflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.h
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/gzio.c
stdio.h
-
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
stdarg.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/infback.c
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
inffixed.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffixed.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.c
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffixed.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.c
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
inffixed.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffixed.h
stdio.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.c
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/minigzip.c
stdio.h
-
zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
string.h
-
stdlib.h
-
sys/types.h
-
sys/mman.h
-
sys/stat.h
-
fcntl.h
-
io.h
-
unix.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.c
deflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.h
ctype.h
-
trees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.h
stdio.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/uncompr.c
zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
windows.h
-
sys/types.h
-
unistd.h
-
unixio.h
-
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.c
zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
stddef.h
-
string.h
-
stdlib.h
-
errno.h
-
alloc.h
-
malloc.h
-
malloc.h
-
unix.h
-
stdio.h
-

View file

@ -0,0 +1,37 @@
# The set of languages for which implicit dependencies are needed:
SET(CMAKE_DEPENDS_LANGUAGES
"C"
)
# The set of files for implicit dependencies of each language:
SET(CMAKE_DEPENDS_CHECK_C
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/adler32.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/compress.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/gzio.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/infback.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/minigzip.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/uncompr.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o"
"/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.c" "/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o"
)
SET(CMAKE_C_COMPILER_ID "GNU")
# Preprocessor definitions for this target.
SET(CMAKE_TARGET_DEFINITIONS
"_CRT_SECURE_NO_WARNINGS"
)
# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
)
# The include file search paths:
SET(CMAKE_C_TARGET_INCLUDE_PATH
)
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})

View file

@ -0,0 +1,415 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# Include any dependencies generated for this target.
include io_png/libs/zlib/CMakeFiles/zlib.dir/depend.make
# Include the progress variables for this target.
include io_png/libs/zlib/CMakeFiles/zlib.dir/progress.make
# Include the compile flags for this target's objects.
include io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o: io_png/libs/zlib/adler32.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_1)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/adler32.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/adler32.c
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/adler32.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/adler32.c > CMakeFiles/zlib.dir/adler32.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/adler32.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/adler32.c -o CMakeFiles/zlib.dir/adler32.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o: io_png/libs/zlib/compress.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_2)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/compress.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/compress.c
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/compress.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/compress.c > CMakeFiles/zlib.dir/compress.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/compress.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/compress.c -o CMakeFiles/zlib.dir/compress.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/crc32.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_3)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/crc32.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.c
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/crc32.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.c > CMakeFiles/zlib.dir/crc32.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/crc32.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.c -o CMakeFiles/zlib.dir/crc32.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/deflate.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_4)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/deflate.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.c
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/deflate.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.c > CMakeFiles/zlib.dir/deflate.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/deflate.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.c -o CMakeFiles/zlib.dir/deflate.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o: io_png/libs/zlib/gzio.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_5)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/gzio.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/gzio.c
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/gzio.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/gzio.c > CMakeFiles/zlib.dir/gzio.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/gzio.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/gzio.c -o CMakeFiles/zlib.dir/gzio.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/infback.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_6)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/infback.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/infback.c
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/infback.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/infback.c > CMakeFiles/zlib.dir/infback.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/infback.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/infback.c -o CMakeFiles/zlib.dir/infback.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/inffast.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_7)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/inffast.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.c
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/inffast.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.c > CMakeFiles/zlib.dir/inffast.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/inffast.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.c -o CMakeFiles/zlib.dir/inffast.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/inflate.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_8)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/inflate.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.c
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/inflate.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.c > CMakeFiles/zlib.dir/inflate.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/inflate.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.c -o CMakeFiles/zlib.dir/inflate.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/inftrees.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_9)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/inftrees.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.c
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/inftrees.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.c > CMakeFiles/zlib.dir/inftrees.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/inftrees.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.c -o CMakeFiles/zlib.dir/inftrees.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o: io_png/libs/zlib/minigzip.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_10)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/minigzip.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/minigzip.c
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/minigzip.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/minigzip.c > CMakeFiles/zlib.dir/minigzip.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/minigzip.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/minigzip.c -o CMakeFiles/zlib.dir/minigzip.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/trees.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_11)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/trees.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.c
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/trees.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.c > CMakeFiles/zlib.dir/trees.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/trees.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.c -o CMakeFiles/zlib.dir/trees.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o: io_png/libs/zlib/uncompr.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_12)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/uncompr.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/uncompr.c
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/uncompr.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/uncompr.c > CMakeFiles/zlib.dir/uncompr.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/uncompr.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/uncompr.c -o CMakeFiles/zlib.dir/uncompr.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o: io_png/libs/zlib/CMakeFiles/zlib.dir/flags.make
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o: io_png/libs/zlib/zutil.c
$(CMAKE_COMMAND) -E cmake_progress_report /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles $(CMAKE_PROGRESS_13)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/zlib.dir/zutil.c.o -c /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.c
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/zlib.dir/zutil.c.i"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -E /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.c > CMakeFiles/zlib.dir/zutil.c.i
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/zlib.dir/zutil.c.s"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && /usr/bin/cc $(C_DEFINES) $(C_FLAGS) -S /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.c -o CMakeFiles/zlib.dir/zutil.c.s
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.requires:
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.provides: io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.requires
$(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.provides.build
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.provides
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.provides.build: io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o
# Object files for target zlib
zlib_OBJECTS = \
"CMakeFiles/zlib.dir/adler32.c.o" \
"CMakeFiles/zlib.dir/compress.c.o" \
"CMakeFiles/zlib.dir/crc32.c.o" \
"CMakeFiles/zlib.dir/deflate.c.o" \
"CMakeFiles/zlib.dir/gzio.c.o" \
"CMakeFiles/zlib.dir/infback.c.o" \
"CMakeFiles/zlib.dir/inffast.c.o" \
"CMakeFiles/zlib.dir/inflate.c.o" \
"CMakeFiles/zlib.dir/inftrees.c.o" \
"CMakeFiles/zlib.dir/minigzip.c.o" \
"CMakeFiles/zlib.dir/trees.c.o" \
"CMakeFiles/zlib.dir/uncompr.c.o" \
"CMakeFiles/zlib.dir/zutil.c.o"
# External object files for target zlib
zlib_EXTERNAL_OBJECTS =
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/build.make
io_png/libs/zlib/libzlib.a: io_png/libs/zlib/CMakeFiles/zlib.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking C static library libzlib.a"
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && $(CMAKE_COMMAND) -P CMakeFiles/zlib.dir/cmake_clean_target.cmake
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/zlib.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
io_png/libs/zlib/CMakeFiles/zlib.dir/build: io_png/libs/zlib/libzlib.a
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/build
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o.requires
io_png/libs/zlib/CMakeFiles/zlib.dir/requires: io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o.requires
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/requires
io_png/libs/zlib/CMakeFiles/zlib.dir/clean:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib && $(CMAKE_COMMAND) -P CMakeFiles/zlib.dir/cmake_clean.cmake
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/clean
io_png/libs/zlib/CMakeFiles/zlib.dir/depend:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/zlib.dir/DependInfo.cmake --color=$(COLOR)
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/depend

View file

@ -0,0 +1,22 @@
FILE(REMOVE_RECURSE
"CMakeFiles/zlib.dir/adler32.c.o"
"CMakeFiles/zlib.dir/compress.c.o"
"CMakeFiles/zlib.dir/crc32.c.o"
"CMakeFiles/zlib.dir/deflate.c.o"
"CMakeFiles/zlib.dir/gzio.c.o"
"CMakeFiles/zlib.dir/infback.c.o"
"CMakeFiles/zlib.dir/inffast.c.o"
"CMakeFiles/zlib.dir/inflate.c.o"
"CMakeFiles/zlib.dir/inftrees.c.o"
"CMakeFiles/zlib.dir/minigzip.c.o"
"CMakeFiles/zlib.dir/trees.c.o"
"CMakeFiles/zlib.dir/uncompr.c.o"
"CMakeFiles/zlib.dir/zutil.c.o"
"libzlib.pdb"
"libzlib.a"
)
# Per-language clean rules from dependency scanning.
FOREACH(lang C)
INCLUDE(CMakeFiles/zlib.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)

View file

@ -0,0 +1,3 @@
FILE(REMOVE_RECURSE
"libzlib.a"
)

View file

@ -0,0 +1,80 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/adler32.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/compress.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/crc32.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/gzio.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/infback.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffixed.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffast.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inffixed.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/inftrees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/minigzip.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/deflate.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/trees.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/uncompr.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zconf.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zlib.h
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.c
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/zutil.h

View file

@ -0,0 +1,80 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o: io_png/libs/zlib/adler32.c
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o: io_png/libs/zlib/compress.c
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/crc32.c
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/crc32.h
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/deflate.c
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/deflate.h
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o: io_png/libs/zlib/gzio.c
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/infback.c
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/inffast.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/inffixed.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/inflate.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/inftrees.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/inffast.c
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/inffast.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/inflate.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/inftrees.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/inffast.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/inffixed.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/inflate.c
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/inflate.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/inftrees.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/inftrees.c
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/inftrees.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o: io_png/libs/zlib/minigzip.c
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/deflate.h
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/trees.c
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/trees.h
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o: io_png/libs/zlib/zutil.h
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o: io_png/libs/zlib/uncompr.c
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o: io_png/libs/zlib/zconf.h
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o: io_png/libs/zlib/zlib.h
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o: io_png/libs/zlib/zutil.c
io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o: io_png/libs/zlib/zutil.h

View file

@ -0,0 +1,8 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# compile C with /usr/bin/cc
C_FLAGS =
C_DEFINES = -D_CRT_SECURE_NO_WARNINGS

View file

@ -0,0 +1,2 @@
/usr/bin/ar cr libzlib.a CMakeFiles/zlib.dir/adler32.c.o CMakeFiles/zlib.dir/compress.c.o CMakeFiles/zlib.dir/crc32.c.o CMakeFiles/zlib.dir/deflate.c.o CMakeFiles/zlib.dir/gzio.c.o CMakeFiles/zlib.dir/infback.c.o CMakeFiles/zlib.dir/inffast.c.o CMakeFiles/zlib.dir/inflate.c.o CMakeFiles/zlib.dir/inftrees.c.o CMakeFiles/zlib.dir/minigzip.c.o CMakeFiles/zlib.dir/trees.c.o CMakeFiles/zlib.dir/uncompr.c.o CMakeFiles/zlib.dir/zutil.c.o
/usr/bin/ranlib libzlib.a

View file

@ -0,0 +1,14 @@
CMAKE_PROGRESS_1 = 52
CMAKE_PROGRESS_2 = 53
CMAKE_PROGRESS_3 = 54
CMAKE_PROGRESS_4 = 55
CMAKE_PROGRESS_5 = 56
CMAKE_PROGRESS_6 = 57
CMAKE_PROGRESS_7 = 58
CMAKE_PROGRESS_8 = 59
CMAKE_PROGRESS_9 = 60
CMAKE_PROGRESS_10 = 61
CMAKE_PROGRESS_11 = 62
CMAKE_PROGRESS_12 = 63
CMAKE_PROGRESS_13 = 64

View file

@ -0,0 +1,10 @@
PROJECT(zlib)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_LIBRARY(zlib STATIC
adler32.c compress.c crc32.c deflate.c gzio.c infback.c
inffast.c inflate.c inftrees.c minigzip.c trees.c uncompr.c
zutil.c crc32.h deflate.h inffast.h inffixed.h inflate.h
inftrees.h trees.h zconf.h zconf.in.h zlib.h zutil.h
)

View file

@ -0,0 +1,488 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
/usr/bin/cmake -i .
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/io_png/libs/zlib/CMakeFiles/progress.marks
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/zlib/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/zlib/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/zlib/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/zlib/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
io_png/libs/zlib/CMakeFiles/zlib.dir/rule:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f CMakeFiles/Makefile2 io_png/libs/zlib/CMakeFiles/zlib.dir/rule
.PHONY : io_png/libs/zlib/CMakeFiles/zlib.dir/rule
# Convenience name for target.
zlib: io_png/libs/zlib/CMakeFiles/zlib.dir/rule
.PHONY : zlib
# fast build rule for target.
zlib/fast:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/build
.PHONY : zlib/fast
adler32.o: adler32.c.o
.PHONY : adler32.o
# target to build an object file
adler32.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.o
.PHONY : adler32.c.o
adler32.i: adler32.c.i
.PHONY : adler32.i
# target to preprocess a source file
adler32.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.i
.PHONY : adler32.c.i
adler32.s: adler32.c.s
.PHONY : adler32.s
# target to generate assembly for a file
adler32.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/adler32.c.s
.PHONY : adler32.c.s
compress.o: compress.c.o
.PHONY : compress.o
# target to build an object file
compress.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.o
.PHONY : compress.c.o
compress.i: compress.c.i
.PHONY : compress.i
# target to preprocess a source file
compress.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.i
.PHONY : compress.c.i
compress.s: compress.c.s
.PHONY : compress.s
# target to generate assembly for a file
compress.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/compress.c.s
.PHONY : compress.c.s
crc32.o: crc32.c.o
.PHONY : crc32.o
# target to build an object file
crc32.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.o
.PHONY : crc32.c.o
crc32.i: crc32.c.i
.PHONY : crc32.i
# target to preprocess a source file
crc32.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.i
.PHONY : crc32.c.i
crc32.s: crc32.c.s
.PHONY : crc32.s
# target to generate assembly for a file
crc32.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/crc32.c.s
.PHONY : crc32.c.s
deflate.o: deflate.c.o
.PHONY : deflate.o
# target to build an object file
deflate.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.o
.PHONY : deflate.c.o
deflate.i: deflate.c.i
.PHONY : deflate.i
# target to preprocess a source file
deflate.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.i
.PHONY : deflate.c.i
deflate.s: deflate.c.s
.PHONY : deflate.s
# target to generate assembly for a file
deflate.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/deflate.c.s
.PHONY : deflate.c.s
gzio.o: gzio.c.o
.PHONY : gzio.o
# target to build an object file
gzio.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.o
.PHONY : gzio.c.o
gzio.i: gzio.c.i
.PHONY : gzio.i
# target to preprocess a source file
gzio.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.i
.PHONY : gzio.c.i
gzio.s: gzio.c.s
.PHONY : gzio.s
# target to generate assembly for a file
gzio.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/gzio.c.s
.PHONY : gzio.c.s
infback.o: infback.c.o
.PHONY : infback.o
# target to build an object file
infback.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.o
.PHONY : infback.c.o
infback.i: infback.c.i
.PHONY : infback.i
# target to preprocess a source file
infback.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.i
.PHONY : infback.c.i
infback.s: infback.c.s
.PHONY : infback.s
# target to generate assembly for a file
infback.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/infback.c.s
.PHONY : infback.c.s
inffast.o: inffast.c.o
.PHONY : inffast.o
# target to build an object file
inffast.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.o
.PHONY : inffast.c.o
inffast.i: inffast.c.i
.PHONY : inffast.i
# target to preprocess a source file
inffast.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.i
.PHONY : inffast.c.i
inffast.s: inffast.c.s
.PHONY : inffast.s
# target to generate assembly for a file
inffast.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inffast.c.s
.PHONY : inffast.c.s
inflate.o: inflate.c.o
.PHONY : inflate.o
# target to build an object file
inflate.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.o
.PHONY : inflate.c.o
inflate.i: inflate.c.i
.PHONY : inflate.i
# target to preprocess a source file
inflate.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.i
.PHONY : inflate.c.i
inflate.s: inflate.c.s
.PHONY : inflate.s
# target to generate assembly for a file
inflate.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inflate.c.s
.PHONY : inflate.c.s
inftrees.o: inftrees.c.o
.PHONY : inftrees.o
# target to build an object file
inftrees.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.o
.PHONY : inftrees.c.o
inftrees.i: inftrees.c.i
.PHONY : inftrees.i
# target to preprocess a source file
inftrees.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.i
.PHONY : inftrees.c.i
inftrees.s: inftrees.c.s
.PHONY : inftrees.s
# target to generate assembly for a file
inftrees.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/inftrees.c.s
.PHONY : inftrees.c.s
minigzip.o: minigzip.c.o
.PHONY : minigzip.o
# target to build an object file
minigzip.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.o
.PHONY : minigzip.c.o
minigzip.i: minigzip.c.i
.PHONY : minigzip.i
# target to preprocess a source file
minigzip.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.i
.PHONY : minigzip.c.i
minigzip.s: minigzip.c.s
.PHONY : minigzip.s
# target to generate assembly for a file
minigzip.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/minigzip.c.s
.PHONY : minigzip.c.s
trees.o: trees.c.o
.PHONY : trees.o
# target to build an object file
trees.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.o
.PHONY : trees.c.o
trees.i: trees.c.i
.PHONY : trees.i
# target to preprocess a source file
trees.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.i
.PHONY : trees.c.i
trees.s: trees.c.s
.PHONY : trees.s
# target to generate assembly for a file
trees.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/trees.c.s
.PHONY : trees.c.s
uncompr.o: uncompr.c.o
.PHONY : uncompr.o
# target to build an object file
uncompr.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.o
.PHONY : uncompr.c.o
uncompr.i: uncompr.c.i
.PHONY : uncompr.i
# target to preprocess a source file
uncompr.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.i
.PHONY : uncompr.c.i
uncompr.s: uncompr.c.s
.PHONY : uncompr.s
# target to generate assembly for a file
uncompr.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/uncompr.c.s
.PHONY : uncompr.c.s
zutil.o: zutil.c.o
.PHONY : zutil.o
# target to build an object file
zutil.c.o:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.o
.PHONY : zutil.c.o
zutil.i: zutil.c.i
.PHONY : zutil.i
# target to preprocess a source file
zutil.c.i:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.i
.PHONY : zutil.c.i
zutil.s: zutil.c.s
.PHONY : zutil.s
# target to generate assembly for a file
zutil.c.s:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(MAKE) -f io_png/libs/zlib/CMakeFiles/zlib.dir/build.make io_png/libs/zlib/CMakeFiles/zlib.dir/zutil.c.s
.PHONY : zutil.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... zlib"
@echo "... adler32.o"
@echo "... adler32.i"
@echo "... adler32.s"
@echo "... compress.o"
@echo "... compress.i"
@echo "... compress.s"
@echo "... crc32.o"
@echo "... crc32.i"
@echo "... crc32.s"
@echo "... deflate.o"
@echo "... deflate.i"
@echo "... deflate.s"
@echo "... gzio.o"
@echo "... gzio.i"
@echo "... gzio.s"
@echo "... infback.o"
@echo "... infback.i"
@echo "... infback.s"
@echo "... inffast.o"
@echo "... inffast.i"
@echo "... inffast.s"
@echo "... inflate.o"
@echo "... inflate.i"
@echo "... inflate.s"
@echo "... inftrees.o"
@echo "... inftrees.i"
@echo "... inftrees.s"
@echo "... minigzip.o"
@echo "... minigzip.i"
@echo "... minigzip.s"
@echo "... trees.o"
@echo "... trees.i"
@echo "... trees.s"
@echo "... uncompr.o"
@echo "... uncompr.i"
@echo "... uncompr.s"
@echo "... zutil.o"
@echo "... zutil.i"
@echo "... zutil.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

Some files were not shown because too many files have changed in this diff Show more