how to write a 'checker' script [message #474260] |
Sat, 04 September 2010 03:22 |
starfire
Messages: 1 Registered: September 2010
|
Junior Member |
|
|
I was just wondering if anyone here has an expose to MATLAB or Octave??
I am currently using this program but am stuck with a question on how to write a script for a checker which takes as input an image and a threshold value and returns an image that is distorted to appear as if the image was taken on top of a 4x4 chessboard.
the threshold value is used to convert the image into a binary image. Binary images contain only two values: either 0 or 1. When a normal image is converted to a binary image, all the values of the corresponding 2D matrix are converted to either 0 or 1. The checker function produces a binary image.
The checker function breaks the image into sixteen equally-sized parts. Working left to right, top to bottom, the sixteen parts alternate between dark and light parts.
Anyone have any idea??
thank you in advance!
|
|
|
|
Re: how to write a 'checker' script [message #475231 is a reply to message #474262] |
Mon, 13 September 2010 18:02 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
Some peole have generated images through pl/sql ==> http://www.adp-gmbh.ch/blog/2005/november/22.html but it's not generally recognized as the right tool for the job. If you have an image manipulation utility that you want to call directly from pl/sql then that's a different situation. I have several pl/sql apps that generate images in that way, and one way to do that is to:
1) Figure out the O/S level commandline to do what you want. Create the pl/sql to generate this string. Creating a script via utl_file and then executing that sometimes gives you more flexibility and control.
2) Execute the command from pl/sql using a Java stored procedure (an older approach) , or using DBMS_SCHEDULER.create_job/run_job of type EXTERNAL (a newer, sometimes easier approach). http://psoug.org/reference/dbms_scheduler.html
3) load the image back into the database if needed. There are several ways to do this.
|
|
|