Comments (3)
I have noticed, that instead I could use image[row, column], but what confuses me is, why both exist. Imaga.Data can go out of sync with the real image, if someone uses image[...] = ... to set individual pixel values. So what is the point of imaga.data? Backwards compatibility? One feature neat thing about image.data is that it gives you a TDepths type as return instead of an double.
It would be nice if Image.Data[...] just returns (TDepths)image[].MCvScalar.Vx instead under the hood. Also removes the need to copy data into _array which seems to be not well supported anyway
from emgucv.
So I have noticed, that after changing the access method, everything got veeeeery slow. It is in fact so slow, that even copying the entire image for just accessing 10% of the pixels is way faster. Though I have noticed, that Data is in fact not a copy of the underlying Matrix but uses the same memory. So now I am wondering, why does image[x,y] use marshaling, which is way slower than accessing image.Data[x,y,0-3]. Are there some cases where Image Data is not synced with the underlying cv mat?
If Image[x,y] just accessed image.Data[x,y,0-3] instead, it would be way faster and still have the additional advantage of being able to check the intended range of the image if the image was created as a subimage. Right now GetSubRect is basically unusable without also using Copy. Unless no pixel values are accessed directy in C#
from emgucv.
Image<,>.Data point to the raw data array. The GetSubRect function create a new IplImage header and shared the same raw data with the parent. It doesn't allocate new managed data. The Copy function will allocate new managed data that will have [0,0] array value corresponding to the origin.
IplImage* may be removed in the OpenCV 5.0 release. If that happpens, we will removed the Image<,> class as well. I would remmend migrating to the Mat class instead.
from emgucv.
Related Issues (20)
- EMGUCV 4.8 VideoCapture.Set is not setting desired Width and Height
- [BUG]AvaloniaUI Project with Emgu.CV.runtime.debian-arm64, encountered Segmentation fault error during runtime HOT 1
- [QUESTION] How to Optimize Image Stitching HOT 3
- [FEATURE] Adding GStreamer when building a project on Debian
- [FEATURE] - Support use of ReadOnly/Span in APIs HOT 5
- [Question] Replace OpenCv default dlls with other OpenCv build HOT 17
- [BUG] For certain FPS settings VideoWriter creation fails with "make sure you have the specific codec installed" HOT 1
- Attempting to JIT compile method "(wrapper native-to-managed) int Emgu.CV.CvInvoke:CvErrorHandler (int,intptr,intptr,intptr,int,intptr)" while running in aot-only mode. HOT 2
- [BUG] ./cmake_configure run ends with an error HOT 1
- [BUG] Emgu on Raspberrypi error - global cap_v4l.cpp:1134 tryIoctl HOT 1
- [BUG] GetSpan with ROI crash application with violation of memory access HOT 1
- [BUG/QUESTION] DllNotFoundException cvextern on Ubuntu raspberry pi arm64 - What am I missing? HOT 2
- [BUG] Emgu.CV.runtime.maui.mini - CvInvokeIOS constructor crashes immediately upon app start HOT 5
- VideoWriter fallback when using H264
- [BUG] VideoWriter fails to initialize on Docker HOT 3
- CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.Release.cmake:280 (message): HOT 1
- [BUG] VideoCapture.Start is very CPU intensive HOT 3
- Request for emgucv support to RHEL 8 HOT 1
- Does it support Image URL comparison HOT 1
- Emgu and App SDK ( WinUI 3 ): Unable to create BitmapImage or ImageSource HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emgucv.