Computer Vision I

# Computer Vision (I) 2001Fall2:10-5:00 pm., Tuesday Office Hours:9AM-11AM, Tuesday TA Time: 5PM-6PM, Tuesday

Instructor: Professor Chiou-Shann Fuh fuh@csie.ntu.edu.tw
TA: Jeng-sheng Yeh jsyeh@cmlab.csie.ntu.edu.tw
Information
FAQ (New)
Homeworks
Lecture Notes
(Chap 1)
(Chap 2)
(Chap 3)
(Chap 4)
(Chap 5)
(Chap 6)
(Chap 7)
(Chap 8) (Chap 9) (Chap 10) (Chap 11)
Chinese big5 version ¤¤¤åª© (will not update frequently)

Created: 19th Aug. 2001. Last updated: 21th Feb. 2001. by Jeng-sheng Yeh Access times:

## [ About Computer Vision I]

Course Number: 526 U1090
Credits: 3
Time: Tuesday 6,7,8 (2:10PM-5:00PM)
Classroom: New CSIE Classroom 309
Classification: Elective for junior, senior, and graduate students
Prerequisite: None
Instructor: Chiou-Shann Fuh
Office: New Computer Science and Information Engineering Room 327
Office Hours: Tuesday 9AM-11AM
Objective: To learn computer and robot vision through extensive course projects.
Textbook:
R.M. Haralick and L.G. Shapiro, Computer and Robot Vision, Vol. I, Addison Wesley, MA, 1992.
Reference:
L.G. Shapiro and G.C. Stockman, Computer Vision, Prentice-Hall, NJ, 2001.
R. Jain, R. Kasturi, and B.G. Schunck, Machine Vision, McGraw-Hill, New York, 1995.
R.C. Gonzalez and R.E. Woods, Digital Image Processing, Addison Wesley, MA, 1992.

Mid-term Exam
Date: 27th Nov. 2001, 2pm-5pm
Range: Chapter1-Chapter7
Type: word explain (2pt*50) (Old Mid-term Exam Sheets ¦Ò¥jÃD
1993 1994 1995 1996 1997 1998(Important!!) 2000(Important!!) there is no 1999 provided )
Final Exam
Date: 15th Jan. 2002, 2pm-5pm
Range: Chapter8-Chapter11
Type: ??? (Old Final Exam Sheets ¦Ò¥jÃD, À³¸Ó¨S¤°»ò¥Î!
1993 1994 1995 1996 1997 )
Dear T,
i am very sorry that i didn't have any information about
but he didn't tell me anything. i didn't got any old
final exam sheets, too. and i didn't got the
exam sheet this year. maybe professor fuh will handle
final exam this year.

sincerely,
jsyeh@cmlab, VisionTA

ps. it is my mistake. it should be ch11.

> Dear TA, about final exam,
> Range: Chapter8-Chapter13
> ¦Ò¸Õ½d³ò¨ìch13? ¤£¬O¨ìch11?
> ¥t¥~¥i§_½Ð°Ý¤@¤U¤]¬O¦Ò50­Ó¦Wµü¸ÑÄÀ¶Ü?
>
> T


Projects:
Homework#1: use hvision library and tk
Homework#2: binarize, histogram, and connected component
Homework#3: histogram equalization
Homework#4: dilation, eroation, opening, closing and hit-and-miss (binary)
Homework#5: dilation, eroation, dilation, opening, closing (gray scale)
Homework#6: Yokoi connectivity number
Homework#7: thinned image
Homework#8: noise and filters
Homework#10: zero-crossing operators

Grading Policy: Homework: 30%, Mid-term: 30%, Final: 40%

## [ Information ]

• 18th Sep, 2001 (1st Week Disabled):
Because of the Typhoon
NARI, which killed more than 80 in 2 days in Taiwan, this course had delayed one more week.

• 25th Sep, 2001 (1st Week):
Introduction of course, references
Chapter 1
Computer Vision: Over View
Homework #1 Assignment(due: Oct 9,2001)
TA Time: Homework Tutorial( Unix, VNC, TK, hvision, gcc)

• 2th Oct, 2001 (2nd Week):
Chapter 2
Binary Computer Vision: Threshold and Segmentation
Homework #2 Assignment(due: Oct 16,2001)
TA Time: Q and A about homework

• 9th Oct, 2001 (3rd Week):
Chapter 3
Binary Computer Vision: Region Analysis
Homework #3 Assignment(due: Oct 23,2001)
TA Time: Deliver Homework#1

• 16th Oct, 2001 (4th Week):
Chapter 4
Statistical Pattern Recognition
TA Time: Deliver Homework#2
TA Time: Introduction of gdb, the gnu debugger in unix environment

• 23th Oct, 2001 (5th Week):
Chapter 5 Part I
Mathematical Morphology (binary)
Homework #4 Assignment(due: Nov 6,2001)
TA Time: Deliver Homework#3

• 30th Oct, 2001 (6th Week):
Chapter 5 Part II
Mathematical Morphology (gray scale)
Homework #5 Assignment(due: Nov 13,2001)

• 6th Nov, 2001 (7th Week):
Chapter 5 Part III
Homework #6 Assignment(due: Nov 20,2001)
Homework #7 Assignment(due: Nov 27,2001)
TA Time: Deliver Homework#4

• 13th Nov, 2001 (8th Week):
Chapter 6
TA Time: Deliver Homework#5

• 20th Nov, 2001 (9th Week):
Chapter 7
Mid-Term Exam will be hold next week(Range: Chapter1-Today)
TA Time: Deliver Homework#6

• 27th Nov, 2001 (10th Week):
Mid-Term Exam

• 4th Dec, 2001 (11th Week):
Chapter 8
TA Time: Deliver Homework#7 Homework #8 Assignment(due: Dec 18,2001)
Homework #9 Assignment(due: Dec 25,2001)

• 11th Dec, 2001 (12th Week):

• 18th Dec, 2001 (13th Week):
TA Time: Deliver Homework#8

• 25th Dec, 2001 (14th Week):
TA Time: Deliver Homework#9

• How to Find Related Papers?

• hvision man page, hvision Tutorial

Textbook Authors: Robert Haralick Linda Shapiro
Story: Lena? The Rest of the Lenna Story
Vision Labs:

## [ Frequently Asked Question ]


Important
TA has some suggestions, since TA had tested and verified
something on somemachine, and believe they are ok.
if you have any problem and want to email to ask TA,
you should DESCRIBE THE PROBLEM MORE CLEARLY, then TA can
reproduce the error and understand what the problem you met.
(ex. which machine, what is your id and name, what command you
are executing, and the full error messages, etc)

then TA can provide his help as soon as possible if TA know what
exectly problem happened.

anyway, TA will go to classroom in course every tuesday afternoon.
so you can ask TA further questions if you can't solve them.

Q:(1/24/2002)
Dear TA,
I have a question about get the value of a specific pixel.
If a image has pixels of OneByte, I can use B_PIX to get its value.
If a image has pixels of REALPIX, I can use hvGetPixel to get its value.
How can I get its value if the image has pixels of INTPIX(4Bytes)?
If there is no procedure can be used, can I use four times of B_PIX to
get a INT PIX?
If I can do so, the first pixel of INTPIX (0,0) can be got by computing
B_PIX(0,0)*2^24 + B_PIX(0,1)*2^16 + B_PIX(0,1)*2^8 + B_PIX(0,3) or
B_PIX(0,0)*2^24 + B_PIX(1,0)*2^16 + B_PIX(1,0)*2^8 + B_PIX(3,0) or
another way?

Thanks.
P
A:
Dear P,
by man hvision, you can see
B_PIX(I,i,j)        pixel i,j of byte image I
US_PIX(I,i,j)       pixel i,j of unsigned two byte image I
SS_PIX(I,i,j)       pixel i,j of signed two byte image I
INT_PIX(I,i,j)      pixel i,j of integer image I
R_PIX(I,i,j)        pixel i,j of real image I
sincerely,
VisionTA

Q:(1/1/2002)
Dear TA:
I has a problem about HW10. What does it mean that
"choose proper thresholds" on the four types of images.
(Laplacian,minimum-variance Laplacian,Laplacian of Gaussian, and
Difference of Gaussian)
Thanks!!
A:
Dear oo,
i am not sure what does professor fuh means when he assigned hw10.
and after i saw my homework write 3 years ago, i think maybe it means,
"There are 4 methods in p.349 (all are zero-crossing)."
"And different method maybe needs different threshold, "
"just choose different."
maybe typo of that page, i had modified it.
and about DOG, if you want to understand what is it, you can see the
reference listed on course lecture page. if you still don't know what
is it, don't worry, hvision library had implement it. it is allowed to
use DOG by tk directly or hvDog hvision
function call.

sorry for my late reply! i am busy those days ^^;;

sincerely,
VisionTA

Q:(12/2/2001)

½Ð°Ý§U±ÐGaussian noise ¥[¨ì¹Ï¸Ìªº·N«ä¬O»¡,¨C¤@­Ópixel³£¦³Âø°T,
¦ÓÂø°T¬O¤À§G¦b-255¨ì255¤§¶¡¶Ü???
§Ú¹ê¦b¬O¤£¤ÓÀ´ÃD·N,

A:(1/2/2002) (sorry for so late reply ^^;;)
Dear Y,
"gaussian noise" means, there will be some noise on image, and the
noise amplitude of noise is like gaussian distribution.
(the noise "value" added to each pixel is like gaussian random variable)
the problem becomes, "what is the value added to each pixel?"
or "what is gaussian random number generater?"

if you want to see the definition of gaussian random variable,
you can see http://mathworld.wolfram.com/
(mathworld is the most famous math forum and diction on web!!)

if you still have problem, just go to R505 in CSIE building.
i will teach it if you need.
you should choose the mean (zero), st.dev. (¼Ð·Ç®t), and the amplitude
applied on the noise. you can write a program to do this.

the key point of sub-problem 2 (salt and pepper) is
you should choose the signal-to-noise ratio, not all pixel have
noise value, if noise ratio is 1/10, one of ten pixel
will have such salt-or-pepper noise, and other nine are remaining the same.

sincerely,
jsyeh@cmlab, VisionTa

ps.
below is the program header comment of my hw8 implementation 3 years ago.
i had implemented my own gaussian random variable in c.
you can find a better code of it in Knuth's famous book,
"the art of computer science" volume II. (but it is not easy to understnat
the code ^^;;)
or you can find some code on internet. (it is better to implement it ^^;;)

/************************************************************************\
hw8_1.c
This Program generate
I(nim,i,j) = I(im,i,j)+amplitude * N(0,1)
N(0,1): Gaussian random variable with zero mean and st.dev. 1
amplitude: determines signal-to-noise ratio, try 10,30

\************************************************************************/

Q:(1/4/2002)
§Ú¤£À´ªº¬O§Ú¤£ª¾¹D"choose proper thresholds"¬O¤°»ò·N«ä,
¦p¦ó¥Îfig.7.33 fig.7.36 fig.7.37µ¥¹ï¼v¹³°µ¹Bºâ¥BÁÙ­n¿ï¾Ü
¦A¥h°µweighting sumªº¹Bºâ´N¦n¤F,ÁÂÁÂ!!
A:
Dear r,
"choose what threshold? change the mask? or what?"

homework#9 and homework#10 are almost the same.
in homework#9, you need to "choose proper threshold" to decide how
many pixels are edge.

let me take an example:
in hw9_1, you should "apply" roberts operator to an testing gray-level
image. so what?

lena.im --(apply_roberts_opertor)---> lena.robert

but, major issue is, how many pixels are like "edge"!

that's why we "choose proper threshold" to let lena.robert to an 0-or-1 image.

lena.robert --(choose_proper_threshold)--> lena_robert.bin

then we can said, 1 is like edge, 0 is not like edge.

***************************************************************
let's take a look of hw10_1:
we APPLY "laplacian zero-crossing mask" to an testing gray-level image.
so what?

but, major issue is, we want to find out "edge"!

so we need to "choose proper threshold" again to convert lena.lap to a 0-or-1 image
.

lena.lap --(choose_proper_threshold)--> lena_lap.bin

then in that binary image we can said, 1 is like edge, 0 is not like edge.

so we need to "choose proper threshold" again to convert lena.lap to a 0-or-1 image
.

lena.lap --(choose_proper_threshold)--> lena_lap.bin

then in that binary image we can said, 1 is like edge, 0 is not like edge.

***************************************************************

so you didn't need to "choose proper mask", those masks all work fine!

sincerely,
jsyeh@cmlab, VisionTA

Q:(11/5/2001)
in Homework#3, how to do Hit-and-Miss operation with only one
octagon structuring element?
A:
you can prepare more structuring elements for this homework.
don't be constrained in only one structuring element(liek octagon).
it is encouraged to let your program accept different kernels
(structuring elements) for user to choose.

Q:(11/3/2001)
what kind of structuring element should we use in homework#4?
A:
in TA's own opinion, you can prepare some structuring elements
and then there will be a lot of fun.
but somebody said that Professor fuh had assigned octagon
***
*****
*****
*****
***
as the one for the first 4 binary morphological operations.
anyway, TA will not care, just go ahead. TA will appreciate who
do more experiments for different kernels.

Q:(10/13/2001)
i had emailed homework to TA, but TA didn't reply to me for
a long time. is there anything wrong?
A:
Dear p,
but i didn't reply email to you because i had not checked
the correctness of your program. because there are a lot of homework
deliver to here.
i promise that i will verify all homework in 1 week. if you have
any problem, you can find me at TA time (every tuesday afternoon)
sincerely,
jsyeh@cmlab, VisionTA

Q:(10/13/2001)
I can't see the fomula in lecture notes. how can i see it?
(ex. in the end of chapter 3, there should be a fomula, but
i only see 144#144 145#145 ... , etc.
A:
Dear k,
about homework#3 formula, it is really in the course web page
lecture notes (chapter3)
but you will only see something like 144#144 etc. it is because
the browser didn't support the $tag in html. so you can see the "document source" directly, then you will know what the formula is. ex. in the end of chapter 3, there are:$
histogram equalization, histogram linearization
<!-- MATH
\begin{displaymath}
s_k = 255 \sum_{j=0}^k \frac{n_j}{n}
\end{displaymath}
-->

145#145
<!-- MATH
$k = 0, 1, ..., 255$
-->
146#146, 147#147: number of pixels with intensity 77#77
148#148: total number of pixels
for every pixel if 149#149 then <!-- MATH
$I(imhe, i, j) = s_k$
-->
150#150

Q:(10/21/2001)
Dear TA,
I still can't figure out what it is!!
WHAT IT IS ON EARTH ???
A:
Dear a,
i had PRINT-SCREENed the euqations in
http://www.cmlab.csie.ntu.edu.tw/~jsyeh/visionta/hw3.gif

and Fig4.10,Fig4.13 are two histogram distributions showed
in classroom.
sincerely,
VisionTA

Q:(10/11/2001)
what does segmentation fault mean?
A:
the message means, "you mis-use pointer (*ptr) or array (ary[513])"
maybe you should check your pointers and arrays.

Q:(10/11/2001)
is there any debugger in unix environment?
A:
yes, there is a very very powerful debugger in unix environment.
gdb
you can read the gdb_howto written by TA 2 years ago.
gdb_howto
if you still have problem using gdb, you are welcome to ask TA.
it is TA's honor to introduce gdb to you.

Q:(10/13/2001)
dear TA:
1.lenaªºbmpÀÉ­n¥h­þ¸Ì§ä?§Ú¤âÃä¦³ªºlenaªº¹ÏÀÉ¬O432X432
ÁÙ¦³§@·~ªº¸Ü§Ú¯à§_¤£¦Ò¼{general case¡A
³o¼Ë¤ñ¸û¤è«K¡A¥i¥H¶Ü?

2.binarizeªºthreshold­È¯à§_ÀH«K³]?
¦]¬°§Ú·QÅý¶Â¦â³¡¤À¦h¤@ÂI¡A³o¼Ë·|¤ñ¸ûÂ²³æ.

3.bounding box¬O«ü¥]³ò¬Û¦Plabelªº³Ì¤p¥|Ãä§Î¶Ü?

H 10.12
A:
Dear h,
1) i am sorry that i could not provide lena 512x512 bmp file.
there is a 512x512 hvision format lena image at
/usr/local/vision/images/lena.im if you login our unix machines.

and it is ok if you only accept 512x512 image size.

2) i am sorry that binarize threshold should be 128, because it is
harder and if your program have error, it will show the error.

3) it is possible to overlay each bounding box.
but that is ok. just draw it.

and if the region is too small to draw a rectangle, you can set a
threshold of size (width and/or height) to ommit some small region.

sincerely,
jsyeh@cmlab, VisionTA

Q:(10/8/2001)
in homework, what is the diagonal mirrored image?
A:
here are some example:
Source:

Diagonal mirrored:

Rotated 180 degree: (not diagonal mirrored)

Q:(10/7/2001)
in homework#2, the lena image has a lot of small connected-components.
and it is very hard to show bounding box in such image.
should we really use lena as the image?
A:
yes. professor fuh assigned homework#2 with lena image.
you can use a threshold to omit small connected-components.

Q:(9/28/2001)
§U±Ð¥i¥H¤£­n¥Î­^¤å¼gºô­¶¶Ü? ¤S«Ü¦h, ¬Ý±o«Üµh­W~
¦^ email ¥i¤£¥i¥H¥Î¤¤¤å?
A:
i am sorry that i am trying to use english to establish this page.
sometimes the chinese big5 will have trouble in some email.
and i am trying to put as much information as i can.
anyway, i will translate this english page to chinese big5 latter.

Q:(9/28/2001)
How is the workstations(solaris and linux) in R217 now?
i cannot use any command after i login linux machines!
A:                  (From 9/12/2001 R217TA email)
/bin/cp ~sk/.cshrc* .
to reset your configuration for linux environment,
(1) This may occur to users whose accounts are created before 1999.
or move them somewhere else in advance.

machines available now:
Linux
linux1.csie.ntu.edu.tw
linux2.csie.ntu.edu.tw
linux3.csie.ntu.edu.tw
linux4.csie.ntu.edu.tw
linux5.csie.ntu.edu.tw
linux6.csie.ntu.edu.tw
linux7.csie.ntu.edu.tw
linux8.csie.ntu.edu.tw
FreeBSD
bsd1.csie.ntu.edu.tw
bsd2.csie.ntu.edu.tw

Q:(9/27/2001)
Dear TA,
After typing the command
"cc -o pseudo pseudo.c -lhvision -lm ",I received error message:
pseudo.c:7: hvision.h: No such file or directory
my .profile is :
PATH=$PATH:/usr/bin /bin /usr/X11R6/bin /opt/kde/bin /usr/local/vision/linux /$
MANPATH=$MANPATH:/usr/local/vision/man LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/vision/linux
export MANPATH LD_LIBRARY_PATH
run on :linux2

A:
Dear Lee,
"hvision.h: No such file or directory"
there is no such file which is included in your pseudo.h
(because linux2 didn't have hvision.h in /usr/local/include)
(but linux5 has such file. it is not your fault,) you can
(A) change to use linux5
or you can add some compile parameter:
(B) "gcc -o pseudo -I/usr/local/vision/include pseudo.c -lhvision -lm"
then you can compile your program everywhere~
or
(C) copy the /usr/local/vision/include/hvision.h to be together with

then i can go to your directory to verify your setup .profile there.

sincerely,
TA

Q:(10/2/2001)
Dear TA,
AFter typing the command, "cc -o pseudo pseudo.c -lhvision -lm ",
at home, i received error message:
/usr/bin/ld: cannot find -lhvision
collect2: ld returned 1 exit status
how do i solve this program?
A:
Dear c,
the error message "/usr/bin/ld: cannot find -lhvision" means,
the linker (/usr/bin/ld) cannot find the library file (libhvision.a)
you can add -L/usr/local/vision/linux to specify the library directory

so, my suggestion is:
1) cc -o pseudo pseudo.c -L/usr/local/vision/linux -lhvision -lm
or
2) use linux5 as the machine you compile your program
(because on linux5, libhvision.a is in /usr/local/lib/,
the default search directory  )

hope those information are enough for you.

sincerely,
jsyeh@cmlab, VisionTA

Q:(10/5/2001)
i cannot find hvision.h in the course website, where is it?
A:
Dear t,
it is useless for you to find hvision.h.
hvision.h is for the people who need to use hvision library.
but since you will not use hvision library in our workstations,
it is really useless for you.

so i have 2 suggestions:
1) if you want to use hvision.h with Harvard hvision library,
you should use our workstation. of course you can find hvision.h
in our R217 workstation lab /usr/local/vision/include/hvision.h

2) if you didn't not want to use the linux or unix machine provided by us,
you should write your own utility to read the images (like lena.im)
if so, the course website provide the image file format for you.
you can find it in
http://www.cmlab.csie.ntu.edu.tw/~jsyeh/visionta#format
or you use other image files and image format (like jpg, bmp, gif, etc)
(of course, it is ok to use any image library to read image)
(but when you deliver your homework, you should specify and provide it)
sincerely,
jsyeh@cmlab, VisionTA

Q:(10/6/2001)
¥H¤U¬O§Ú­ì¥ýªº·Qªk,¤£ª¾¹ï¤£¹ï,§Ú¬Ý¤F¤@¤U pseudo.c¸Ì¦³include
ÁÂÁÂ¡C
ps:hvision library¬O¤°»ò????
A:
Dear t,
it is really useless because you are using borland c++.
it is almost impossible if you have hvision.h to compile
the pseudo.c!! it is the FACT!!

about the reason why, let me introduce it.

1) what is hvision library?
A: hvision library is a library constructed by Harvard University.
and it is used in unix and X-window environment.
as i know, nobody had ported it to ms-dos or ms-windows environment.
2) why i can't compile the program with hvision.h and pseodu.c?
A: the question is like:
"why i can't run ms-dos assembly language in sun-sparc workstation?"
they are different hardware architecture and operation system.
if nobody ports it to different environment, it is almost impossible.

so i will tell you, if you want to write your homework,
please see my personal suggestions in the last email.
since you are familiar with matlab, maybe you can use my suggestion#2,
"and you will use diffferent function calls "

or »{©R¤@ÂI, suggestion#1, learn how to write program in unix environment,
and find a classmate to learn it together.

if you don't have classmate or no classmate want to help you, you
can find me next theusday afternoon. i will demo how to write it again.
(why next theusday? because i had demoed how to write it for two weeks
in classroom TA time. and i also put all materials on our course
web-site. it will not be my fault.)

sincerely,
jsyeh@cmlab, VisionTA

Q:(10/5/2001)
§U±Ð±z¦n:
¤@¦¸¤W½Ò®É¦³show¥Xµ{¦¡ªºsource codeÁÙ¦³lenaªº·Ó¤ù,¬O§_¯à³Â·Ð
§U±Ð±Hµ¹§Ú,ÁÙ¦³¬O§_¦³³o¤G¼ËªF¦è´N¯à¦Û¤v¼g§@·~¤F,ÁÂÁÂ!
A:
Dear t,
professor fuh had put the source code and lena image
in his homepage (and of course, some LaTex lecture notes)
http://www.csie.ntu.edu.tw/~fuh/vcourse
it is your responsibility to take those things yourself.
and the course website is at:
http://www.cmlab.csie.ntu.edu.tw/~jsyeh/visionta

hope those information is helpful for you.

sincerely,
jsyeh@cmlab, VisionTA

Q:(9/27/2001)
How to deliver homework#1?
A:
by email, send the source code to TA.
a format here is suggested, but not restricted:
"Title: B7506006 Vision Homework #1"
"ID: B7506006, Name: Yeh,Jeng-sheng"
Below is my homework#1, you can compile it with "gcc -lhvision h1.c"
and the commands i used in tk is :
........
---------h1.c---------------
#include "hvision.h"
......

it is better for you to write down some experiment and problems
what you had met and how you solved them. it can prove you really
write the homework yourself, not copycat.

Q:(9/27/2001)
Why VNC is so slow when i am using it at home?
A:
Yes, you got the point! VNC is slow when the bandwidth is not enough.
if you are at home with slow network connection to school, then i
suggest you can write homework at school.
if you are strongly want to write at home and want faster condition,
1) use real X server(8-bit colormap) at home, not to use VNC solution.
ex. homelinux:~> startx --bpp 8 (which will be homelinux:0.0)
homelinux:~> xhost +linux8 (which allow display on your monitor)
linux8:~> setenv DISPLAY homelinux:0.0
linux8:~> tk (or hview, xview, etc)

2) build another programming environment at home, run everything locally.
ex. Installed hvision library at home.

or, you are the one who likes to do everything yourself.
3) rebuild the wheel,
ex. your own programming environment. every function are builded
by yourself, including read the image, etc.
(then you need the format of files in /usr/local/vision/images)
(you can man hvision on the workstations in school)
(or see the file format here)

Q:(9/26/2001)
It shows the error message:
YPBINDPROC_DOMAIN: Domain not bound
what should i do?
A:
Don't worry. it shows "Our R217 Workstation Lab have some problems".
Please wait some moment. maybe TA in R217 will solve that problem.
those days the workstation lab is not stable.
if this problem still exists, VisionTA will construct another
environment for you. to be continue...

Q:(9/26/2001)
somebody email to me that my process (gterm) use too much cpu time,
what should i do?

USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
bxxxxxxx  3810 99.7  0.1  2620 1424 ?        R    Sep25 1475:35 gterm
version2 linux8:3.0 /home/student/8x/bxxxxxxx/.gterm.lockfile

A:
it seens that you didn't exit your gterm (of hvision) and vnc
successfully.
now you can use vnc -kill :number to kill vnc and
kill -9 pid_number(3810 here, for example)

Anyway, the correctly way is not use "kill -9" to kill process,
you should click the [Exit Gterm] in the window if you want to exit.
and also "vnc -kill :Xnumber" to close vncserver.

Q:(9/26/2001)
Dear VisionTA,
i got a problem.
i failed in set the MANPATH, PATH ... global parameters.
can you teach me how to do it? thank you.
sincerely,
b67050xx
A:
Dear b67050xx,
set path=( ooxxooxx /usr/local/vision/linux )
or
setenv MANPATH /usr/local/vision/man
or if you are using other shell, PATH=OOXX; export PATH;

(ex. setenv PATH /usr/local/vision/linux

But!!!! [Important!]
you seens not CSIE student, so maybe you didn't have R217 account.

if so, then you will not use our hvision successfully.
(Harvard hvision is not available everywhere!)

sincerely,
jsyeh@cmlab VisionTA

Q:(9/20/2001)
How to use tk in hvision library?
A:
In our workstation lab (R217), all the workstations, including
hvision library and have tk to be use.
You can read our Course Lecture Notes Chapter 1.
In the end of that chapter, there are some simple tutorials of tk.
Here TA lists some useful "Quick Guides":

linux5:~> tk
tk> list command   (and you can see some useful commands)
tk> read image: src.im dest.im  (src.im is in disk, and dest.im in memory)
(if you are not sure how many parameter should be given, just type
the command name, then you can interactively input all parameters)
tk> view image: dest.im
tk> help some_command_here (see the help pages of commands)
tk> quit  ("quit" to leave tk and back to your unix shell)
linux5:~>

Q:(9/26/2001)
Dear TA,
After i added the Path described in Professor fuh's lecture notes,
i still not run the tk and there are error messages like below:
"exec format error. binary file not executable"
what should i do?

sincerely,
A
A:
Dear A,
about exec format error, binary file not executable,
yes, it is binary format not compatable~
for example, you can't run SPARC binary in Intelx86 architecture,
vice versa.
so you should make sure the "path" point to the correct place.

sincerely,
TA

Q:(9/28/2001)
When i use xview lena.im, it shows, unknow format!
what happened?
A:
^^;; very interesting! the xview introduced in our lecture
notes are a single utility together with Harvard hvision library.
But, there is also a program xview in some linux.
the latter one is a generic program for viewing images, but it
didn't understand the lena.im image format.

so you can (1) change the name of our hvision xview to another name.
or (2) use the full path name to indicate which one you want to use.

Q:(9/20/2001)
When I type tk in unix shell, there are error messages like below,

linux5:~> tk
Xlib: connection to "jan.csie.ntu.edu.tw:0.0" refused by server
Xlib: Client is not authorized to connect to Server
ERROR:  Could not open graphics device

What happened? What should I do?

A:
Your X Server did not trust linux5.
For example, you are sitting on a linux console (jan.csie:0.0),
but jan.csie didn't trust linux5.
So, you can run xhost +linux5 in your linux console, then
everything will be ok.

Q:(9/28/2001)
I had run vncserver on linux, but the vncviewer.exe said,
"Failed to get server address. Did you type the host name correctly?"
or
"Failed to connect to server"
What happened?
A:
"Failed to get server address. Did you type the host name correctly?"
It is very clearly that "you didn't type the hostname correctly!!" -.-

"Failed to connect to server"
maybe your vncserver have some trouble and didn't initialize correctly.
you can see your ~/.vnc/*.log file to see if any error message existed.

personally i suggest you that, (but maybe it is only my bias!)
"You must learn how to understand error message! it is important skill!"

Q:(9/20/2001 not finished)
When I type tk in unix shell, there are error messages like below,

linux5:~> tk
( color depth is not equal to 8)
GTERM ERROR: <hvSetColorMap> #bitplanes must be 1 or 8

What happened? What should i do?
A:
There is a solution for you to run tk and hvision library in
different platform:

vncserver -cc 3 -depth 8

and you can run vncviewer to see it
(ps.  remember to kill the vncserver!!
you should use  vncserver -kill :number
to kill the server to save the CPU usage if you want to leave.

Q:(9/19/2001)
How to use VNC as CrossPlatform interface?
A:
and you can find a lot of information at that official site
http://www.uk.research.att.com

Q:(9/25/2001)
A:
by yourself, if you do not trust the executable file on network,
(as you said, a lot of virus on network,)
you can find the official site and down it by yourself.

Here is a executable version used by me, but i can't prove
that is "Virus-Free" or not.
[Local Cache]

Q:(8/26/2001)
VNC server said, "fixed font error", and didn't initialize correctly.
How to solve this problem?
A:
some years ago. but the environment had changed. so some setting
should be setup, like the font setting, desktop setting, etc.

the easiest way to solve this problem is,  remove all X setup file
ex. move ".dt/" directory to a backup directory. then everything will
be ok.

Q:(9/28/2001)
hi, TA
since I've download the vnc package from the web site you'd provided,
the xterm on local end ( run on win2000) can't display and key in any word
as well as the tcshell,
there're some warning messages on the server end (linux machine) as bellow:
perl: warning: Setting locale failed.
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "iso_8859",
LANG = "C"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
..................
I use the command on server> vncserver -cc 3 -depth 8
what's the problem???
BTW, when I turn off the client connection
just use the command: vncserver -kill :x
should I shutdown the vncserver? which command???
urgent and thanks a lot !

sincerely,
a
A:
Dear a,
i think the problem is caused by your old environment setting.
you can see the FAQ in our web page.

then i can also check the setting of your rc file or profile.

and about shuting down the vnc server, you can see your ~/.vnc/
directory to see if there is any file like "linux.csie:1.pid"
the file *:?.log is the log file when you execute vncserver
and the file *:?.pid is the file contain the process id of
if your vncserver didn't initialized successfully, there will not
be such *.pid file. and then you will not need to kill server.

i also have another information to you!
(1) if there is ONLY WARNNING and no faultal error in message or log,
(2) the files in your ~/.vnc/ directory is very helpful for debug.
the file name
linux5.csie.ntu.edu.tw:7.pid
linux5.csie.ntu.edu.tw:7.log
means your vncserver are run at linux5.csie.ntu.edu.tw.tw:7
and you can kill the vncserver by
vncserver -kill :7
and if there didn't have any *.pid file, it means you didn't
have any vncserver running.
(3) if you didn't have any WindowManager setup file, then the
X in your vncview.exe is "pure X without WindowManager"

maybe the "pure X" is not easy to use for somepeople.
you can move your mouse cursor into the xconsole, (left-upper window)
then you can type command there! you can run "fvwm2 &" or something
else, in order to run a window manager, then the interface will be
easier for you to use.

sincerely,
jsyeh@cmlab, VisionTA

Q:(9/29/2001)
hi TA,
i can run vncserver and vncviewer correctly,
but when i can't input anything in the windows, and no word
when i choose "xconsole", no "xconsole" appeared, and it shows
"can't open xconsole". when i choolse "shell", only a blank window
and there is nothing inside, including the shell prompt.
my id is pxxxxxxxx, my account name is pxxxxx.
A:
Dear a,
after i verify your home directory in linux8, i believe that
there are some setting error for your x and your window manager.
for example, some executable path in your rc file is not correct.
maybe that's why you choose "something" in window but "nothing"
appear.

maybe you are familiar with unix, but some setting file can't
be share directly without modification from other machines.

(ps. i had tested that for a new user without any setting file,
it is easier)

if you still get in trouble, you are welcome to email to me.
sincerely,
TA

Q:(9/19/2001)
How to install hvision at home?
A:
you can tar the source code in /usr/local/vision on R217 workstaions.
then and port them or compile them again in your pc at home.
but if you got some problems while porting or compiling, you should
try to solve them by yourself ^^;;
(hvision is an old library, you know, some history problems will happen)
since TA had ported and installed them in our R217 workstation lab,
maybe you can just use them to save your time.

anyway, i will put the experience about my porting hvision to linux
on web as soon as possible.

Q:(9/26/2001)
Dear TA,
i am a part-time student of professor fuh. my research interest is
in IC Design and combining Audio and Computer Vision.
and i am not familiar with Software and Computer.
Can you help me Build an linux environment with hvision? then
i can do my work at my studio.
Here are two linux machines and one win2000 machine.
thank you.
sincerely,
L
A:
Dear L,
Here are some hints and suggestions from me,
A) How to install program?
The standard way is:
1) find the source code or files what you want to installed.
3) compile the files (make files)
4) su and install them

B) How to install the hvision library?
It is some harder, i had put some information on course web site.
the more you understand the package, the easier you can installed it.

1) tar the /usr/local/vision directory and get the compressed file
to your local linux machine, uncompress them.
1.5) if the binary can be run directly, you are so lucky, didn't need
to compile them. (but it is almost impossible!)
2) read the documents (porting, etc)
but i am sorry that i didn't document my porting experience clearly
because i didn't have free time. (so there is NO enough document)
but for an experienced unix user, that's ok without reading document.
/usr/local/vision/make/Makefile* and /usr/local/vision/linux/Makefile
and the source code are documents themself.
3) you type make world in /usr/local/vision/linux
(if some binaries are error, you should remove them and make again)
(if there are any problem and error message, you must reolve them
at that time by yourself. every machine have difference configuration,
i can't predict what will happen on your machine)
4) put binary files (in /usr/local/vision/linux) and setup all your
environment variable. then you can use hvision successfully at home.

C) i have a working notebook and had written-down some some experiences
i believe it is a very valuable treasure. if you need it, you can find me
and borrow it to copy.

sincerely,
TA

Q:(9/19/2001)
How to use Harvard hvision library?

Q:(10/19/2001)
Dear TA,
I am now able to access the hvision man page.
If I understand it correctly, I am supposed to refer to hvlist(1).
But when I "man hvlist", all I see is the manual for hvlist. How do I get
hvlist to list the functions for hvision?
Also, I notice that "man hvision" will always give me "hvision(3)".
How do I get "hvision(2)", which is supposed to have the macros for
accessing images?
Thanks again, TA.
A:
Dear F,
1) you do not need to use hvlist(1) to find all functions,
you can go to /usr/local/vision/man/ and see the file "whatis"
2) there is no hvision(2) in /usr/local/vision/man, so you could
not get hvision(2), there are only (1) and (3)  and (l).

3) maybe hvReadImage() hvWriteImage(), hvCopyImage() and hvMakeImage()
is enough for your need to access images.

4) maybe you can find more in /usr/local/vision/man/whatis,
or you can write your own code to something that is not provided
by hvision library.
sincerely,
jsyeh@cmlab, Vision

Q:(8/15/2001)
How to write a program in Unix Environment?
A:
There are three basic topics needed for writing program in unix.
1) man page
2) compiler (gcc, for c or c++)
3) editor (vi, emacs, joe, etc)
then you want to write some language other than c or c++,
there will be almost the same methodology.
(to be continue...)

for advanced programmer, it is better to learn gdb.
(to be continue...)

Q:(9/19/2001)
How to use Unix? Please introduce Unix to us!
A:
Unix is one kind of OS. it has a big family.
(ex. Linux, FreeBSD, Solaris, IRIX, AIX, etc)
for user level of view,
learning the interface "shell" may be enough.
(to be continue...)

Q:(9/19/2001)
How to use the unix shell?
A:
Here is an unix shell introduction found by google search.
(ps. i will also write my own "unix shell tutorial" latter!)

Q:(12/25/2000)
How to view *.ps and *.pdf file (the paper's format)?
*.ps is PostScript file, the standard language of printer.
*.pdf is Portable Document Fileformat, protable in many platform.
A:
You can use ghostview to view the *.ps file, the postscript file.
Some printers supporting postscript can print file directly.
Some unix environment with postscript printer can print it with lpr.
If you just want to view the file, ghostview can view it directly.
Or you can install Adobe Acrobat to translate it into pdf file and

ghostview
Ghostview

Q:(9/19/2001)
How to view *.tex (LaTeX or TeX) file?
A:
There are some methods to view the contents of *.tex file:
1) View LaTeX file directly
2) Use "latex" to compile that file to output *.dvi file
then "dvips" to convert the dvi file (device indenpend) to PostScript
which can be printed in PostScript Printer or viewed by GhostView.
3) You can also reference the FAQ: How to view *.ps and *.pdf file.
4) You can also use "latex2html" to convert tex file to html file

Q:(9/19/2001)
How to write a tex document?
A:
Here is a LaTeX Basic Tutorial.



Last updated: 4th Dec. 2001
Created: 15th Aug. 2001 by Jeng-sheng Yeh Access times:
FastCounter by bCentral