GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added code documentation and gave variables to more self-explanatory … · fantasywolf/code@a7a56c7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Chapter2_iPhoneAR/Example_MarkerBasedAR/Example_MarkerBasedAR
    • BGRAVideoFrame.h
    • CameraCalibration.hpp
    • EAGLView.h
    • EAGLView.m
    • Marker.cpp
    • Marker.hpp
    • MarkerDetector.cpp
    • MarkerDetector.hpp
    • SimpleVisualizationController.h
    • SimpleVisualizationController.mm
    • VideoSource.mm
    • ViewController.h
    • ViewController.mm
    • en.lproj
      • InfoPlist.strings
      • MainStoryboard_iPad.storyboard
      • MainStoryboard_iPhone.storyboard
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Chapter2_iPhoneAR/Example_MarkerBasedAR/Example_MarkerBasedAR/BGRAVideoFrame.h‎

Copy file name to clipboard
100755100644
+29-27Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
/*****************************************************************************
2-
* BGRAVideoFrame.h
3-
* Example_MarkerBasedAR
4-
******************************************************************************
5-
* by Khvedchenia Ievgen, 5th Dec 2012
6-
* http://computer-vision-talks.com
7-
******************************************************************************
8-
* Ch2 of the book "Mastering OpenCV with Practical Computer Vision Projects"
9-
* Copyright Packt Publishing 2012.
10-
* http://www.packtpub.com/cool-projects-with-opencv/book
11-
*****************************************************************************/
12-
13-
#ifndef Example_MarkerBasedAR_BGRAVideoFrame_h
14-
#define Example_MarkerBasedAR_BGRAVideoFrame_h
15-
16-
// A helper struct presenting interleaved BGRA image in memory.
17-
struct BGRAVideoFrame
18-
{
19-
size_t width;
20-
size_t height;
21-
size_t stride;
22-
23-
uint8_t * data;
24-
};
25-
26-
27-
#endif
1+
/*****************************************************************************
2+
* BGRAVideoFrame.h
3+
* Example_MarkerBasedAR
4+
******************************************************************************
5+
* by Khvedchenia Ievgen, 5th Dec 2012
6+
* http://computer-vision-talks.com
7+
******************************************************************************
8+
* Ch2 of the book "Mastering OpenCV with Practical Computer Vision Projects"
9+
* Copyright Packt Publishing 2012.
10+
* http://www.packtpub.com/cool-projects-with-opencv/book
11+
*****************************************************************************/
12+
13+
#ifndef Example_MarkerBasedAR_BGRAVideoFrame_h
14+
#define Example_MarkerBasedAR_BGRAVideoFrame_h
15+
16+
#include <cstddef>
17+
18+
// A helper struct presenting interleaved BGRA image in memory.
19+
struct BGRAVideoFrame
20+
{
21+
size_t width;
22+
size_t height;
23+
size_t stride;
24+
25+
unsigned char * data;
26+
};
27+
28+
29+
#endif
Collapse file

‎Chapter2_iPhoneAR/Example_MarkerBasedAR/Example_MarkerBasedAR/CameraCalibration.hpp‎

Copy file name to clipboard
100755100644
+41-40Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
1-
/*****************************************************************************
2-
* CameraCalibration.hpp
3-
* Example_MarkerBasedAR
4-
******************************************************************************
5-
* by Khvedchenia Ievgen, 5th Dec 2012
6-
* http://computer-vision-talks.com
7-
******************************************************************************
8-
* Ch2 of the book "Mastering OpenCV with Practical Computer Vision Projects"
9-
* Copyright Packt Publishing 2012.
10-
* http://www.packtpub.com/cool-projects-with-opencv/book
11-
*****************************************************************************/
12-
13-
#ifndef Example_MarkerBasedAR_CameraCalibration_hpp
14-
#define Example_MarkerBasedAR_CameraCalibration_hpp
15-
16-
////////////////////////////////////////////////////////////////////
17-
// File includes:
18-
#include "GeometryTypes.hpp"
19-
20-
/**
21-
* A camera calibraiton class that stores intrinsic matrix and distorsion coefficients.
22-
*/
23-
class CameraCalibration
24-
{
25-
public:
26-
CameraCalibration();
27-
CameraCalibration(float fx, float fy, float cx, float cy);
28-
CameraCalibration(float fx, float fy, float cx, float cy, float distorsionCoeff[4]);
29-
30-
void getMatrix34(float cparam[3][4]) const;
31-
32-
const Matrix33& getIntrinsic() const;
33-
const Vector4& getDistorsion() const;
34-
35-
private:
36-
Matrix33 m_intrinsic;
37-
Vector4 m_distorsion;
38-
};
39-
40-
#endif
1+
/*****************************************************************************
2+
* CameraCalibration.hpp
3+
* Example_MarkerBasedAR
4+
******************************************************************************
5+
* by Khvedchenia Ievgen, 5th Dec 2012
6+
* http://computer-vision-talks.com
7+
******************************************************************************
8+
* Ch2 of the book "Mastering OpenCV with Practical Computer Vision Projects"
9+
* Copyright Packt Publishing 2012.
10+
* http://www.packtpub.com/cool-projects-with-opencv/book
11+
*****************************************************************************/
12+
13+
#ifndef Example_MarkerBasedAR_CameraCalibration_hpp
14+
#define Example_MarkerBasedAR_CameraCalibration_hpp
15+
16+
////////////////////////////////////////////////////////////////////
17+
// File includes:
18+
#include "GeometryTypes.hpp"
19+
20+
/**
21+
* A camera calibraiton class that stores intrinsic matrix
22+
* and distorsion vector.
23+
*/
24+
class CameraCalibration
25+
{
26+
public:
27+
CameraCalibration();
28+
CameraCalibration(float fx, float fy, float cx, float cy);
29+
CameraCalibration(float fx, float fy, float cx, float cy, float distorsionCoeff[4]);
30+
31+
void getMatrix34(float cparam[3][4]) const;
32+
33+
const Matrix33& getIntrinsic() const;
34+
const Vector4& getDistorsion() const;
35+
36+
private:
37+
Matrix33 m_intrinsic;
38+
Vector4 m_distorsion;
39+
};
40+
41+
#endif
Collapse file

‎Chapter2_iPhoneAR/Example_MarkerBasedAR/Example_MarkerBasedAR/EAGLView.h‎

Copy file name to clipboard
100755100644
+40-40Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
/*****************************************************************************
2-
* EAGLView.h
3-
* Example_MarkerBasedAR
4-
******************************************************************************
5-
* by Khvedchenia Ievgen, 5th Dec 2012
6-
* http://computer-vision-talks.com
7-
******************************************************************************
8-
* Ch2 of the book "Mastering OpenCV with Practical Computer Vision Projects"
9-
* Copyright Packt Publishing 2012.
10-
* http://www.packtpub.com/cool-projects-with-opencv/book
11-
*****************************************************************************/
12-
13-
#import <UIKit/UIKit.h>
14-
15-
#import <OpenGLES/ES1/gl.h>
16-
#import <OpenGLES/ES1/glext.h>
17-
#import <OpenGLES/ES2/gl.h>
18-
#import <OpenGLES/ES2/glext.h>
19-
20-
@class EAGLContext;
21-
22-
// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
23-
// The view content is basically an EAGL surface you render your OpenGL scene into.
24-
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
25-
@interface EAGLView : UIView
26-
{
27-
@private
28-
// The OpenGL ES names for the framebuffer and renderbuffer used to render to this view.
29-
GLuint defaultFramebuffer, colorRenderbuffer;
30-
}
31-
32-
@property (nonatomic, retain) EAGLContext *context;
33-
// The pixel dimensions of the CAEAGLLayer.
34-
@property (readonly) GLint framebufferWidth;
35-
@property (readonly) GLint framebufferHeight;
36-
37-
- (void)setFramebuffer;
38-
- (BOOL)presentFramebuffer;
39-
- (void)initContext;
40-
@end
1+
/*****************************************************************************
2+
* EAGLView.h
3+
* Example_MarkerBasedAR
4+
******************************************************************************
5+
* by Khvedchenia Ievgen, 5th Dec 2012
6+
* http://computer-vision-talks.com
7+
******************************************************************************
8+
* Ch2 of the book "Mastering OpenCV with Practical Computer Vision Projects"
9+
* Copyright Packt Publishing 2012.
10+
* http://www.packtpub.com/cool-projects-with-opencv/book
11+
*****************************************************************************/
12+
13+
#import <UIKit/UIKit.h>
14+
15+
#import <OpenGLES/ES1/gl.h>
16+
#import <OpenGLES/ES1/glext.h>
17+
#import <OpenGLES/ES2/gl.h>
18+
#import <OpenGLES/ES2/glext.h>
19+
20+
@class EAGLContext;
21+
22+
// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
23+
// The view content is basically an EAGL surface you render your OpenGL scene into.
24+
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
25+
@interface EAGLView : UIView
26+
{
27+
@private
28+
// The OpenGL ES names for the framebuffer and renderbuffer used to render to this view.
29+
GLuint defaultFramebuffer, colorRenderbuffer, depthRenderbuffer;
30+
}
31+
32+
@property (nonatomic, retain) EAGLContext *context;
33+
// The pixel dimensions of the CAEAGLLayer.
34+
@property (readonly) GLint framebufferWidth;
35+
@property (readonly) GLint framebufferHeight;
36+
37+
- (void)setFramebuffer;
38+
- (BOOL)presentFramebuffer;
39+
- (void)initContext;
40+
@end

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.