Click here to Skip to main content
15,394,560 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: MFC - painting on a secondary modeless dialog with OnPaint() Pin
Richard MacCutchan18-Aug-17 4:35
mveRichard MacCutchan18-Aug-17 4:35 
AnswerRe: MFC - painting on a secondary modeless dialog with OnPaint() Pin
Bonobo818-Aug-17 4:41
MemberBonobo818-Aug-17 4:41 
GeneralRe: MFC - painting on a secondary modeless dialog with OnPaint() Pin
Richard MacCutchan18-Aug-17 6:07
mveRichard MacCutchan18-Aug-17 6:07 
QuestionError in CodeProject article "Calculating a Rich Edit Control Minimum Size" Pin
ForNow15-Aug-17 2:27
MemberForNow15-Aug-17 2:27 
SuggestionRe: Error in CodeProject article "Calculating a Rich Edit Control Minimum Size" Pin
Richard Deeming15-Aug-17 2:53
mveRichard Deeming15-Aug-17 2:53 
AnswerRe: Error in CodeProject article "Calculating a Rich Edit Control Minimum Size" Pin
Jochen Arndt15-Aug-17 3:05
professionalJochen Arndt15-Aug-17 3:05 
GeneralRe: Error in CodeProject article "Calculating a Rich Edit Control Minimum Size" Pin
ForNow15-Aug-17 3:14
MemberForNow15-Aug-17 3:14 
Questionfunction soft thresholding Pin
saidinsan00000000013-Aug-17 3:13
Membersaidinsan00000000013-Aug-17 3:13 
this code correct or no? thank you in advance.
#include <opencv2/highgui/highgui.hpp>
  #include <opencv2/core/core.hpp>
  #include <opencv2/core/mat.hpp>
  #include <opencv2/imgproc/imgproc.hpp>
  #include<iostream>
  #include<math.h>
  
using namespace std;
using namespace cv;
float soft_tresholding(Mat src, float threshold)
{


int height=src.rows;
int width=src.cols;
 for(int y=0; y < height; y++) 
    {
        for(int x=0; x < width; x++) 
        {
            if (src(y*width+x) > threshold)
                src(y*width+x) = src(y*width+x) - threshold;
            else if (src(y*width+x) < -threshold)
                src(y*width+x) = src(y*width+x) + threshold;
            else
                src(y*width+x) = 0;
        }
    }
}
 int main()
{
system("clear");

 Mat src=imread("/home/jamal/Bureau/lena.jpg",0);
Mat dst;
float threshold;
dst=soft_thresholding(src,threshold);	

	namedWindow("Picture", CV_WINDOW_AUTOSIZE); 
	   imshow("Picture", src); 
          namedWindow("picf", CV_WINDOW_AUTOSIZE); 
	   imshow("Picf", dst); 
	   waitKey(); 
        
	return 0;
}


modified 13-Aug-17 9:15am.

AnswerRe: function soft thresholding Pin
Victor Nijegorodov13-Aug-17 7:00
MemberVictor Nijegorodov13-Aug-17 7:00 
GeneralRe: function soft thresholding Pin
David Crow14-Aug-17 4:07
MemberDavid Crow14-Aug-17 4:07 
QuestionC function call question. Pin
samzcs11-Aug-17 3:18
Membersamzcs11-Aug-17 3:18 
AnswerRe: C function call question. Pin
Chris Losinger11-Aug-17 3:36
professionalChris Losinger11-Aug-17 3:36 
GeneralRe: C function call question. Pin
samzcs11-Aug-17 3:50
Membersamzcs11-Aug-17 3:50 
GeneralRe: C function call question. Pin
Chris Losinger11-Aug-17 3:52
professionalChris Losinger11-Aug-17 3:52 
GeneralRe: C function call question. Pin
samzcs11-Aug-17 4:22
Membersamzcs11-Aug-17 4:22 
GeneralRe: C function call question. Pin
«_Superman_»14-Aug-17 15:50
professional«_Superman_»14-Aug-17 15:50 
GeneralRe: C function call question. Pin
Richard MacCutchan11-Aug-17 3:59
mveRichard MacCutchan11-Aug-17 3:59 
GeneralRe: C function call question. Pin
k505411-Aug-17 5:13
mvek505411-Aug-17 5:13 
GeneralRe: C function call question. Pin
k505411-Aug-17 10:35
mvek505411-Aug-17 10:35 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter12-Aug-17 23:47
professionalKornfeld Eliyahu Peter12-Aug-17 23:47 
QuestionRe: C function call question. Pin
David Crow14-Aug-17 2:16
MemberDavid Crow14-Aug-17 2:16 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter14-Aug-17 2:54
professionalKornfeld Eliyahu Peter14-Aug-17 2:54 
QuestionRe: C function call question. Pin
David Crow14-Aug-17 2:57
MemberDavid Crow14-Aug-17 2:57 
AnswerRe: C function call question. Pin
Kornfeld Eliyahu Peter14-Aug-17 4:02
professionalKornfeld Eliyahu Peter14-Aug-17 4:02 
QuestionOut of Memory Exception in C++ Pin
divya0310-Aug-17 2:16
Memberdivya0310-Aug-17 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.