ankitdhall / imagesegmentation Goto Github PK
View Code? Open in Web Editor NEWImage Segmentation using Texture and Color features in C++
License: MIT License
Image Segmentation using Texture and Color features in C++
License: MIT License
Thank you for sharing the code! But can you share the theory about color and texture , my theory is very bad . Best wish!!!
int nextSegment = (int)col.at(next.yjump, next.xjump);
int nextTotalPixels = pixelsInArea[nextSegment-1];
here, when the value nextSegment is 24, the size of pixelsInArea is 14, so erros occured, vector subscript out of range.
I try to compile it but it does not result me...
g++ -lm `pkg-config --cflags opencv` -o color.o -c color.cpp
g++ -lm `pkg-config --cflags opencv` -o histogram.o -c histogram.cpp
g++ -lm `pkg-config --cflags opencv` -o texture.o -c texture.cpp
g++ -lm `pkg-config --cflags opencv` -o main.o -c main.cpp
g++ -lm -o out header.h main.o color.o histogram.o texture.o `pkg-config --libs opencv`
I run the official demo, but there is a core-dumped.
int seedTotalPixels = pixelsInArea[seedSegment-1];
When seedSegment is 0, core dump with OpenCV 3.3.1
in texture.cpp a function named: Mat segmentTexture() has a loop question:
do
{
seedPoint.x=rng.uniform(0, texture.cols);
seedPoint.y=rng.uniform(0, texture.rows);
seed=texture.at(seedPoint.y, seedPoint.x);
}
while(mark.at(seedPoint.y, seedPoint.x) !=0 );
if this region are all 0, it will not end. So could add a conditon:
int cout_num = 0;
do
{
seedPoint.x=rng.uniform(0, texture.cols);
seedPoint.y=rng.uniform(0, texture.rows);
seed=texture.at<Vec4b>(seedPoint.y, seedPoint.x);
cout_num++;
}
while(mark.at<uchar>(seedPoint.y, seedPoint.x) !=0 && cout_num <= 50);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.