how to generate an artificial book. generate a page of 14-segment using function generatenpage() to...
TRANSCRIPT
![Page 1: How to Generate an Artificial Book. Generate a page of 14-segment Using function GenerateNPage() to generate an image file contain alphabets of 14-segment](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfdc1a28abf838cb13c2/html5/thumbnails/1.jpg)
How to Generate an Artificial Book
![Page 2: How to Generate an Artificial Book. Generate a page of 14-segment Using function GenerateNPage() to generate an image file contain alphabets of 14-segment](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfdc1a28abf838cb13c2/html5/thumbnails/2.jpg)
Generate a page of 14-segment• Using function GenerateNPage() to generate an image file
contain alphabets of 14-segment with polynomial distortion.• Please download segment.mat before use this function.
(variable sim is provided in segment.mat)function im = GenerateNPage(N, Nr, Nc, GAP, sim, savefile)N: number of pages which you wantNr, Nc: number of rows and columns of alphabets in each pageGAP: space between each alphabet (pixel)sim: required variable(Option) savefile: save file nameFor example, - load segment- im = Generate(4,10,10,30,sim,'pic01'); => Generate 4 pages, each page contain 100 alphabets - im2 = imnoise(im,'gaussian',0,0.01); %add noise- imwrite(im2,'pic02.png');
![Page 3: How to Generate an Artificial Book. Generate a page of 14-segment Using function GenerateNPage() to generate an image file contain alphabets of 14-segment](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfdc1a28abf838cb13c2/html5/thumbnails/3.jpg)
Create a whole-book image• Create an image file that contain all pages of a
book by using function Combine5( ).• Input images of each page of the book.
function Combine5(datasize, savefile, GAP, Nr, Nc, SizeX, SizeY, contrast)- datasize: number of pages of the book (datasize <= Nr*Nc )- savefile : save file name- GAP: size of null value between each page (pixel)- (Option) Nr, Nc: number of pages in row and column of a new big image- (Option) SizeX, SizeY: size of biggest pages- (Option) contrast: use for converting colorful image to b/w imageFor example, - Combine5(100,'book1',50);- Combine5(100,'book1',50,5,20);- Combine5(100,'book1',50,5,20,768,1024,0.75)