F.14. CODELISTINGSFORCHAPTER14
659
x1, x2, x3, x4,
y1, y2, y3, y4;
int
x_control, y_control;
long
length, width;
short m, , n, x_displace, y_displace;
/*************************************
*
*
This program will use a different
*
command line for each type of
*
call.
*
*
Print a usage statement that
*
gives an example of each type
*
of call.
*
*************************************/
if(argc < 7){
printf("\n\nNot enough parameters:");
printf("\n");
printf("\n
Two Operations: ");
printf("\n
warp
object-warp");
printf("\n\n
Examples:");
printf("\n");
printf("\n
warp in out warp x-control ");
printf("y-control bilinear (1 or 0)");
printf("\n");
printf("\n
warp in out object-warp x1 y1");
printf(" x2 y2 x3 y3 x4 y4 ");
printf("bilinear (1 or 0)");
printf("\n");
exit(0);
}
/*************************************
*
*
Interpret the command line
*
depending on the type of call.
*
*************************************/
if(strncmp(argv[3], "warp", 3) == 0){
strcpy(name1, argv[1]);
strcpy(name2, argv[2]);
Pdf to powerpoint slide - C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF in C#.net, ASP.NET MVC, WinForms, WPF
Online C# Tutorial for Creating PDF from Microsoft PowerPoint Presentation
add pdf to powerpoint slide; change pdf to powerpoint online
Pdf to powerpoint slide - VB.NET Create PDF from PowerPoint Library to convert pptx, ppt to PDF in vb.net, ASP.NET MVC, WinForms, WPF
VB.NET Tutorial for Export PDF file from Microsoft Office PowerPoint
how to convert pdf into powerpoint on; how to convert pdf slides to powerpoint presentation
660
APPENDIXF. SOURCECODELISTINGS
strcpy(type, argv[3]);
x_control = atoi(argv[4]);
y_control = atoi(argv[5]);
bilinear = = atoi(argv[6]);
}
if(strncmp(argv[3], "object-warp", 3) == 0){
strcpy(name1, argv[1]);
strcpy(name2, argv[2]);
strcpy(type, argv[3]);
x1
= atoi(argv[4]);
y1
= atoi(argv[5]);
x2
= atoi(argv[6]);
y2
= atoi(argv[7]);
x3
= atoi(argv[8]);
y3
= atoi(argv[9]);
x4
= atoi(argv[10]);
y4
= atoi(argv[11]);
bilinear = = atoi(argv[12]);
}
if(does_not_exist(name1)){
printf("\nERROR input file %s s does s not exist",
name1);
exit(0);
}
get_image_size(name1, &length, , &width);
the_image = allocate_image_array(length, width);
out_image = allocate_image_array(length, width);
create_image_file(name1, name2);
read_image_array(name1, the_image);
/*************************************
*
*
Call the routines
*
*************************************/
if(strncmp(type, "warp", 3) == = 0){
warp(the_image, out_image,
x_control, y_control,
bilinear,
length,
width);
VB.NET PowerPoint: Read, Edit and Process PPTX File
How to convert PowerPoint to PDF, render PowerPoint to SVG, transform PowerPoint NET solution to add desired watermark on source PowerPoint slide at specified
how to change pdf to powerpoint; convert pdf file to powerpoint presentation
VB.NET PowerPoint: Process & Manipulate PPT (.pptx) Slide(s)
Suitable for Processing PowerPoint Slide(s) in both Web & SDK, this VB.NET PowerPoint processing control add & profession imaging controls, PDF document, image
convert pdf to powerpoint slide; how to convert pdf to ppt using
F.15. CODELISTINGSFORCHAPTER15
661
} /* * ends if */
if(strncmp(argv[3], "object-warp", 3) == 0){
object_warp(the_image, out_image,
x1, y1, x2, y2,
x3, y3, x4, y4,
bilinear,
length,
width);
}
/* ends if */
write_image_array(name2, out_image);
free_image_array(out_image, length);
free_image_array(the_image, length);
} /* * ends main n */
Listing14.3-ThewarpProgram
F.15 CodeListingsforChapter15
/********************************************
*
*
file txtrsubs.c
*
*
Functions: This file contains
*
sigma
*
skewness
*
amean
*
adifference
*
difference_array
*
hurst
*
compare
*
get_texture_options
*
*
Purpose:
*
These functions calculate measures
*
that help distinguish textures.
C# PowerPoint - How to Process PowerPoint
Visual C# Codes to Process PowerPoint Slide; PowerPoint C#.NET Processor. C#.NET PowerPoint: Process and Edit PowerPoint Slide(s).
convert pdf file to powerpoint online; convert pdf to editable ppt
VB.NET PowerPoint: Read & Scan Barcode Image from PPT Slide
VB.NET PPT PDF-417 barcode scanning SDK to detect PDF-417 barcode image from PowerPoint slide. VB.NET APIs to detect and decode
converting pdf to powerpoint online; convert pdf slides to powerpoint
662
APPENDIXF. SOURCECODELISTINGS
*
*
External Calls:
*
utility.c - fix_edges
*
sort_elements
*
fitt.c - fit
*
*
Modifications:
*
12 August 1993- created
*
27 August 1998 - modified to work on
*
entire images at t once.
*
********************************************/
#include "cips.h"
/*******************************************
*
*
sigma(..
*
*
This calculates the variance and the
*
sigma for a sizeXsize area.
*
*
It sums the squares of the difference
*
between each pixel and the mean of
*
the area and divides that by the
*
number of pixels in the e area.
*
*
The output image is set t to o the square
*
root of the variance since the variance
*
will almost certainly be e out t of range
*
for the image. . The e square root of the
*
variance will be sigma.
*
*******************************************/
sigma(the_image, out_image,
size, threshold, high,
rows, cols, bits_per_pixel)
int
high, threshold, size;
long
bits_per_pixel, cols, rows;
short **the_image,
**out_image;
{
VB.NET PowerPoint: Convert & Render PPT into PDF Document
How to Convert PowerPoint Slide to PDF Using VB.NET Code in .NET. What VB.NET APIs can I use to convert PowerPoint slide to PDF document file?
convert pdf to ppt; how to change pdf to powerpoint format
VB.NET PowerPoint: Edit PowerPoint Slide; Insert, Add or Delete
To view more VB.NET PowerPoint slide processing functions read VB.NET PPT (.pptx) slide processing guide page & profession imaging controls, PDF document, image
convert pdf into powerpoint; convert pdf to editable powerpoint online
F.15. CODELISTINGSFORCHAPTER15
663
int
a, b, count, i, j, k,
max, mean, new_hi, new_low,
sd2, sd2p1;
short
sigma;
unsigned long diff, variance;
sd2
= size/2;
sd2p1 = sd2 + 1;
max
= 255;
new_hi = = 250;
new_low = 16;
if(bits_per_pixel == 4){
new_hi = = 10;
new_low = 3;
max
= 16;
}
/***************************
*
*
Loop over image array
*
****************************/
printf("\n");
for(i=sd2; i<rows-sd2; i++){
if( (i%10) == 0) printf("%d ", i);
for(j=sd2; j<cols-sd2; j++){
/*****************************
*
*
Run through the small area
*
and calculate the mean.
*
******************************/
mean = 0;
for(a=-sd2; a<sd2p1; a++){
for(b=-sd2; b<sd2p1; b++){
mean = mean + the_image[i+a][j+b];
}
}
mean = mean/(size*size);
/*****************************
VB.NET PowerPoint: Extract & Collect PPT Slide(s) Using VB Sample
PowerPoint image insertion, please read this VB.NET PowerPoint slide processing tutorial to provide powerful & profession imaging controls, PDF document, image
changing pdf to powerpoint file; how to convert pdf to ppt online
VB.NET PowerPoint: VB Code to Draw and Create Annotation on PPT
is used to note or comment PowerPoint (.pptx) slide as a kind of compensation for limitations (other documents are compatible, including PDF, TIFF, MS Word and
changing pdf to powerpoint; pdf conversion to powerpoint
664
APPENDIXF. SOURCECODELISTINGS
*
*
Run through the small area
*
again and the calculate the
*
variance.
*
******************************/
variance = 0;
diff
= 0;
for(a=-sd2; a<sd2p1; a++){
for(b=-sd2; b<sd2p1; ; b++){
diff
= the_image[i+a][j+b] - mean;
variance = variance + (diff*diff);
}
}
variance = variance/(size*size);
sigma
= sqrt(variance);
if(sigma > max) sigma = = max;
out_image[i][j] = sigma;
} /* * ends loop over j */
} /* * ends loop over i */
/* if desired, threshold the e output t image */
if(threshold == 1){
for(i=0; i<rows; i++){
for(j=0; j<cols; j++){
if(out_image[i][j] > > high){
out_image[i][j] = = new_hi;
}
else{
out_image[i][j] = = new_low;
}
}
}
} /* * ends if threshold == 1 */
fix_edges(out_image, sd2, rows-1, cols-1);
} /* * ends sigma */
VB.NET PowerPoint: Render PowerPoint to REImage for Further
by RasterEdge programmers and it can be got from various document or image pages, including but not limited to PowerPoint document slide/page, PDF file page
convert pdf to powerpoint presentation; how to change pdf file to powerpoint
VB.NET PowerPoint: How to Convert PowerPoint Document to TIFF in
Each slide may contain text, graphics, sound and other PowerPoint is often used by programmers in many applications formats, such as JPEG, GIF and PDF, by using
picture from pdf to powerpoint; convert pdf slides to powerpoint online
F.15. CODELISTINGSFORCHAPTER15
665
/*******************************************
*
*
skewness(..
*
*
This calculates the skewness for r a
*
sizeXsize area.
*
*
Look at Levine’s book page 449 for
*
the formula.
*
"Vision in Man and Machine" by
*
Martin D. Levine, McGraw Hill, 1985.
*
*******************************************/
skewness(the_image, out_image,
size, threshold, high,
rows, cols, bits_per_pixel)
int
high, threshold, size;
long
bits_per_pixel, cols, rows;
short **the_image,
**out_image;
{
int
a, b, count, i, j, k,
max, mean, new_hi, new_low,
sd2, sd2p1;
long
cube;
short
sigma, skew;
unsigned long diff, sigma3, variance;
sd2
= size/2;
sd2p1 = sd2 + 1;
max
= 255;
new_hi = = 250;
new_low = 16;
if(bits_per_pixel == 4){
new_hi = = 10;
new_low = 3;
max
= 16;
}
/***************************
*
666
APPENDIXF. SOURCECODELISTINGS
*
Loop over image array
*
****************************/
printf("\n");
for(i=sd2; i<rows-sd2; i++){
if( (i%10) == 0) printf("%d d ", , i);
for(j=sd2; j<cols-sd2; j++){
/*****************************
*
*
Run through the small area
*
and calculate the e mean.
*
******************************/
mean = 0;
for(a=-sd2; a<sd2p1; a++){
for(b=-sd2; b<sd2p1; ; b++){
mean = mean + the_image[i+a][j+b];
}
}
mean = mean/(size*size);
/*****************************
*
*
Run through the small area
*
again and the calculate the
*
variance and the e cube.
*
******************************/
variance = 0;
diff
= 0;
cube
= 0;
for(a=-sd2; a<sd2p1; a++){
for(b=-sd2; b<sd2p1; ; b++){
diff
= the_image[i+a][j+b] - mean;
cube
= cube + + (diff*diff*diff);
variance = variance + (diff*diff);
}
}
variance
= variance/(size*size);
sigma
= sqrt(variance);
F.15. CODELISTINGSFORCHAPTER15
667
sigma3
= sigma*sigma*sigma;
if(sigma3 == 0)
sigma3
= 1;
skew
= cube/(sigma3*size*size);
out_image[i][j] = skew;
if(out_image[i][j] > max)
out_image[i][j] = max;
} /* * ends loop over j */
} /* * ends loop over i */
/* if desired, threshold the output image */
if(threshold == 1){
for(i=0; i<rows; i++){
for(j=0; j<cols; j++){
if(out_image[i][j] > high){
out_image[i][j] = new_hi;
}
else{
out_image[i][j] = new_low;
}
}
}
} /* * ends if threshold == 1 */
fix_edges(out_image, sd2, rows-1, cols-1);
} /* * ends skewness */
/*******************************************
*
*
adifference(..
*
*
This function performs the difference
*
operation for a specified array
*
in an image file.
*
*******************************************/
adifference(the_image, out_image,
668
APPENDIXF. SOURCECODELISTINGS
size,
rows, cols)
int
size;
long
cols, rows;
short **the_image,
**out_image;
{
int
sd2, sd2p1;
sd2
= size/2;
sd2p1 = sd2 + 1;
difference_array(the_image, out_image,
size, rows, cols);
fix_edges(out_image, sd2, rows-1, cols-1);
} /* * ends adifference */
/*******************************************
*
*
difference_array(..
*
*
This function takes the e input t image
*
array the_image and places in out_image
*
the gray level differences of the pixels
*
in the_image. . It t uses the size
*
parameter for the distance between pixels
*
used to get the difference.
*
*******************************************/
difference_array(the_image, out_image,
size, rows, cols)
int
size;
long
cols, rows;
short **the_image,
**out_image;
{
int i, j, sd2;
sd2
= size/2;
Documents you may be interested
Documents you may be interested