Download presentation
Presentation is loading. Please wait.
Published byEmory Houston Modified over 9 years ago
1
How to Generate an Artificial Book
2
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 want Nr, Nc: number of rows and columns of alphabets in each page GAP: space between each alphabet (pixel) sim: required variable (Option) savefile: save file name For 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');
3
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 image For example, - Combine5(100,'book1',50); - Combine5(100,'book1',50,5,20); - Combine5(100,'book1',50,5,20,768,1024,0.75)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.