关于arduino OV7670撷取图片
本帖最后由 peter11016 于 2012-10-13 14:09 编辑目前是要用摄像头采集数据。
Arduino mega2560和OV7670摄像头模組
但是没有丝毫头绪啊。
网上也找不到相关教程……
我是想要用SCCB来撷取图片暂存就好了
买的时候有附代码,可是是AVR的
所以不知道有大大可以教导一下如何使用吗 弘毅版主来解决吧,俺也期待 我也在研究这一块,我目前打算做一个web server +摄像头,用MEGA 2560,不过是VC0706的例子,目前我收集到这么一个网页,上面就有这么一个移动侦测的例子:
https://github.com/adafruit/Adafruit-VC0706-Serial-Camera-Library
点examples里面就有移动侦测的例子,库文件也都在,不过目前没有尝试过,原技术讨论地址:http://arduino.cc/forum/index.php/topic,115501.msg869131.html#msg869131 N176CM 发表于 2012-10-14 13:08 static/image/common/back.gif
我也在研究这一块,我目前打算做一个web server +摄像头,用MEGA 2560,不过是VC0706的例子,目前我收集到这 ...
感谢您
不过我有试过了这VC0706跟OV7670晶片使用不同
试过了没办法
感谢您的回答 我也在用ov7670 不过 avr 的等我改天把它改成arduino的再发出来共享。这两天没时间。 模块倒是买了很久了 其实只要把相对应的命令改改就可以了。 vc7060里面的 .h文件
或者你把avr ov7670的代码发上来。 有阿在夾帶檔裡
还是要贴在回文中 Pizzro 发表于 2012-10-16 12:30 static/image/common/back.gif
其实只要把相对应的命令改改就可以了。 vc7060里面的 .h文件
或者你把avr ov7670的代码发上来。
Adafruit_VC0706.h
/***************************************************
This is a library for the Adafruit TTL JPEG Camera (VC0706 chipset)
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/products/397
These displays use Serial to communicate, 2 pins are required to interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#if ARDUINO >= 100
#include "Arduino.h"
#include "SoftwareSerial.h"
#else
#include "WProgram.h"
#include "NewSoftSerial.h"
#endif
#define VC0706_RESET0x26
#define VC0706_GEN_VERSION 0x11
#define VC0706_READ_FBUF 0x32
#define VC0706_GET_FBUF_LEN 0x34
#define VC0706_FBUF_CTRL 0x36
#define VC0706_DOWNSIZE_CTRL 0x54
#define VC0706_DOWNSIZE_STATUS 0x55
#define VC0706_READ_DATA 0x30
#define VC0706_WRITE_DATA 0x31
#define VC0706_COMM_MOTION_CTRL 0x37
#define VC0706_COMM_MOTION_STATUS 0x38
#define VC0706_COMM_MOTION_DETECTED 0x39
#define VC0706_MOTION_CTRL 0x42
#define VC0706_MOTION_STATUS 0x43
#define VC0706_TVOUT_CTRL 0x44
#define VC0706_OSD_ADD_CHAR 0x45
#define VC0706_STOPCURRENTFRAME 0x0
#define VC0706_STOPNEXTFRAME 0x1
#define VC0706_RESUMEFRAME 0x3
#define VC0706_STEPFRAME 0x2
#define VC0706_640x480 0x00
#define VC0706_320x240 0x11
#define VC0706_160x120 0x22
#define VC0706_MOTIONCONTROL 0x0
#define VC0706_UARTMOTION 0x01
#define VC0706_ACTIVATEMOTION 0x01
#define VC0706_SET_ZOOM 0x52
#define VC0706_GET_ZOOM 0x53
#define CAMERABUFFSIZ 100
#define CAMERADELAY 10
class Adafruit_VC0706 {
public:
#if ARDUINO >= 100
Adafruit_VC0706(SoftwareSerial *ser); // Constructor when using SoftwareSerial
#else
Adafruit_VC0706(NewSoftSerial*ser); // Constructor when using NewSoftSerial
#endif
Adafruit_VC0706(HardwareSerial *ser); // Constructor when using HardwareSerial
boolean begin(uint16_t baud = 38400);
boolean reset(void);
boolean TVon(void);
boolean TVoff(void);
boolean takePicture(void);
uint8_t *readPicture(uint8_t n);
boolean resumeVideo(void);
uint32_t frameLength(void);
char *getVersion(void);
uint8_t available();
uint8_t getDownsize(void);
boolean setDownsize(uint8_t);
uint8_t getImageSize();
boolean setImageSize(uint8_t);
boolean getMotionDetect();
uint8_t getMotionStatus(uint8_t);
boolean motionDetected();
boolean setMotionDetect(boolean f);
boolean setMotionStatus(uint8_t x, uint8_t d1, uint8_t d2);
boolean cameraFrameBuffCtrl(uint8_t command);
uint8_t getCompression();
boolean setCompression(uint8_t c);
boolean getPTZ(uint16_t &w, uint16_t &h, uint16_t &wz, uint16_t &hz, uint16_t &pan, uint16_t &tilt);
boolean setPTZ(uint16_t wz, uint16_t hz, uint16_t pan, uint16_t tilt);
void OSD(uint8_t x, uint8_t y, char *s); // isnt supported by the chip :(
private:
uint8_tserialNum;
uint8_tcamerabuff;
uint8_tbufferLen;
uint16_t frameptr;
#if ARDUINO >= 100
SoftwareSerial *swSerial;
#else
NewSoftSerial*swSerial;
#endif
HardwareSerial *hwSerial;
void common_init(void);
boolean runCommand(uint8_t cmd, uint8_t args[], uint8_t argn, uint8_t resp, boolean flushflag = true);
void sendCommand(uint8_t cmd, uint8_t args[], uint8_t argn);
uint8_t readResponse(uint8_t numbytes, uint8_t timeout);
boolean verifyResponse(uint8_t command);
void printBuff(void);
};
我最近实在没有时间。 想弄。 建议你去 github.com 上面去搜索一下 看有现成的 7670的不 可以进行视频的采集是吗 我也在做,不知道你做出来了吗? 楼主,你这个压缩文件怎么用?不明白 我在用VC0706
页:
[1]