Thread: [Robotvision-commit] SF.net SVN: robotvision:[6] robotVision
Brought to you by:
phildavidson
From: <bre...@us...> - 2010-05-16 17:17:37
|
Revision: 6 http://robotvision.svn.sourceforge.net/robotvision/?rev=6&view=rev Author: brendasegal Date: 2010-05-16 17:17:31 +0000 (Sun, 16 May 2010) Log Message: ----------- Added Paths: ----------- robotVision/ robotVision/main.c Added: robotVision/main.c =================================================================== --- robotVision/main.c (rev 0) +++ robotVision/main.c 2010-05-16 17:17:31 UTC (rev 6) @@ -0,0 +1,95 @@ +#ifdef _CH_ +#pragma package <opencv> +#endif + +#define CV_NO_BACKWARD_COMPATIBILITY + +#include <cv.h> +#include <highgui.h> +#include <stdio.h> +#include <math.h> +#include <string.h> + +//not sure if it was supposed to be 8 or 16 bits +int sizeOfBitString = 8; + +//the convert function converts a gStreamer object to an OpenCV image +/* + + IplImage* convert(GSTBuffer gBuffer){ + + + + + } +*/ + + +//For the findBuoy function, the center of mass is returned as (x,y) coordinates +//this is in the form of a bit string (of what size?) where the first half corresponds +//to the x coordinate and the second half to the y coordinate +char* findBuoy(IplImage* img){ + + + char* bitString = (char*)malloc(sizeof(char)*sizeOfBitString); + + + //http://opencv.willowgarage.com/documentation/c/image_filtering.html + //smooth image cvSmooth(src, dest, smoothtype, aperture width (must be positive and odd), + //aperture height (must be positive and odd), gaussian param, another gaussian param?) + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //threshold the image till we get a black and white one + + //find the center of mass (avg pos of the white pixels) + + return bitString; + +} + +//The findPipe function works in quite the same way as findBuoy + +char* findPipe(IplImage* img){ + + + char* bitString = (char*)malloc(sizeof(char)*sizeOfBitString); + + //we smooth img + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //threshold the image till we get a black and white one + + //find the center of mass (avg pos of the white pixels) + + return bitString; + +} + + +//This will return a vector pair in the form of delta x, delta y +//this will be used to find the approximate heading of the pipe +char* findHeading(IplImage* img){ + + char* bitString = (char*)malloc(sizeof(char)*sizeOfBitString); + + //we smooth img + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //threshold the image till we get a black and white one + + //fit a rectangle to the pipeline and find approximate heading + + return bitString; + + +} + + + + + +int main(char** argv, int arg){ + + + return 0; +} Property changes on: robotVision/main.c ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bre...@us...> - 2010-05-16 17:17:38
|
Revision: 6 http://robotvision.svn.sourceforge.net/robotvision/?rev=6&view=rev Author: brendasegal Date: 2010-05-16 17:17:31 +0000 (Sun, 16 May 2010) Log Message: ----------- Added Paths: ----------- robotVision/ robotVision/main.c Added: robotVision/main.c =================================================================== --- robotVision/main.c (rev 0) +++ robotVision/main.c 2010-05-16 17:17:31 UTC (rev 6) @@ -0,0 +1,95 @@ +#ifdef _CH_ +#pragma package <opencv> +#endif + +#define CV_NO_BACKWARD_COMPATIBILITY + +#include <cv.h> +#include <highgui.h> +#include <stdio.h> +#include <math.h> +#include <string.h> + +//not sure if it was supposed to be 8 or 16 bits +int sizeOfBitString = 8; + +//the convert function converts a gStreamer object to an OpenCV image +/* + + IplImage* convert(GSTBuffer gBuffer){ + + + + + } +*/ + + +//For the findBuoy function, the center of mass is returned as (x,y) coordinates +//this is in the form of a bit string (of what size?) where the first half corresponds +//to the x coordinate and the second half to the y coordinate +char* findBuoy(IplImage* img){ + + + char* bitString = (char*)malloc(sizeof(char)*sizeOfBitString); + + + //http://opencv.willowgarage.com/documentation/c/image_filtering.html + //smooth image cvSmooth(src, dest, smoothtype, aperture width (must be positive and odd), + //aperture height (must be positive and odd), gaussian param, another gaussian param?) + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //threshold the image till we get a black and white one + + //find the center of mass (avg pos of the white pixels) + + return bitString; + +} + +//The findPipe function works in quite the same way as findBuoy + +char* findPipe(IplImage* img){ + + + char* bitString = (char*)malloc(sizeof(char)*sizeOfBitString); + + //we smooth img + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //threshold the image till we get a black and white one + + //find the center of mass (avg pos of the white pixels) + + return bitString; + +} + + +//This will return a vector pair in the form of delta x, delta y +//this will be used to find the approximate heading of the pipe +char* findHeading(IplImage* img){ + + char* bitString = (char*)malloc(sizeof(char)*sizeOfBitString); + + //we smooth img + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //threshold the image till we get a black and white one + + //fit a rectangle to the pipeline and find approximate heading + + return bitString; + + +} + + + + + +int main(char** argv, int arg){ + + + return 0; +} Property changes on: robotVision/main.c ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luc...@us...> - 2010-05-18 21:22:18
|
Revision: 9 http://robotvision.svn.sourceforge.net/robotvision/?rev=9&view=rev Author: lucyyuan Date: 2010-05-18 21:22:11 +0000 (Tue, 18 May 2010) Log Message: ----------- Moved main.c into an eclipse project. Added Paths: ----------- robotVision/.cproject robotVision/.project robotVision/src/ robotVision/src/main.c Removed Paths: ------------- robotVision/main.c Added: robotVision/.cproject =================================================================== --- robotVision/.cproject (rev 0) +++ robotVision/.cproject 2010-05-18 21:22:11 UTC (rev 9) @@ -0,0 +1,620 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?fileVersion 4.0.0?> + +<cproject> +<storageModule moduleId="org.eclipse.cdt.core.settings"> +<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690"> +<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690" moduleId="org.eclipse.cdt.core.settings" name="Debug"> +<externalSettings/> +<extensions> +<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/> +<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +</extensions> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<configuration artifactName="robotVision" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug"> +<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690." name="/" resourcePath=""> +<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1421161757" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug"> +<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1262131735" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/> +<builder buildPath="${workspace_loc:/robotVision/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1731733585" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.916992427" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug"> +<inputType id="cdt.managedbuild.tool.gnu.assembler.input.939646408" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1399357241" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.897756865" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug"> +<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1775358216" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> +<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1302295739" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.956368155" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug"> +<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1520767180" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/> +<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1344254316" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> +<option id="gnu.c.compiler.option.include.paths.2068151727" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> +<listOptionValue builtIn="false" value=""c:\OpenCV2.1\include\opencv""/> +</option> +<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.511460867" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.233881416" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"> +<option id="gnu.c.link.option.paths.1715665617" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths"> +<listOptionValue builtIn="false" value=""c:\OpenCV2.1\bin""/> +</option> +<option id="gnu.c.link.option.libs.1752808261" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs"> +<listOptionValue builtIn="false" value="cv210"/> +<listOptionValue builtIn="false" value="cxts210"/> +<listOptionValue builtIn="false" value="cvaux210"/> +<listOptionValue builtIn="false" value="cxcore210"/> +<listOptionValue builtIn="false" value="highgui210"/> +<listOptionValue builtIn="false" value="ml210"/> +</option> +<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1464597300" superClass="cdt.managedbuild.tool.gnu.c.linker.input"> +<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> +<additionalInput kind="additionalinput" paths="$(LIBS)"/> +</inputType> +</tool> +<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.564222177" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/> +</toolChain> +</folderInfo> +<sourceEntries> +<entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> +<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> +</sourceEntries> +</configuration> +</storageModule> +<storageModule moduleId="scannerConfiguration"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690;cdt.managedbuild.config.gnu.mingw.exe.debug.133517690.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.956368155;cdt.managedbuild.tool.gnu.c.compiler.input.511460867"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328;cdt.managedbuild.config.gnu.mingw.exe.release.1801193328.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1427972190;cdt.managedbuild.tool.gnu.c.compiler.input.1075011342"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +</storageModule> +<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> +<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> +<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> +<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> +</cconfiguration> +<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328"> +<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328" moduleId="org.eclipse.cdt.core.settings" name="Release"> +<externalSettings/> +<extensions> +<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/> +<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +</extensions> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<configuration artifactName="robotVision" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release"> +<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328." name="/" resourcePath=""> +<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.1389707121" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release"> +<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1331514843" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/> +<builder buildPath="${workspace_loc:/robotVision/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1760662152" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.1693371710" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release"> +<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1403395891" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.946443794" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1523968022" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release"> +<option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.2039908423" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> +<option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.1372113392" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1427972190" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release"> +<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.880816174" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/> +<option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.1046228081" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/> +<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1075011342" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.583255890" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release"> +<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1719154040" superClass="cdt.managedbuild.tool.gnu.c.linker.input"> +<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> +<additionalInput kind="additionalinput" paths="$(LIBS)"/> +</inputType> +</tool> +<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.876825897" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/> +</toolChain> +</folderInfo> +<sourceEntries> +<entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> +<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> +</sourceEntries> +</configuration> +</storageModule> +<storageModule moduleId="scannerConfiguration"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690;cdt.managedbuild.config.gnu.mingw.exe.debug.133517690.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.956368155;cdt.managedbuild.tool.gnu.c.compiler.input.511460867"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328;cdt.managedbuild.config.gnu.mingw.exe.release.1801193328.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1427972190;cdt.managedbuild.tool.gnu.c.compiler.input.1075011342"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +</storageModule> +<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> +<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> +<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> +<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> +</cconfiguration> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<project id="robotVision.cdt.managedbuild.target.gnu.mingw.exe.1911362563" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/> +</storageModule> +</cproject> Added: robotVision/.project =================================================================== --- robotVision/.project (rev 0) +++ robotVision/.project 2010-05-18 21:22:11 UTC (rev 9) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>robotVision</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <triggers>clean,full,incremental,</triggers> + <arguments> + <dictionary> + <key>?name?</key> + <value></value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.append_environment</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildArguments</key> + <value></value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildCommand</key> + <value>make</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildLocation</key> + <value>${workspace_loc:/robotVision/Debug}</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.contents</key> + <value>org.eclipse.cdt.make.core.activeConfigSettings</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableAutoBuild</key> + <value>false</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableCleanBuild</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableFullBuild</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.stopOnError</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.core.cnature</nature> + </natures> +</projectDescription> Deleted: robotVision/main.c =================================================================== --- robotVision/main.c 2010-05-17 19:11:17 UTC (rev 8) +++ robotVision/main.c 2010-05-18 21:22:11 UTC (rev 9) @@ -1,204 +0,0 @@ -#ifdef _CH_ -#pragma package <opencv> -#endif - -#define CV_NO_BACKWARD_COMPATIBILITY - -#include <cv.h> -#include <highgui.h> -#include <stdio.h> -#include <math.h> -#include <string.h> - - -//the struct is what will be used to return the values in the form of an ordered pair (x,y) - -typedef struct retValue { - - double x; - double y; - -}point; - -//need to show the method headers -/*point findBuoy(IplImage* img); -point findPipe(IplImage* img); -point findHeading(IplImage* img); -*/ - - -//the convert function converts a gStreamer object to an OpenCV image -/* - - IplImage* convert(GSTBuffer gBuffer){ - - - - - } -*/ - - -//For the findBuoy function, the center of mass is returned as (x,y) coordinates -//center of mass will either be found by averaging white pixels in binary image -//or by fitting an ellipse around the buoy - -point findBuoy(IplImage* img){ - - point p; - p.x = 0.0; - p.y = 0.0; - - - //these are the threshold values - int sthreshold=194;//210; - double hlower=178; - double hupper=3; - - //create the windows: - //this is for the original image - cvNamedWindow("orig", CV_WINDOW_AUTOSIZE); - //this is for the smoothed image - cvNamedWindow("smooth", CV_WINDOW_AUTOSIZE); - //this is for the binary image (thresholding) - cvNamedWindow("binary", CV_WINDOW_AUTOSIZE); - - //display the original image - cvShowImage("orig", img); - - //we smooth the image and store the smooth img back in img - cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); - - //display the smoothed image - cvShowImage("smooth", img); - - //these are the properties of the image - //we will use them to loop through the data array (the image buffer) - int height = img->height; - int width = img->width; - int step = img->widthStep; - int nChannels = img->nChannels; - - //this is the image buffer - uchar *data = ( uchar* )img->imageData; - - int i; int j; - - for( i = 0 ; i < height ; i++ ) { - - for( j = 0 ; j < width ; j++ ) { - - if((data[i*step + j*nChannels+2]>=hlower) && ( data[i*step + j*nChannels + 2]>=hupper)){ - - - if( ( data[i*step + j*nChannels + 2] ) >sthreshold){ - - data[i*step + j*nChannels + 0] = 255; - - data[i*step + j*nChannels + 1] = 255; - - data[i*step + j*nChannels + 2] = 255; - - } - else{ - data[i*step + j*nChannels + 0] = 0; - - data[i*step + j*nChannels + 1] = 0; - - data[i*step + j*nChannels + 2] = 0; - - } - - - } - else{ - - data[i*step + j*nChannels + 0] = 0; - - data[i*step + j*nChannels + 1] = 0; - - data[i*step + j*nChannels + 2] = 0; - - } - - - - }//end inner for loop - -}//end outer for loop - - cvErode(img,img,0,6); - cvDilate(img, img,0,10); - - //display the binary image - cvShowImage("binary", img); - - cvWaitKey(0); - - cvDestroyWindow("orig"); - cvDestroyWindow("smooth"); - cvDestroyWindow("binary"); - - - - - cvWaitKey(0); - - return p; - -} - -//the findHedge function will have to be used with a fake image we create -//(I suggest manipulating the buoy image and drawing a green hedge within it) -//since we don't have any ones to base ourselves on -//how are we going to return the values? Are we going to return a struct with three points, -//each corresponding to the center of each rectangle? Will it have to be done in the same way -//as finding the heading of the pipe? -//will we need to make a new struct then for this return value? - -/*point? findHedge(IplImage* img){ - - -} -*/ - -//The findPipe function works in quite the same way as findBuoy - -point findPipe(IplImage* img){ - - point p; - p.x = 0.0; - p.y = 0.0; - - return p; - -} - - -//This will return a vector pair in the form of delta x, delta y -//this will be used to find the approximate heading of the pipe -point findHeading(IplImage* img){ - - point p; - p.x = 0.0; - p.y = 0.0; - - return p; -} - - - - - -int main(int argc, char** argv){ - - IplImage *img = cvLoadImage( argv[1], CV_LOAD_IMAGE_COLOR ); - - //testing now findBuoy which so far only smooths the image it is - //given. I'm opening a bunch of windows with the effects produced - findBuoy(img); - - - - return 0; -} Copied: robotVision/src/main.c (from rev 8, robotVision/main.c) =================================================================== --- robotVision/src/main.c (rev 0) +++ robotVision/src/main.c 2010-05-18 21:22:11 UTC (rev 9) @@ -0,0 +1,206 @@ +#ifdef _CH_ +#pragma package <opencv> +#endif + +#define CV_NO_BACKWARD_COMPATIBILITY + +#include <cv.h> +#include <highgui.h> +#include <stdio.h> +#include <math.h> +#include <string.h> + + +//the struct is what will be used to return the values in the form of an ordered pair (x,y) + +typedef struct retValue { + + double x; + double y; + +}point; + +//need to show the method headers +/*point findBuoy(IplImage* img); +point findPipe(IplImage* img); +point findHeading(IplImage* img); +*/ + + +//the convert function converts a gStreamer object to an OpenCV image +/* + + IplImage* convert(GSTBuffer gBuffer){ + + + + + } +*/ + + +//For the findBuoy function, the center of mass is returned as (x,y) coordinates +//center of mass will either be found by averaging white pixels in binary image +//or by fitting an ellipse around the buoy + +point findBuoy(IplImage* img){ + + point p; + p.x = 0.0; + p.y = 0.0; + + + //these are the threshold values + int sthreshold=194;//210; + double hlower=178; + double hupper=3; + + //create the windows: + //this is for the original image + cvNamedWindow("orig", CV_WINDOW_AUTOSIZE); + //this is for the smoothed image + cvNamedWindow("smooth", CV_WINDOW_AUTOSIZE); + //this is for the binary image (thresholding) + cvNamedWindow("binary", CV_WINDOW_AUTOSIZE); + + //display the original image + cvShowImage("orig", img); + + //we smooth the image and store the smooth img back in img + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //display the smoothed image + cvShowImage("smooth", img); + + //these are the properties of the image + //we will use them to loop through the data array (the image buffer) + int height = img->height; + int width = img->width; + int step = img->widthStep; + int nChannels = img->nChannels; + + //this is the image buffer + uchar *data = ( uchar* )img->imageData; + + int i; int j; + + for( i = 0 ; i < height ; i++ ) { + + for( j = 0 ; j < width ; j++ ) { + + if((data[i*step + j*nChannels+2]>=hlower) && ( data[i*step + j*nChannels + 2]>=hupper)){ + + + if( ( data[i*step + j*nChannels + 2] ) >sthreshold){ + + data[i*step + j*nChannels + 0] = 255; + + data[i*step + j*nChannels + 1] = 255; + + data[i*step + j*nChannels + 2] = 255; + + } + else{ + data[i*step + j*nChannels + 0] = 0; + + data[i*step + j*nChannels + 1] = 0; + + data[i*step + j*nChannels + 2] = 0; + + } + + + } + else{ + + data[i*step + j*nChannels + 0] = 0; + + data[i*step + j*nChannels + 1] = 0; + + data[i*step + j*nChannels + 2] = 0; + + } + + + + }//end inner for loop + +}//end outer for loop + + cvErode(img,img,0,6); + cvDilate(img, img,0,10); + + //display the binary image + cvShowImage("binary", img); + + cvWaitKey(0); + + cvDestroyWindow("orig"); + cvDestroyWindow("smooth"); + cvDestroyWindow("binary"); + + + + + cvWaitKey(0); + + return p; + +} + +//the findHedge function will have to be used with a fake image we create +//(I suggest manipulating the buoy image and drawing a green hedge within it) +//since we don't have any ones to base ourselves on +//how are we going to return the values? Are we going to return a struct with three points, +//each corresponding to the center of each rectangle? Will it have to be done in the same way +//as finding the heading of the pipe? +//will we need to make a new struct then for this return value? + +/*point? findHedge(IplImage* img){ + + +} +*/ + +//The findPipe function works in quite the same way as findBuoy + +point findPipe(IplImage* img){ + + point p; + p.x = 0.0; + p.y = 0.0; + + return p; + +} + + +//This will return a vector pair in the form of delta x, delta y +//this will be used to find the approximate heading of the pipe +point findHeading(IplImage* img){ + + point p; + p.x = 0.0; + p.y = 0.0; + + return p; +} + + + + + +int main(int argc, char** argv){ + if (argc <= 1) + return 1; + + IplImage *img = cvLoadImage( argv[1], CV_LOAD_IMAGE_COLOR ); + + //testing now findBuoy which so far only smooths the image it is + //given. I'm opening a bunch of windows with the effects produced + findBuoy(img); + + + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <luc...@us...> - 2010-05-18 21:22:18
|
Revision: 9 http://robotvision.svn.sourceforge.net/robotvision/?rev=9&view=rev Author: lucyyuan Date: 2010-05-18 21:22:11 +0000 (Tue, 18 May 2010) Log Message: ----------- Moved main.c into an eclipse project. Added Paths: ----------- robotVision/.cproject robotVision/.project robotVision/src/ robotVision/src/main.c Removed Paths: ------------- robotVision/main.c Added: robotVision/.cproject =================================================================== --- robotVision/.cproject (rev 0) +++ robotVision/.cproject 2010-05-18 21:22:11 UTC (rev 9) @@ -0,0 +1,620 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?fileVersion 4.0.0?> + +<cproject> +<storageModule moduleId="org.eclipse.cdt.core.settings"> +<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690"> +<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690" moduleId="org.eclipse.cdt.core.settings" name="Debug"> +<externalSettings/> +<extensions> +<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/> +<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +</extensions> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<configuration artifactName="robotVision" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug"> +<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690." name="/" resourcePath=""> +<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1421161757" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug"> +<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1262131735" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/> +<builder buildPath="${workspace_loc:/robotVision/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1731733585" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.916992427" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug"> +<inputType id="cdt.managedbuild.tool.gnu.assembler.input.939646408" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1399357241" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.897756865" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug"> +<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1775358216" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> +<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1302295739" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.956368155" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug"> +<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1520767180" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/> +<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.1344254316" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> +<option id="gnu.c.compiler.option.include.paths.2068151727" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> +<listOptionValue builtIn="false" value=""c:\OpenCV2.1\include\opencv""/> +</option> +<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.511460867" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.233881416" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"> +<option id="gnu.c.link.option.paths.1715665617" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths"> +<listOptionValue builtIn="false" value=""c:\OpenCV2.1\bin""/> +</option> +<option id="gnu.c.link.option.libs.1752808261" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs"> +<listOptionValue builtIn="false" value="cv210"/> +<listOptionValue builtIn="false" value="cxts210"/> +<listOptionValue builtIn="false" value="cvaux210"/> +<listOptionValue builtIn="false" value="cxcore210"/> +<listOptionValue builtIn="false" value="highgui210"/> +<listOptionValue builtIn="false" value="ml210"/> +</option> +<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1464597300" superClass="cdt.managedbuild.tool.gnu.c.linker.input"> +<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> +<additionalInput kind="additionalinput" paths="$(LIBS)"/> +</inputType> +</tool> +<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.564222177" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/> +</toolChain> +</folderInfo> +<sourceEntries> +<entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> +<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> +</sourceEntries> +</configuration> +</storageModule> +<storageModule moduleId="scannerConfiguration"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690;cdt.managedbuild.config.gnu.mingw.exe.debug.133517690.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.956368155;cdt.managedbuild.tool.gnu.c.compiler.input.511460867"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328;cdt.managedbuild.config.gnu.mingw.exe.release.1801193328.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1427972190;cdt.managedbuild.tool.gnu.c.compiler.input.1075011342"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +</storageModule> +<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> +<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> +<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> +<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> +</cconfiguration> +<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328"> +<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328" moduleId="org.eclipse.cdt.core.settings" name="Release"> +<externalSettings/> +<extensions> +<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/> +<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> +</extensions> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<configuration artifactName="robotVision" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release"> +<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328." name="/" resourcePath=""> +<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.1389707121" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release"> +<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.1331514843" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/> +<builder buildPath="${workspace_loc:/robotVision/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1760662152" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.1693371710" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release"> +<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1403395891" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.946443794" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/> +<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1523968022" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release"> +<option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.2039908423" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/> +<option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.1372113392" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1427972190" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release"> +<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.880816174" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/> +<option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.1046228081" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/> +<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1075011342" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> +</tool> +<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.583255890" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release"> +<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1719154040" superClass="cdt.managedbuild.tool.gnu.c.linker.input"> +<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> +<additionalInput kind="additionalinput" paths="$(LIBS)"/> +</inputType> +</tool> +<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.876825897" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/> +</toolChain> +</folderInfo> +<sourceEntries> +<entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> +<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> +</sourceEntries> +</configuration> +</storageModule> +<storageModule moduleId="scannerConfiguration"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.133517690;cdt.managedbuild.config.gnu.mingw.exe.debug.133517690.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.956368155;cdt.managedbuild.tool.gnu.c.compiler.input.511460867"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1801193328;cdt.managedbuild.config.gnu.mingw.exe.release.1801193328.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1427972190;cdt.managedbuild.tool.gnu.c.compiler.input.1075011342"> +<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="makefileGenerator"> +<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC"> +<buildOutputProvider> +<openAction enabled="true" filePath=""/> +<parser enabled="true"/> +</buildOutputProvider> +<scannerInfoProvider id="specsFile"> +<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/> +<parser enabled="true"/> +</scannerInfoProvider> +</profile> +</scannerConfigBuildInfo> +</storageModule> +<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> +<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> +<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> +<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> +</cconfiguration> +</storageModule> +<storageModule moduleId="cdtBuildSystem" version="4.0.0"> +<project id="robotVision.cdt.managedbuild.target.gnu.mingw.exe.1911362563" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/> +</storageModule> +</cproject> Added: robotVision/.project =================================================================== --- robotVision/.project (rev 0) +++ robotVision/.project 2010-05-18 21:22:11 UTC (rev 9) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>robotVision</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <triggers>clean,full,incremental,</triggers> + <arguments> + <dictionary> + <key>?name?</key> + <value></value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.append_environment</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildArguments</key> + <value></value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildCommand</key> + <value>make</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.buildLocation</key> + <value>${workspace_loc:/robotVision/Debug}</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.contents</key> + <value>org.eclipse.cdt.make.core.activeConfigSettings</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableAutoBuild</key> + <value>false</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableCleanBuild</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.enableFullBuild</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.stopOnError</key> + <value>true</value> + </dictionary> + <dictionary> + <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.core.cnature</nature> + </natures> +</projectDescription> Deleted: robotVision/main.c =================================================================== --- robotVision/main.c 2010-05-17 19:11:17 UTC (rev 8) +++ robotVision/main.c 2010-05-18 21:22:11 UTC (rev 9) @@ -1,204 +0,0 @@ -#ifdef _CH_ -#pragma package <opencv> -#endif - -#define CV_NO_BACKWARD_COMPATIBILITY - -#include <cv.h> -#include <highgui.h> -#include <stdio.h> -#include <math.h> -#include <string.h> - - -//the struct is what will be used to return the values in the form of an ordered pair (x,y) - -typedef struct retValue { - - double x; - double y; - -}point; - -//need to show the method headers -/*point findBuoy(IplImage* img); -point findPipe(IplImage* img); -point findHeading(IplImage* img); -*/ - - -//the convert function converts a gStreamer object to an OpenCV image -/* - - IplImage* convert(GSTBuffer gBuffer){ - - - - - } -*/ - - -//For the findBuoy function, the center of mass is returned as (x,y) coordinates -//center of mass will either be found by averaging white pixels in binary image -//or by fitting an ellipse around the buoy - -point findBuoy(IplImage* img){ - - point p; - p.x = 0.0; - p.y = 0.0; - - - //these are the threshold values - int sthreshold=194;//210; - double hlower=178; - double hupper=3; - - //create the windows: - //this is for the original image - cvNamedWindow("orig", CV_WINDOW_AUTOSIZE); - //this is for the smoothed image - cvNamedWindow("smooth", CV_WINDOW_AUTOSIZE); - //this is for the binary image (thresholding) - cvNamedWindow("binary", CV_WINDOW_AUTOSIZE); - - //display the original image - cvShowImage("orig", img); - - //we smooth the image and store the smooth img back in img - cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); - - //display the smoothed image - cvShowImage("smooth", img); - - //these are the properties of the image - //we will use them to loop through the data array (the image buffer) - int height = img->height; - int width = img->width; - int step = img->widthStep; - int nChannels = img->nChannels; - - //this is the image buffer - uchar *data = ( uchar* )img->imageData; - - int i; int j; - - for( i = 0 ; i < height ; i++ ) { - - for( j = 0 ; j < width ; j++ ) { - - if((data[i*step + j*nChannels+2]>=hlower) && ( data[i*step + j*nChannels + 2]>=hupper)){ - - - if( ( data[i*step + j*nChannels + 2] ) >sthreshold){ - - data[i*step + j*nChannels + 0] = 255; - - data[i*step + j*nChannels + 1] = 255; - - data[i*step + j*nChannels + 2] = 255; - - } - else{ - data[i*step + j*nChannels + 0] = 0; - - data[i*step + j*nChannels + 1] = 0; - - data[i*step + j*nChannels + 2] = 0; - - } - - - } - else{ - - data[i*step + j*nChannels + 0] = 0; - - data[i*step + j*nChannels + 1] = 0; - - data[i*step + j*nChannels + 2] = 0; - - } - - - - }//end inner for loop - -}//end outer for loop - - cvErode(img,img,0,6); - cvDilate(img, img,0,10); - - //display the binary image - cvShowImage("binary", img); - - cvWaitKey(0); - - cvDestroyWindow("orig"); - cvDestroyWindow("smooth"); - cvDestroyWindow("binary"); - - - - - cvWaitKey(0); - - return p; - -} - -//the findHedge function will have to be used with a fake image we create -//(I suggest manipulating the buoy image and drawing a green hedge within it) -//since we don't have any ones to base ourselves on -//how are we going to return the values? Are we going to return a struct with three points, -//each corresponding to the center of each rectangle? Will it have to be done in the same way -//as finding the heading of the pipe? -//will we need to make a new struct then for this return value? - -/*point? findHedge(IplImage* img){ - - -} -*/ - -//The findPipe function works in quite the same way as findBuoy - -point findPipe(IplImage* img){ - - point p; - p.x = 0.0; - p.y = 0.0; - - return p; - -} - - -//This will return a vector pair in the form of delta x, delta y -//this will be used to find the approximate heading of the pipe -point findHeading(IplImage* img){ - - point p; - p.x = 0.0; - p.y = 0.0; - - return p; -} - - - - - -int main(int argc, char** argv){ - - IplImage *img = cvLoadImage( argv[1], CV_LOAD_IMAGE_COLOR ); - - //testing now findBuoy which so far only smooths the image it is - //given. I'm opening a bunch of windows with the effects produced - findBuoy(img); - - - - return 0; -} Copied: robotVision/src/main.c (from rev 8, robotVision/main.c) =================================================================== --- robotVision/src/main.c (rev 0) +++ robotVision/src/main.c 2010-05-18 21:22:11 UTC (rev 9) @@ -0,0 +1,206 @@ +#ifdef _CH_ +#pragma package <opencv> +#endif + +#define CV_NO_BACKWARD_COMPATIBILITY + +#include <cv.h> +#include <highgui.h> +#include <stdio.h> +#include <math.h> +#include <string.h> + + +//the struct is what will be used to return the values in the form of an ordered pair (x,y) + +typedef struct retValue { + + double x; + double y; + +}point; + +//need to show the method headers +/*point findBuoy(IplImage* img); +point findPipe(IplImage* img); +point findHeading(IplImage* img); +*/ + + +//the convert function converts a gStreamer object to an OpenCV image +/* + + IplImage* convert(GSTBuffer gBuffer){ + + + + + } +*/ + + +//For the findBuoy function, the center of mass is returned as (x,y) coordinates +//center of mass will either be found by averaging white pixels in binary image +//or by fitting an ellipse around the buoy + +point findBuoy(IplImage* img){ + + point p; + p.x = 0.0; + p.y = 0.0; + + + //these are the threshold values + int sthreshold=194;//210; + double hlower=178; + double hupper=3; + + //create the windows: + //this is for the original image + cvNamedWindow("orig", CV_WINDOW_AUTOSIZE); + //this is for the smoothed image + cvNamedWindow("smooth", CV_WINDOW_AUTOSIZE); + //this is for the binary image (thresholding) + cvNamedWindow("binary", CV_WINDOW_AUTOSIZE); + + //display the original image + cvShowImage("orig", img); + + //we smooth the image and store the smooth img back in img + cvSmooth(img, img, CV_GAUSSIAN, 3, 3, 0, 0); + + //display the smoothed image + cvShowImage("smooth", img); + + //these are the properties of the image + //we will use them to loop through the data array (the image buffer) + int height = img->height; + int width = img->width; + int step = img->widthStep; + int nChannels = img->nChannels; + + //this is the image buffer + uchar *data = ( uchar* )img->imageData; + + int i; int j; + + for( i = 0 ; i < height ; i++ ) { + + for( j = 0 ; j < width ; j++ ) { + + if((data[i*step + j*nChannels+2]>=hlower) && ( data[i*step + j*nChannels + 2]>=hupper)){ + + + if( ( data[i*step + j*nChannels + 2] ) >sthreshold){ + + data[i*step + j*nChannels + 0] = 255; + + data[i*step + j*nChannels + 1] = 255; + + data[i*step + j*nChannels + 2] = 255; + + } + else{ + data[i*step + j*nChannels + 0] = 0; + + data[i*step + j*nChannels + 1] = 0; + + data[i*step + j*nChannels + 2] = 0; + + } + + + } + else{ + + data[i*step + j*nChannels + 0] = 0; + + data[i*step + j*nChannels + 1] = 0; + + data[i*step + j*nChannels + 2] = 0; + + } + + + + }//end inner for loop + +}//end outer for loop + + cvErode(img,img,0,6); + cvDilate(img, img,0,10); + + //display the binary image + cvShowImage("binary", img); + + cvWaitKey(0); + + cvDestroyWindow("orig"); + cvDestroyWindow("smooth"); + cvDestroyWindow("binary"); + + + + + cvWaitKey(0); + + return p; + +} + +//the findHedge function will have to be used with a fake image we create +//(I suggest manipulating the buoy image and drawing a green hedge within it) +//since we don't have any ones to base ourselves on +//how are we going to return the values? Are we going to return a struct with three points, +//each corresponding to the center of each rectangle? Will it have to be done in the same way +//as finding the heading of the pipe? +//will we need to make a new struct then for this return value? + +/*point? findHedge(IplImage* img){ + + +} +*/ + +//The findPipe function works in quite the same way as findBuoy + +point findPipe(IplImage* img){ + + point p; + p.x = 0.0; + p.y = 0.0; + + return p; + +} + + +//This will return a vector pair in the form of delta x, delta y +//this will be used to find the approximate heading of the pipe +point findHeading(IplImage* img){ + + point p; + p.x = 0.0; + p.y = 0.0; + + return p; +} + + + + + +int main(int argc, char** argv){ + if (argc <= 1) + return 1; + + IplImage *img = cvLoadImage( argv[1], CV_LOAD_IMAGE_COLOR ); + + //testing now findBuoy which so far only smooths the image it is + //given. I'm opening a bunch of windows with the effects produced + findBuoy(img); + + + + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |