Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Fixing: some header issues. #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cv/canny.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "canny.h"
#include "sobel.h"
#include "opencv2/core/core.hpp" // needed for IplImage
#include "opencv2/core/internal.hpp"
#include "opencv2/core/private.hpp"

#if DMZ_HAS_NEON_COMPILETIME
#include <arm_neon.h>
Expand Down
3 changes: 3 additions & 0 deletions cv/conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// See the file "LICENSE.md" for the full license governing this code.
//

#include <stdint.h>
#include <assert.h>

#include "compile.h"
#if COMPILE_DMZ

Expand Down
6 changes: 3 additions & 3 deletions cv/image_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
DMZ_INTERNAL uint8_t llcv_get_pixel_step(IplImage *image) {
uint8_t pixel_step = 0;
switch(image->depth) {
case IPL_DEPTH_8S:
case (int) IPL_DEPTH_8S:
case IPL_DEPTH_8U:
pixel_step = sizeof(uint8_t);
break;
case IPL_DEPTH_16U:
case IPL_DEPTH_16S:
case (int) IPL_DEPTH_16S:
pixel_step = sizeof(uint16_t);
break;
case IPL_DEPTH_32F:
case IPL_DEPTH_32S:
case (int) IPL_DEPTH_32S:
pixel_step = sizeof(uint32_t);
break;
case IPL_DEPTH_64F:
Expand Down
12 changes: 6 additions & 6 deletions cv/sobel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,18 @@ DMZ_INTERNAL void vectorized_convolve_transpose7(IplImage *image, IplImage *dest

int16_t kernels[8][8] = {
// leading edge replication
{kernel7[0] + kernel7[1] + kernel7[2] + kernel7[3], kernel7[4], kernel7[5], kernel7[6], 0, 0, 0, 0},
{kernel7[0] + kernel7[1] + kernel7[2], kernel7[3], kernel7[4], kernel7[5], kernel7[6], 0, 0, 0},
{kernel7[0] + kernel7[1], kernel7[2], kernel7[3], kernel7[4], kernel7[5], kernel7[6], 0, 0},
{(int16_t)(kernel7[0] + kernel7[1] + kernel7[2] + kernel7[3]), kernel7[4], kernel7[5], kernel7[6], 0, 0, 0, 0},
{(int16_t)(kernel7[0] + kernel7[1] + kernel7[2]), kernel7[3], kernel7[4], kernel7[5], kernel7[6], 0, 0, 0},
{(int16_t)(kernel7[0] + kernel7[1]), kernel7[2], kernel7[3], kernel7[4], kernel7[5], kernel7[6], 0, 0},

// main body
{kernel7[0], kernel7[1], kernel7[2], kernel7[3], kernel7[4], kernel7[5], kernel7[6], 0},

// trailing edge replication
{0, kernel7[0], kernel7[1], kernel7[2], kernel7[3], kernel7[4], kernel7[5], kernel7[6]},
{0, 0, kernel7[0], kernel7[1], kernel7[2], kernel7[3], kernel7[4], kernel7[5] + kernel7[6]},
{0, 0, 0, kernel7[0], kernel7[1], kernel7[2], kernel7[3], kernel7[4] + kernel7[5] + kernel7[6]},
{0, 0, 0, 0, kernel7[0], kernel7[1], kernel7[2], kernel7[3] + kernel7[4] + kernel7[5] + kernel7[6]}
{0, 0, kernel7[0], kernel7[1], kernel7[2], kernel7[3], kernel7[4], (int16_t)(kernel7[5] + kernel7[6])},
{0, 0, 0, kernel7[0], kernel7[1], kernel7[2], kernel7[3], (int16_t)(kernel7[4] + kernel7[5] + kernel7[6])},
{0, 0, 0, 0, kernel7[0], kernel7[1], kernel7[2], (int16_t)(kernel7[3] + kernel7[4] + kernel7[5] + kernel7[6])}
};

for(uint16_t row_index = 0; row_index < imageSize.height; row_index++) {
Expand Down
6 changes: 5 additions & 1 deletion cv/stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "processor_support.h"

#include "opencv2/core/core.hpp"
#include "opencv2/core/internal.hpp" // used in llcv_equalize_hist
#include "opencv2/core/private.hpp" // used in llcv_equalize_hist

#if DMZ_HAS_NEON_COMPILETIME
#include <arm_neon.h>
Expand Down Expand Up @@ -145,6 +145,10 @@ DMZ_INTERNAL void llcv_equalize_hist(const IplImage *srcimg, IplImage *dstimg) {
{
sum += hist[i];
int val = cvRound(sum*scale);

#undef CV_CAST_8U
#define CV_CAST_8U(t) (uchar)(!((t) & ~255) ? (t) : (t) > 0 ? 255 : 0)

lut[i] = CV_CAST_8U(val);
}

Expand Down
2 changes: 1 addition & 1 deletion cv/warp.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DMZ_INTERNAL bool llcv_warp_auto_upsamples();

// unwarps input image, interpolating image such that src_points map to dst_rect coordinates.
// Image is written to output IplImage.
void llcv_unwarp(void *dmz, IplImage *input, const dmz_point src_points[4], const dmz_rect dst_rect, IplImage *output);
void llcv_unwarp(dmz_context *dmz, IplImage *input, const dmz_point src_points[4], const dmz_rect dst_rect, IplImage *output);

// Solves and writes perpsective matrix to the matrixData buffer.
// If matrixDataSize >= 16, uses a 4x4 matrix. Otherwise a 3x3.
Expand Down
Loading