From ec1677606d3e636a47d4fd0853f83868b3953314 Mon Sep 17 00:00:00 2001
From: ukashanoor
Date: Fri, 7 Jul 2017 17:12:14 +0530
Subject: array declaration
---
demos/scilab2c.dem.gateway.sce | 4 +-
demos/test_dct.dem.sce | 18 ++
demos/test_idct.dem.sce | 18 ++
etc/scilab2c.start | 2 +-
help/en_US/master_help.xml | 142 +++++------
help/en_US/scilab_en_US_help/AVRADCSetup.html | 88 -------
help/en_US/scilab_en_US_help/AVRDigitalIn.html | 88 -------
help/en_US/scilab_en_US_help/AVRDigitalOut.html | 91 --------
.../scilab_en_US_help/AVRDigitalPortSetup.html | 89 -------
help/en_US/scilab_en_US_help/AVRDigitalSetup.html | 91 --------
help/en_US/scilab_en_US_help/AVRGetTimerValue.html | 83 -------
help/en_US/scilab_en_US_help/AVRPWM0SetDuty.html | 80 -------
help/en_US/scilab_en_US_help/AVRPWM0Setup.html | 98 --------
help/en_US/scilab_en_US_help/AVRPWM1SetDuty.html | 83 -------
help/en_US/scilab_en_US_help/AVRPWM1Setup.html | 100 --------
help/en_US/scilab_en_US_help/AVRPWM2SetDuty.html | 81 -------
help/en_US/scilab_en_US_help/AVRPWM2Setup.html | 97 --------
help/en_US/scilab_en_US_help/AVRReadADC.html | 84 -------
help/en_US/scilab_en_US_help/AVRSleep.html | 75 ------
help/en_US/scilab_en_US_help/AVRTimerSetup.html | 66 ------
help/en_US/scilab_en_US_help/AVRUARTReceive.html | 77 ------
help/en_US/scilab_en_US_help/AVRUARTSetup.html | 96 --------
help/en_US/scilab_en_US_help/AVRUARTTransmit.html | 77 ------
.../scilab_en_US_help/CV_AdaptiveThreshold.html | 94 --------
help/en_US/scilab_en_US_help/CV_Blur.html | 96 --------
help/en_US/scilab_en_US_help/CV_Canny.html | 95 --------
help/en_US/scilab_en_US_help/CV_CornerHarris.html | 98 --------
help/en_US/scilab_en_US_help/CV_CreateImage.html | 85 -------
help/en_US/scilab_en_US_help/CV_CvtColor.html | 90 -------
help/en_US/scilab_en_US_help/CV_Dilate.html | 99 --------
.../scilab_en_US_help/CV_DistanceTransform.html | 87 -------
help/en_US/scilab_en_US_help/CV_Erode.html | 99 --------
help/en_US/scilab_en_US_help/CV_GaussianBlur.html | 98 --------
help/en_US/scilab_en_US_help/CV_GetImgSize.html | 84 -------
help/en_US/scilab_en_US_help/CV_LoadImage.html | 88 -------
help/en_US/scilab_en_US_help/CV_MedianBlur.html | 86 -------
help/en_US/scilab_en_US_help/CV_SaveImage.html | 86 -------
help/en_US/scilab_en_US_help/CV_ShowImage.html | 86 -------
help/en_US/scilab_en_US_help/CV_Threshold.html | 90 -------
help/en_US/scilab_en_US_help/CV_WaitKey.html | 83 -------
help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS | Bin 2921 -> 3017 bytes
.../scilab_en_US_help/JavaHelpSearch/DOCS.TAB | 3 +-
.../en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS | Bin 133 -> 138 bytes
.../scilab_en_US_help/JavaHelpSearch/POSITIONS | Bin 12644 -> 13421 bytes
help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA | 2 +-
help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP | Bin 10240 -> 10240 bytes
help/en_US/scilab_en_US_help/index.html | 259 ---------------------
help/en_US/scilab_en_US_help/jhelpmap.jhm | 2 +-
help/en_US/scilab_en_US_help/jhelptoc.xml | 2 +-
.../section_0da8c7f3adca54f0475553087384b7a7.html | 259 ---------------------
.../section_473a2b9e79723ff76a7f243f85d2b6b8.html | 259 ---------------------
.../section_4d177ceb9ae128b1850140a7901a140a.html | 259 ---------------------
jar/scilab_en_US_help.jar | Bin 87193 -> 89135 bytes
macros/ASTManagement/%funcall_string.sci | 2 +
macros/ASTManagement/AST2Ccode.sci | 17 +-
macros/ASTManagement/AST_HandleCC.sci | 14 +-
macros/ASTManagement/AST_HandleEndGenFun.sci | 3 +-
macros/ASTManagement/AST_HandleFunCC.sci | 81 ++++---
macros/ASTManagement/AST_HandleFunRC.sci | 79 +++++--
macros/ASTManagement/AST_HandleFuncArray.sci | 63 +++++
macros/ASTManagement/AST_HandleFuncArray2D.sci | 69 ++++++
macros/ASTManagement/AST_HandleRC.sci | 52 +----
macros/ASTManagement/AST_ParseIfExprStruct.sci | 2 +
macros/ASTManagement/AST_ParseOperStruct.sci | 1 +
macros/ASTManagement/_funcall_string.sci | 1 +
macros/ASTManagement/lib | Bin 1896 -> 0 bytes
macros/ASTManagement/names | 2 +
macros/CCodeGeneration/C_GenDeclarations_Dup.sci | 7 +
macros/CCodeGeneration/C_IfExpression.sci | 1 +
macros/CCodeGeneration/C_WhileExpression.sci | 1 +
macros/CCodeGeneration/lib | Bin 992 -> 0 bytes
macros/ErrorMessages/lib | Bin 456 -> 0 bytes
macros/FunctionAnnotation/FA_GetOutArgInfo.sci | 15 +-
macros/FunctionAnnotation/lib | Bin 4090 -> 0 bytes
macros/FunctionList/lib | Bin 524 -> 0 bytes
macros/GeneralFunctions/lib | Bin 1068 -> 0 bytes
macros/Hardware/AVR/lib | Bin 908 -> 0 bytes
macros/Hardware/RasberryPi/lib | Bin 912 -> 0 bytes
macros/ImageProcessing/core/lib | Bin 460 -> 0 bytes
macros/ImageProcessing/highgui/lib | Bin 520 -> 0 bytes
macros/ImageProcessing/imgproc/lib | Bin 688 -> 0 bytes
macros/Scilab-Arduino/lib | Bin 652 -> 0 bytes
macros/SymbolTable/ST_GetInArgInfo.sci | 2 +-
macros/SymbolTable/ST_InsOutArg_Dup.sci | 2 +-
macros/SymbolTable/lib | Bin 688 -> 0 bytes
macros/ToolInitialization/lib | Bin 1199 -> 0 bytes
macros/findDeps/lib | Bin 847 -> 0 bytes
macros/lib | Bin 472 -> 0 bytes
macros/scilab2c.sci | 2 +-
src/c/string/strcspn/gstrcspna.c | 3 +-
.../scilabcode/mainfunction.sci | 2 +-
tests/unit_tests/test01_DCT/scilabcode/main.sci | 7 +
.../unit_tests/test02_IDCT/scilabcode/testidct.sci | 7 +
93 files changed, 436 insertions(+), 4316 deletions(-)
create mode 100644 demos/test_dct.dem.sce
create mode 100644 demos/test_idct.dem.sce
delete mode 100644 help/en_US/scilab_en_US_help/AVRADCSetup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRDigitalIn.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRDigitalOut.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRDigitalPortSetup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRDigitalSetup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRGetTimerValue.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRPWM0SetDuty.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRPWM0Setup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRPWM1SetDuty.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRPWM1Setup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRPWM2SetDuty.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRPWM2Setup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRReadADC.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRSleep.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRTimerSetup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRUARTReceive.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRUARTSetup.html
delete mode 100644 help/en_US/scilab_en_US_help/AVRUARTTransmit.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_AdaptiveThreshold.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_Blur.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_Canny.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_CornerHarris.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_CreateImage.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_CvtColor.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_Dilate.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_DistanceTransform.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_Erode.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_GaussianBlur.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_GetImgSize.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_LoadImage.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_MedianBlur.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_SaveImage.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_ShowImage.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_Threshold.html
delete mode 100644 help/en_US/scilab_en_US_help/CV_WaitKey.html
delete mode 100644 help/en_US/scilab_en_US_help/index.html
delete mode 100644 help/en_US/scilab_en_US_help/section_0da8c7f3adca54f0475553087384b7a7.html
delete mode 100644 help/en_US/scilab_en_US_help/section_473a2b9e79723ff76a7f243f85d2b6b8.html
delete mode 100644 help/en_US/scilab_en_US_help/section_4d177ceb9ae128b1850140a7901a140a.html
create mode 100644 macros/ASTManagement/AST_HandleFuncArray.sci
create mode 100644 macros/ASTManagement/AST_HandleFuncArray2D.sci
delete mode 100644 macros/ASTManagement/lib
delete mode 100644 macros/CCodeGeneration/lib
delete mode 100644 macros/ErrorMessages/lib
delete mode 100644 macros/FunctionAnnotation/lib
delete mode 100644 macros/FunctionList/lib
delete mode 100644 macros/GeneralFunctions/lib
delete mode 100644 macros/Hardware/AVR/lib
delete mode 100644 macros/Hardware/RasberryPi/lib
delete mode 100644 macros/ImageProcessing/core/lib
delete mode 100644 macros/ImageProcessing/highgui/lib
delete mode 100644 macros/ImageProcessing/imgproc/lib
delete mode 100644 macros/Scilab-Arduino/lib
delete mode 100644 macros/SymbolTable/lib
delete mode 100644 macros/ToolInitialization/lib
delete mode 100644 macros/findDeps/lib
delete mode 100644 macros/lib
create mode 100644 tests/unit_tests/test01_DCT/scilabcode/main.sci
create mode 100644 tests/unit_tests/test02_IDCT/scilabcode/testidct.sci
diff --git a/demos/scilab2c.dem.gateway.sce b/demos/scilab2c.dem.gateway.sce
index 71372e2..3346885 100644
--- a/demos/scilab2c.dem.gateway.sce
+++ b/demos/scilab2c.dem.gateway.sce
@@ -16,6 +16,8 @@ subdemolist = ["Trigonometric Identity" , "TrigonometricIdentity.dem.sce";
"Linear Regression" , "LinearRegression.dem.sce";
"Symbols", "Symbols.dem.sce";
"High Pass Filter", "Filter.dem.sce";
+ "Discrete Cosine Transform" , "test_dct.dem.sce";
+ "Inverse Cosine Transform" , "test_idct.dem.sce";
];
-subdemolist(:,2) = demopath + subdemolist(:,2);
\ No newline at end of file
+subdemolist(:,2) = demopath + subdemolist(:,2);
diff --git a/demos/test_dct.dem.sce b/demos/test_dct.dem.sce
new file mode 100644
index 0000000..b1b6247
--- /dev/null
+++ b/demos/test_dct.dem.sce
@@ -0,0 +1,18 @@
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author : Ukasha Noor
+//
+
+lines(0);
+
+global SCI2CHOME
+
+scilab2c(SCI2CHOME + "/tests/unit_tests/test01_DCT/scilabcode/main.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test01_DCT/scilabcode");
+
diff --git a/demos/test_idct.dem.sce b/demos/test_idct.dem.sce
new file mode 100644
index 0000000..b1d3339
--- /dev/null
+++ b/demos/test_idct.dem.sce
@@ -0,0 +1,18 @@
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+// Author : Ukasha Noor
+//
+
+lines(0);
+
+global SCI2CHOME
+
+scilab2c(SCI2CHOME + "/tests/unit_tests/test02_IDCT/scilabcode/testidct.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test02_IDCT/scilabcode");
+
diff --git a/etc/scilab2c.start b/etc/scilab2c.start
index 2f364c6..793b0a7 100644
--- a/etc/scilab2c.start
+++ b/etc/scilab2c.start
@@ -47,7 +47,7 @@ if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad demos\n");
pathdemos = pathconvert(root_tlbx + "/demos/scilab2c.dem.gateway.sce",%f,%t);
-// add_demo(gettext("Scilab2C"),pathdemos);
+ add_demo(gettext("Scilab2C"),pathdemos);
clear pathdemos ;
end
diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml
index 90e0f8d..8936dc7 100644
--- a/help/en_US/master_help.xml
+++ b/help/en_US/master_help.xml
@@ -1,41 +1,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
]>
Function to initialise ADC of AVR
AVRADCSetup(uint8 prescaler, uint8 adc_ref)
prescaler to be used for generating ADC clock (0-7)
reference voltage to be used for ADC conversion
This function initialises ADc of AVR with given parameters. 'prescaler' is needed for deciding ADC clock. ADC clock should be between 50KHz and 200KHz and it given as (MCU clock/2^prescaler). Select appropriate prescaler depending on MCU clock. 'adc_ref' selects one of the available reference voltage sources available.
-The adc_ref can take the following values- -
0 -> Voltage on VREF pin
1 -> Voltage on AVCC pin
2 -> Internal 2.56 reference voltage
This is curretly dummy function. It provides no functionality but is required for providing support for generating C code for AVR.
-Function to get state (high\low) of a digital input pin on AVR
state=AVRDigitalIn(port,pin)
port of microcontroller to be used
pin of port (mentioned above) to be used
Each AVR microcontroller has pins which can be configured as digital -inputs. These are normally divided among some 'ports' (group of pins). -User has to select one of these port and which pin of that port as -digital input.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to change state (high\low) of a digital output pin on AVR
AVRDigitalOut(port,pin,state)
port of microcontroller to be used
pin of port (mentioned above) to be used
state to be outputed on pin (HIGH\LOW)
Each AVR microcontroller has pins which can be configured as digital -outputs. These are normally divided among some 'ports' (group of pins). -User has to select one of these port and which pin of that port as -digital output. Also, desired output state must be specified as -'HIGH' or 'LOW'.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to decide direction of port on AVR
AVRDigitalPortSetup(port,direction)
port of microcontroller to be used(1 for PORTA, 2 for PORTB,...)
direction to be set for pin (0 for INPUT, 1 for OUTPUT)
Each AVR microcontroller has pins which can be configured as digital -outputs/inputs. These are normally divided among some 'ports' (group of pins). -User has to select one of these port and which pin of that port to be -used as digital output/input. Also, desired direction must be specified as -'INPUT' or 'OUTPUT'.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to decide direction of a digital pin on AVR
AVRDigitalSetup(port,pin,direction)
port of microcontroller to be used
pin of port (mentioned above) to be used
direction to be set for pin (INPUT\OUTPUT)
Each AVR microcontroller has pins which can be configured as digital -outputs/inputs. These are normally divided among some 'ports' (group of pins). -User has to select one of these port and which pin of that port to be -used as digital output/input. Also, desired direction must be specified as -'INPUT' or 'OUTPUT'.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to get timer count
timer whose current count is to be returned
This function returns the count value of a desired timer.By knowing the count value certain interrupt action can be taken.
-Timer can take the following values -
0 -> for timer0
1 -> for timer1
2 -> for timer2
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to Set Duty cycle of PWM Output generated by Timer0 at OC0 pin.
It holds an integer value from 0 to 100 which sets the percentage of time for which signal is active.
Each Micro controller has PWM output pins which can generate varying voltage -from 0V-5V.In this function by varying the duty cycle, varying voltage can be produced.
-This is curretly dummy function. It provides no functionality but is required for providing support for generating C code for AVR.
-Function to Setup OC0 pin for required PWM mode
integer, from 0 to 2
integer, from 0 to 1 (or 2) depending on the waveform_mode
Every Micro controller has PWM pins which can generate varying voltages -from 0V-5V.This function helps to use OC0 pin to produce required -output waveform by setting the waveform mode and otput mode.
-waveform_mode can take values- -
0 -> for Phase correct PWM Mode
1 -> for Fast PWM Mode
2 -> for CTC Mode
output_mode can take values- -
0 for Clear OC0 on compare match when up-counting. Set OC0 on compare match when down-counting.
1 for Set OC0 on compare match when up-counting. Clear OC0 on compare match when down-counting.
0 for non-inverted output i.e Clear OC0 on compare match, set OC0 at BOTTOM.
1 for inverted output i.e Set OC0 on compare match, clear OC0 at BOTTOM.
0 to Clear OC0 on compare match
1 to Set OC0 on compare match
2 to toggle OC0 on compare match
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to Set Duty cycle of PWM Output generated by Timer1 at OC1A or OC1B pin.
integer, 0 (for OC1A) or 1 (for OC1B)
It holds an integer value from 0 to 100 which sets the percentage of time for which signal is active.
It holds an integer value from 0 to 65535.This value sets the Top value of the counter TCNT1 i.e ICR.(for more info refer datasheet)
Each Micro controller has PWM output pins which can generate varying voltage -from 0V-5V.This function Sets the duty cycle of output PWM signal.Also this function -decides the Top Vale of TCNT1 and the output pin to output PWM signal.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Example -AVRPWM1SetDuty(0,50,40000); //This function will produce PWM signal of 50% duty cycle on OC1A pin and TCNT1 will reset at 40000 instead at 65535.
Function to Setup OC1A or OC1B pin for required PWM mode
integer, from 0 to 2
integer, from 0 to 1 (or 2) depending on the waveform_mode
0 (for OC1A) or 1 for (OC1B)
Every Micro controller has PWM pins which can generate varying voltages -from 0V-5V.This function helps to use OC1A or OC1B pin to produces required -output waveform by setting the waveform mode and otput mode.
-waveform_mode can take values- -
0 -> for Phase correct PWM Mode
1 -> for Fast PWM Mode
2 -> for CTC Mode
output_mode can take values- -
0 for Clear OC1A or OC1B on compare match when up-counting. Set OC1A or OC1B on compare match when down-counting.
1 for Set OC1A or OC1B on compare match when up-counting. Clear OC1A or OC1B on compare match when down-counting.
0 for non-inverted output i.e Clear OC1A or OC1B on compare match, set OC1A or OC1B at BOTTOM.
1 for inverted output i.e Set OC1A or OC1B on compare match, clear OC1A or OC1B at BOTTOM.
0 to Clear OC1A or OC1B on compare match
1 to Set OC1A or OC1B on compare match
2 to toggle OC1A or OC1B on compare match
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Example -AVRPWM1Setup(2,0,0); //This function will select CTC mode and will clear OC1A or OC1B -on compare match.Also as defined the output will be produced at -0C1A pin.
Function to Set Duty cycle of PWM Output generated by Timer2 at OC2 pin.
It holds an integer value from 0 to 100 which sets the percentage of time for which signal is active.
Each Micro controller has PWM output pins which can generate varying voltage -from 0V-5V.In this function by varying the duty cycle, varying voltage can be -produced.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Example -AVRPWM2SetDuty(50); //Produces 2.5V at OC2 pin -AVRPWM2SetDuty(0); //Produces 0V at OC2 pin
-Function to Setup OC2 pin for required PWM mode
integer, from 0 to 2
integer, from 0 to 1 (or 2) depending on the waveform_mode
Every Micro controller has PWM pins which can generate varying voltages -from 0V-5V.This function helps to use OC2 pin to produces required -output waveform by setting the waveform mode and otput mode.
-waveform_mode can take values- -
0 -> for Phase correct PWM Mode
1 -> for Fast PWM Mode
2 -> for CTC Mode
output_mode can take values- -
0 for Clear OC2 on compare match when up-counting. Set OC2 on compare match when down-counting.
1 for Set OC2 on compare match when up-counting. Clear OC2 on compare match when down-counting.
0 for non-inverted output i.e Clear OC2 on compare match, set OC2 at BOTTOM.
1 for inverted output i.e Set OC2 on compare match, clear OC2 at BOTTOM.
0 to Clear OC2 on compare match
1 to Set OC2 on compare match
2 to toggle OC2 on compare match
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Example -AVRPWM2Setup(2,0); //This function will select CTC waveform mode and will clear OC2 on -compare match
Function to get voltage on analog pin on AVR
u8AVRReadADCs(channel)
Select which channel is to be read. Values from 0-7 select one of the pins ADC0-ADC7. For other possible channel values refer datasheet
This function returns digital value for present on adc pins. 'channel' -selects which of the ADC0-ADC7 is to be used for reading analog value. -Apart from reading just ADC0-ADC7 other it can also read differential -voltages between some pins. For channel values for those options, please -refer datasheet.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to pause the execution for the given time.
This function causes the execution to stop for the given amount of time.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to setup Timers in ATmega16
Function to Receive Char value send to ATmega16 using UART or USART.
This function Receives Char as 8 bit value.This value is stored in UDR at receiving -end.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-Function to Setup Serial Communication i.e UART or USART in ATmega16.
integer, from 0 to 2
Enter one of the following available baudrates (2400 , 4800 , 9600 , 14400 , 19200 , 28800 , 38400 , 57600 , 768000 , 115200 , 230400 , 250000 , 1000000)
integer, (0 for one stopbit) or (1 for two stopbits)
integer, from 0 to 2
This function Setup the UART or USART for Serial Communicaion between ATmega16 -and different micro controllers or between ATmega16 and Computer.
-mode can take values: -
0 for Asynchronous Normal mode
1 for Asynchronous Double Speed mode
2 for Synchronous mode
parity can take values: -
0 for parity disabled
1 for even parity
2 for odd parity
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-AVRUARTSetup(0,9600,0,0); //This function will enable UART Communication for ATmega16 -with 9600 as baudrate,one stop bit and parity disabled |
Function to Transmit data using UART or USART.
This function Tranmits data over UART or USART.The data to be transmitted can -be a Char , String , Unsigned Int, Signed Int.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for AVR.
-function to adaptively threshold input image
dst = CV_AdaptiveThreshold(srcimg,max_value,adaptive_method,thresh_type,blk_size,c)
Source 8-bit single-channel image.
Non-zero value assigned to the pixels for which the condition is satisfied. See the details below.
Adaptive thresholding algorithm to use, ADAPTIVE_THRESH_MEAN_C or ADAPTIVE_THRESH_GAUSSIAN_C .
Thresholding type that must be either THRESH_BINARY or THRESH_BINARY_INV .
Size of a pixel neighborhood that is used to calculate a threshold value for the pixel: 3, 5, 7, and so on.
Constant subtracted from the mean or weighted mean.Normally, it is positive but may be zero or negative as well.
This function can be used for adaptively threshold given image
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_AdaptiveThreshold(img,255,"ADAPTIVE_THRESH_MEAN_C", ... -"THRESH_BINARY",5,0) |
function to blur image using normalised box filter
dst = CV_Blur(srcimg,ksize_width,ksize_height,anchor_x,anchor_y,border_type)
Source image.
blurring kernel size.
x,y coordinates of anchor point
border mode used to extrapolate pixels outside of the image.
This function can be used for blurring image using normalised box -filter. Image can be of any depth and have any no of channels.
-border_type can be : -
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_Blur(img,3,3,-1,-1,"BORDER_CONSTANT") |
Finds edges in image using Canny algorithm
edges = CV_Canny(srcimg,threhold1,threshold2,aperture_size,L2gradient)
single-channel 8-bit input image.
first threshold for the hysteresis procedure.
second threshold for the hysteresis procedure.
aperture size for the Sobel() operator.
a flag, indicating whether a more accurate
This function can be used for finding edes in single channel 8 bit -image. 'aperture_size' and 'L2gradient' are optionals. By default, -aperture_size is 3 and L2gradient is false.
-For L2gradient: L_2 norm =sqrt{(dI/dx)^2 + (dI/dy)^2} should be used to calculate the image gradient magnitude (L2gradient=1 ), or whether the default L_1 norm =|dI/dx|+|dI/dy| is enough (L2gradient=0).
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-Finds edges in image using Harris algorithm
edges = CV_CornerHarris(srcimg,blocksize,ksize,k,border_type)
Input single-channel 8-bit or floating-point image.
Neighborhood size
Aperture parameter for the Sobel() operator.
Harris detector free parameter.
border mode used to extrapolate pixels outside of the image.
The function runs the Harris edge detector on the image. For each pixel (x, y) it calculates a 2 * 2 gradient covariance matrix M(x,y) over a blockSize * blockSize neighborhood. Then, it computes the following characteristic: dst(x,y) = det(M(x,y)) - k .tr(M(x,y))^2. Corners in the image can be found as the local maxima of this response map.
-border_type can be : -
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-function to create an image object of given size and type
CV_CreateImage(image_size,bit_depth,no_of_channels)
width and height of image
Bit depth of image elements
no of channels per pixels
This function can be used to create opencv image object. For more info about bit depth and channels,please refer to OpenCV documentation
-This is curretly dummy function. It provides no functionality but is required for providing support for generating C code for OpenCV
-function to convert image from one colorspace to other colorspace
CV_CvtColor(srcimg,code)
source image to be converted
destination image in which to store converted image
String specifying conversion type. Same as defined in OpenCV. for eg. 'CV_RGB2GRAY' for conversion from RGB image to grayscale image
no of channels in destination image (0 by default)
This function can be used for converting an image to other colorspace. -Refer OpenCV documentation for list of available conversions
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_CvtColor(img,'CV_RGB2GRAY') |
dilates an image by using a specific structuring element.
cvtimg = CV_Dilate(srcimg,dilation_type,dilation_size,[iterations,border_type,border_value])
input image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
can be one of MORPH_RECT, MORPH_CROSS,MORPH_ELLIPSE
size of kernel to be used for erosion. Must be odd
number of times erosion is applied.
pixel extrapolation method.
border value in case of a constant border
This function can be used for eroding an image. Kernel used for erosion is decided by type and size. Size must always be odd. Anchor pint of kernel is always center of kernel. Input arguements 'iterations(1), border_type(BORDER_CONSTANT) and border_value' are optionals. Whwn not specified, default values as as mentioned in brackets.
-border_type can be : -
BORDER_REPLICATE: aaaaaa|abcdefgh|hhhhhhh
BORDER_REFLECT: fedcba|abcdefgh|hgfedcb
BORDER_REFLECT_101: gfedcb|abcdefgh|gfedcba
BORDER_WRAP: cdefgh|abcdefgh|abcdefg
BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_Erode(img,"MORPH_RECT",3,1,"BORDER_CONSTANT",0); |
function to calculate distance to closest zero pixels for each pixel
dst = CV_DistanceTransform(srcimg,distance_type,mask_size)
Source 8-bit single-channel image.
Type of distance. It can be CV_DIST_L1, CV_DIST_L2 , or CV_DIST_C
Size of the distance transform mask
This function can be used to calculate distance to closest zero pixel for each pixel of the source image. Output is 32 bit floatingpoint, single channel image of the same size as that of source image.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_DistanceTransform(img,"CV_DIST_L1",3) |
Erodes an image by using a specific structuring element.
cvtimg = CV_Erode(srcimg,erosion_type,erosion_size,[iterations,border_type,border_value])
input image; the number of channels can be arbitrary, but the depth should be one of CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
can be one of : MORPH_RECT, MORPH_CROSS, MORPH_ELLIPSE
size of kernel to be used for erosion. Must be odd
number of times erosion is applied.
pixel extrapolation method.
border value in case of a constant border
This function can be used for eroding an image. Kernel used for erosion is decided by type and size. Size must always be odd. Anchor pint of kernel is always center of kernel. Input arguements 'iterations(1), border_type(BORDER_CONSTANT) and border_value' are optionals. Whwn not specified, default values as as mentioned in brackets.
-border_type can be : -
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_Erode(img,"MORPH_RECT",3,1,"BORDER_CONSTANT",0); |
function to blur image using gaussian filter
cvtimg = CV_GaussianBlur(srcimg,ksize_width,ksize_height,sigma_x,sigma_y,border_type)
Source image.
blurring kernel size. must be odd.
Gaussian kernel standard deviation in X direction.
Gaussian kernel standard deviation in Y direction;
border mode used to extrapolate pixels outside of the image.
This function can be used for blurring image using gaussian filter. Image can be of any depth and have any no of channels.
-For sigmaX and sigmaY : if sigmaY is zero, it is set to be equal to sigmaX, if both sigmas are zeros, they are computed from ksize.width and ksize.height , respectively.
-border_type can be : -
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_GaussianBlur(img,3,3,0,0,"BORDER_CONSTANT") |
function to get size of the image (width*height)
CV_GetImgSize(img)
image whose size is to be returned
This function can be used for retriving size information of the image. -It returs an array with first image element as width and second as height
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -size = CV_GetImgSize(img) |
function to load an image object from given filename
CV_LoadImage(filename,loadtype)
name of file to be opened
desired load method
This function can be used for loading a previously stored image
-loadtype can take the following values: -
less than 0 -> image is loaded as is (with alpha channel)
0 -> image is loaded as greyscale
greater than 0 -> 3 channel color image is loaded
This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-function to blur image using median filter
cvtimg = CV_MedianBlur(srcimg,ksize)
input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U.
aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...
This function can be used for blurring image using median -filter. Image can be of any depth and have any no of channels.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_MedianBlur(img,3) |
function to save an image object as a given filename
CV_SaveImage(filename,img)
name of file image to be saved as
image to be saved
This function can be used for saving image. File format is detected -from file extension
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-function to show an image
CV_ShowImage(img) -CV_ShowImage(winname,img)
name of window in which img is to be shown
image to be shown already acquired (from file/camera)
This function can be used for showing images
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-function to threshold input image
dst = CV_Threshold(srcimg,code,threshold,max_value,thresh_type)
source image to be converted
threshold value
maximum value to be used with THRESH_BINARY and THRESH_BINARY_INV
Type for threshold. It can one of the following: THRESH_BINARY, THRESH_BINARY_INV, THRESH_TRUNC, THRESH_TOZERO, THRESH_TOZERO_INV
This function can be used for converting an image to other colorspace. -Refer OpenCV documentation for list of available conversions
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-img = CV_LoadImage('~/test.jpg',0) -dst = CV_Threshold(img,100,255,'THRESH_BINARY') |
function similar to cvWaitKey
CV_WaitKey(delay)
waiting delay, if 0 then wait till keypress
This function can be used for inseting some delay. This function must -follow CV_ShowImage to display image.
-This is curretly dummy function. It provides no functionality but is required -for providing support for generating C code for OpenCV
-