PgCOn 2011 Parallel Image Searching
PgCOn 2011 Parallel Image Searching
Searching
Using PostgreSQL
and PgOpenCL
Tim Child
CEO
3DMashUp
Speaker Bio
• Tim Child
• Ease of Use
o Make use GPU accelerated code easier to use
o Make GPU accelerated code more mainstream to Information Technology
• Data Scalability
o Scale GPU application data size
PgOpenCL
PgOpenCL
Web HTTP Web SQL SQL
SQL
Browser Server Statement Procedure
Procedure
PCIe Bus
TCP/IP
App
PostgreSQL GPGPU
Server
Channel Order
R G B A or A R G B or R G B or I
Channel Type
1 2 3 4 or 1 2 or 1
• Color Transformation
o Gray Scale, Color Balance, Histograms
• Mensuration
o Area, Centroid, Perimeter, ..
• Noise Reduction,
o Noise reduction, de-blurring, sharpening,
• Spatial Filtering
o Gaussian Filter, Laplace Filter, Sobel Filter, ..
• Transformations
o DCT, DFT, FFT
PgOpenCL Image2D Type
• New UDT
CREATE TYPE opencl.image2d
(INPUT="opencl.image2d_in", OUTPUT="opencl.image2d_out", DEFAULT='',
INTERNALLENGTH=-1, ALIGNMENT=int4, STORAGE=EXTENDED);
ALTER TYPE opencl.image2d OWNER TO postgres;
COMMENT ON TYPE opencl.image2d IS 'PgOpenCL 2D Image type';
• Input Format
insert into images (image) values
('CL_ARGB CL_UNSIGNED_INT8 1 1 4 /////w==');
}
}
SQL Query
create type imagetype as enum ( 'jpg' );
);
• OpenCL
• www.khronos.org/opencl/
• www.amd.com/us/products/technologies/stream-technology/opencl/
• http://software.intel.com/en-us/articles/intel-opencl-sdk
• http://www.nvidia.com/object/cuda_opencl_new.html