Skip to content
This repository was archived by the owner on Feb 16, 2019. It is now read-only.

Commit e2ca803

Browse files
authored
fixed runvx examples in README.md
2 parents 7c0a9c5 + 37975eb commit e2ca803

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

runvx/README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -288,18 +288,18 @@ This project uses OpenCV for camera capture and image display.
288288
Here are few examples that demonstrate use of RUNVX prototyping tool.
289289

290290
### Canny Edge Detector
291-
This example demonstrates building OpenVX graph for Canny edge detector. Use [raja-koduri-640x480.jpg](http://cdn5.applesencia.com/wp-content/blogs.dir/17/files/2013/04/raja-koduri-640x480.jpg) for this example.
291+
This example demonstrates building OpenVX graph for Canny edge detector. Use [face1.jpg](https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-core/blob/master/examples/images/face1.jpg) for this example.
292292

293293
% runvx[.exe] file canny.gdf
294294

295295
File **canny.gdf**:
296296

297297
# create input and output images
298-
data input = image:640,480,RGB2
299-
data output = image:640,480,U008
298+
data input = image:480,360,RGB2
299+
data output = image:480,360,U008
300300

301301
# specify input source for input image and request for displaying input and output images
302-
read input raja-koduri-640x480.jpg
302+
read input examples/images/face1.jpg
303303
view input inputWindow
304304
view output edgesWindow
305305

@@ -315,28 +315,28 @@ File **canny.gdf**:
315315
node org.khronos.openvx.canny_edge_detector luma hyst gradient_size !NORM_L1 output
316316

317317
### Skintone Pixel Detector
318-
This example demonstrates building OpenVX graph for pixel-based skin tone detector [Peer et al. 2003]. Use [raja-koduri-640x480.jpg](http://cdn5.applesencia.com/wp-content/blogs.dir/17/files/2013/04/raja-koduri-640x480.jpg) for this example.
318+
This example demonstrates building OpenVX graph for pixel-based skin tone detector [Peer et al. 2003]. Use [face1.jpg](https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-core/blob/master/examples/images/face1.jpg) for this example.
319319

320320
% runvx[.exe] file skintonedetect.gdf
321321

322322
File **skintonedetect.gdf**:
323323

324324
# create input and output images
325-
data input = image:640,480,RGB2
326-
data output = image:640,480,U008
327-
325+
data input = image:480,360,RGB2
326+
data output = image:480,360,U008
327+
328328
# specify input source for input image and request for displaying input and output images
329-
read input raja-koduri-640x480.jpg
329+
read input examples/images/face1.jpg
330330
view input inputWindow
331331
view output skintoneWindow
332-
332+
333333
# threshold objects
334334
data thr95 = threshold:BINARY,UINT8:INIT,95 # threshold for computing R > 95
335335
data thr40 = threshold:BINARY,UINT8:INIT,40 # threshold for computing G > 40
336336
data thr20 = threshold:BINARY,UINT8:INIT,20 # threshold for computing B > 20
337337
data thr15 = threshold:BINARY,UINT8:INIT,15 # threshold for computing R-G > 15
338338
data thr0 = threshold:BINARY,UINT8:INIT,0 # threshold for computing R-B > 0
339-
339+
340340
# virtual image objects for intermediate results
341341
data R = image-virtual:0,0,U008
342342
data G = image-virtual:0,0,U008
@@ -351,27 +351,28 @@ File **skintonedetect.gdf**:
351351
data and1 = image-virtual:0,0,U008
352352
data and2 = image-virtual:0,0,U008
353353
data and3 = image-virtual:0,0,U008
354-
354+
355355
# extract R,G,B channels and compute R-G and R-B
356356
node org.khronos.openvx.channel_extract input !CHANNEL_R R # extract R channel
357357
node org.khronos.openvx.channel_extract input !CHANNEL_G G # extract G channel
358358
node org.khronos.openvx.channel_extract input !CHANNEL_B B # extract B channel
359359
node org.khronos.openvx.subtract R G !SATURATE RmG # compute R-G
360360
node org.khronos.openvx.subtract R B !SATURATE RmB # compute R-B
361-
361+
362362
# compute threshold
363363
node org.khronos.openvx.threshold R thr95 R95 # compute R > 95
364364
node org.khronos.openvx.threshold G thr40 G40 # compute G > 40
365365
node org.khronos.openvx.threshold B thr20 B20 # compute B > 20
366366
node org.khronos.openvx.threshold RmG thr15 RmG15 # compute RmG > 15
367367
node org.khronos.openvx.threshold RmB thr0 RmB0 # compute RmB > 0
368-
368+
369369
# aggregate all thresholded values to produce SKIN pixels
370370
node org.khronos.openvx.and R95 G40 and1 # compute R95 & G40
371371
node org.khronos.openvx.and and1 B20 and2 # compute B20 & and1
372372
node org.khronos.openvx.and RmG15 RmB0 and3 # compute RmG15 & RmB0
373373
node org.khronos.openvx.and and2 and3 output # compute and2 & and3 as output
374374

375+
375376
### Feature Tracker
376377
The feature tracker example demonstrates building an application with two
377378
separate graphs that uses Harris Corners and Optical Flow kernels.

0 commit comments

Comments
 (0)