Questions tagged [blur]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

Incorrect blur for filtermore

for this problem, I have opted to use a strategy where I create a 1 pixel border in a copy image with RBG values = 0, to avoid running into segmentation errors when trying to access a pixel. I also ...
Kik's user avatar
  • 1
0 votes
2 answers
35 views

pset4 blur; artifacts on a white parts of an image

I believe I've done this part of filter-more task pretty well, but, unfortunately, an output image has some artifacts - blur works badly with white parts of an image. void blur(int height, int width, ...
REJEN RJ's user avatar
0 votes
0 answers
33 views

PSET4 filter-less: black screen when running blur function

I am currently working on the blur function, in filter-less. I am greeted woth a black screen when I run the function, and I'm unsure what part of my code is causing this to happen. Here is my code as ...
Robbie's user avatar
  • 5
0 votes
0 answers
16 views

Can't figure out what is wrong with my blur code

void blur(int height, int width, RGBTRIPLE image[height][width]) { // DEFINE ONE STRUCT TO ACT AS BUFFER MEANWHILE CALCULATING AVERAGE RGBTRIPLE buffer[height][width]; // GO THROUGH EACH ...
Krakard's user avatar
0 votes
0 answers
19 views

PSET 4 filter-more blur returns a weird psychedelic image

So I'm completely stumped. As far as I know, the logic is correct, as when I use debug50 and follow which conditional each pixel we're looking at right now goes through, it goes through what seems to ...
Jules Castel's user avatar
0 votes
1 answer
89 views

pset4 filter-more All functions work when I test it but check50 gives error

I struggled a long time with this problem, and I saw other people had almost the same question and got answers but I didn't get to solve the problem. All four functions seems to work but when I test ...
Jareg's user avatar
  • 3
0 votes
1 answer
161 views

CS50 PSET 4 Filter-less, Blur function not filtering 3x3 and 4x4 images correctly

I have read many similar problems on here about the same issue. I believe my function is correct, although redundant and not very stylish. It should however get the job done. I get the same pixels ...
BrassyGiraffe's user avatar
0 votes
1 answer
51 views

PSET4 Blur - Issue understanding what am I doing wrong

I have been stuck on this problem for around 2 weeks, and I have no idea what am I doing wrong... I would like some hint to what I am doing wrong, in which part of code it might be, etc.. My code ...
ThatLinuxGuy's user avatar
0 votes
1 answer
174 views

[SOLVED]PSET-4 - Filter - Blur - blur correctly filters pixel in corner

I am getting these 3 errors on check50: blur correctly filters pixel in corner expected "70 85 95\n", not "69 192 95\n" blur correctly filters 3x3 image expected "70 ...
heyharshal's user avatar
0 votes
1 answer
352 views

Filter less, Blur, why does my code not blur the edge and 3x3 and 4x4 image?

I am stuck at the blur function in filter less. Your task is to calculate the average RGB value of the surrounding pixel in one row and one column of a bmg image, including the middle pixel. It works ...
Karl's user avatar
  • 5
0 votes
1 answer
114 views

Filter blur errors

I'm working on the filter-less problem in pset4. I've got all of my functions to work properly except for the blur function. I am getting the following errors I believe due to problems with how I'm ...
getsendy's user avatar
0 votes
1 answer
87 views

Trying to complete Blur, need a little help. I've rewritten several times I've tried pointers and variables inside and outside the function

I changed this a few times, I tried to condense it, but now the NULL check gives me an error message // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[...
Stevek's user avatar
  • 1
0 votes
1 answer
188 views

Image blurs but check50 fails for filter less. Why?

The image is blurry and everything seems to work fine. But check50 fails. Hence, I am not sure where I made the mistake. // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) {...
Sakib Arifin's user avatar
0 votes
1 answer
79 views

Filter (more) blur function fails check50

I've hit a bit of a brick wall writing a blur function for filter (more). This is my second go at refactoring the code, and although it produces a blurred image without any issues (no weird edges, ...
leftcase's user avatar
  • 113
0 votes
1 answer
37 views

My Red and Blue values are wrong but all my green values are correct. It's pretty simple what i've done. What am I missing ? Please help

void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE tmpimage[height][width]; for (int i = 0; i < height ; i++) { for (int j = 0; j < width; j++) ...
voko axecer's user avatar
1 vote
1 answer
47 views

Pset4 Blur filter (more comfortable) assign new struct to image does not work

I was trying to use the following code to complete the blur function. Everything seems fine but I just couldn't update the RGBTRIPLE variable image directly with another RGBTRIPLE variable I crreated. ...
adxyadxy's user avatar
1 vote
1 answer
103 views

Pset4 Filter (Less) - Invalid operands to binary expression (Int and RGBTRIPLE)

Hello. I'm facing a problem trying to compile this code. I got the error msg Invalid operands to binary expression ('int' and 'RGBTRIPLE') void blur (int height, int width, RGBTRIPLE image[height][...
Min Wai's user avatar
  • 11
0 votes
1 answer
141 views

Blur in cs50 problem set 4

My code for the blur filter works fine to edge, corner and middle pixels, but it doesnt work right for a whole 3x3 or 4x4 picture i've been trying everything but nothing seems to fix it. This is what ...
Ricardo Morim's user avatar
2 votes
1 answer
1k views

Questions regarding pset4 Blur filter (less comfortable)

After tinkering for a while with why my filter didn't work, I finally succeded with the following code: // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { //make copy ...
Miloš Nenadić's user avatar
1 vote
1 answer
2k views

My CS50 PSET4 Filter (Less) Blur function doesn't pass check50 despite seemingly working fine

I've been working on CS50 PSET4 Filter (Less) and finally got a working blur function (or so I thought!) // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE ...
jonathandavis's user avatar
0 votes
1 answer
76 views

style50 weird result

I have a really really long lines for blur function. when I pass it to style50 it asks me to change code style to this: for (int j = 1; j < width - 1 ; j++) { image[i][j].rgbtRed = ...
Mohammad Sadra Sharifzadeh's user avatar
0 votes
1 answer
22 views

PSET4 LESS BLUR function -Ending Edges problem

My code works fine but for the ending edges not. I mean the right & bottom edges values. Here is my code : void blur(int height, int width, RGBTRIPLE image[height][width]) { // h = 400 w = ...
Ahmed Elbessfy's user avatar
0 votes
0 answers
70 views

My Filter program is not blurring the image correctly. And it is not able to open the input file. It shows it as NULL

Here is my code: #include"helpers.h" #include<math.h> #include<stdio.h> #include<stdlib.h> // Convert image to grayscale void grayscale(int height, int width, RGBTRIPLE ...
Fatmah Faridi's user avatar
1 vote
1 answer
543 views

PSET4 filter less Blur function

I am stuck in Pset4-Filter/less the Blur function in particular. My problem is the image blurred correctly but does not pass check50. Check50 result : :( blur correctly filters middle pixel >> ...
Ahmed Elbessfy's user avatar
0 votes
1 answer
151 views

pset4 filter blur less got stuck

i have been working on blur and it works just fine as i run it. but when i run check50 i get this : :( blur correctly filters middle pixel expected "127 140 149\n", not "145 160 169\n&...
esma hancer's user avatar
0 votes
1 answer
110 views

pset4 filter. Blur image compiles goed but does'nt pass the check50 lots of error

The code in helpers.c all images compiles exept for the Blur image it compiles without any errors. But doesn't pass the cs50 check? any suggestions only the Blur image section. Thanks // Blur ...
Matrix's user avatar
  • 67
1 vote
2 answers
46 views

Blur PSet4 (Filter) - Compilation errors passing reference to the image[height][width] array in helper function using pointers

I'm having a brainfart wrapping my head around the use of pointers when trying to pass a reference to the image 2D array in a helper function that I created to assist in the blur effect. Here's blur: ...
Alex's user avatar
  • 11
0 votes
1 answer
119 views

PSET4 Blur not passing Check50

My code seems to work (when visually inspecting output files), but Check50 does not pass it. I'm struggling to understand what is causing this issue despite having repeatedly read over the code and ...
braninpodolski's user avatar
1 vote
2 answers
100 views

Cleaning up PSET4 Blur

I have successfully finished the blur effect on PSET4. Here is a small smattering of the code if(i - 1 >= 0 && j - 1 >= 0) { red += OgImage[i-1][j-1]....
Multiplify's user avatar
0 votes
1 answer
118 views

Check50 shows errors on Blur Function, Filter even though images are blurred

My blur function seems to be working when I input the sample images and open the output file but check50 shows 4/5 errors :( blur correctly filters middle pixel expected "127 140 149\n", not ...
ehsansth's user avatar
0 votes
1 answer
74 views

Pset4 Im having issues with the blur filter

Im extremely close to solve this problem, this is the result of check50 :) helpers.c exists :) filter compiles :) grayscale correctly filters single pixel with whole number average :) grayscale ...
Ronny Groin's user avatar
1 vote
1 answer
176 views

Blur - I'm so close, but yet not 100%

Apologises for the long post: I wanted to be as explicit in my logic as possible The code I've written uses the following logic to box blur: Use nested for loop to access each pixel in image Check ...
user13641095's user avatar
0 votes
1 answer
320 views

Pset4 filter blur corner

I finished the other filters and just the blur filter is giving errors. The errors are the following: :) blur correctly filters pixel on edge :( blur correctly filters pixel in corner expected &...
João Victor Schiavon's user avatar
0 votes
1 answer
325 views

Segmentation fault in blur filter

This is my code for the blur filter in the pset 4. First I used the average for the corner pixels, then I used a loop for the average of the first and last row and columns and then a nested loop for ...
guillermofd's user avatar
0 votes
1 answer
41 views

PSET4 Filter less BLUR

I want to check if the array exists for the edges so I've been trying to check if the block is NULL. if (image[i-1][j-1] != NULL); { redAverage+=image[i-1][j-1].rgbtRed; ...
frostyf33t's user avatar
0 votes
1 answer
48 views

pset4 Blur calculation does not work properly

for some reason I can't get my calculation for the blur value running. The pictures are really odd and contain crazy colors. Any ideas to why this could be the case? I compared it already to working ...
Joesns's user avatar
  • 3
1 vote
1 answer
43 views

My blur function blurs every image, but fails every check50 check - please help!

I'd really appreciate any help that can be offered here. My code seems to output a blurred image perfectly, but fails every check50 check and I can't work out why... void blur(int height, int width, ...
James Rosen's user avatar
0 votes
1 answer
92 views

Pset 4 filter blur function - only works with corner pixel

requesting help for my blur function. For each pixel, i have split it into 3 for loops. One calculating the row above, same row, and row below. In each loop , if the row is smaller than 0 or equal to ...
Bob Tan's user avatar
0 votes
1 answer
51 views

How to conserve original values in blur function? (pset 4)

Here's my code inside the blur function (in pset 4, Filter-Less): int redSum; int greenSum; int blueSum; int n; for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { ...
Rodri-97's user avatar
-1 votes
1 answer
154 views

pset4/filter: What is being instantiated with RGBTRIPLE(*image)[width]

I'm struggling to get my head around what is being instantiated here with (*image) (and what to do with it) in this line: RGBTRIPLE(*image)[width] = calloc(height, width * sizeof(RGBTRIPLE)); I ...
ron_g's user avatar
  • 99
0 votes
1 answer
61 views

Problem Set 4 Blur --- incorrect output

I am currently working at the blur filter. While the other task were pretty easy, this one ist very much difficult. I have spend hours looking for the mistake - but without success, I tried to do it ...
CodingForFun's user avatar
0 votes
1 answer
55 views

Need help solving blur with c

Code: void blur(int height, int width, RGBTRIPLE image[height][width]) { //temporary image to swap RGBTRIPLE temp_img[height][width]; for (int g = 0; g < height; g++) { for (int h = 0; h < ...
Gloria Isedu's user avatar
0 votes
1 answer
48 views

Pset 4 Filter(less) Blur

I'm having an issue with the counter variable of my code. I wrote a printf to see if it returns 4, 6, or 9. Which is what it should do, if my IF conditions are correct. Unfortunately it does not ...
Angie's user avatar
  • 3
0 votes
1 answer
180 views

I don't understand the error message I'm getting

I don't understand the error message, and i've been trying to modify the code to fix the error but it still appears. // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
Gloria Isedu's user avatar
0 votes
0 answers
48 views

Problem with filter (pset 4): Blur and edge

All the filters on the filter program work well, but check50 is giving me a few errors, which I think, is due to rounding issues. But, I have checked and re-checked the code for those errors, and ...
1001-0101-0100's user avatar
0 votes
1 answer
103 views

PSET4 Filter Blur by 4 nested for loops

I am trying to implement my idea on Blur function. My main assumption is to get this done using nested 4 for loops as follow: void blur(int height, int width, RGBTRIPLE image[height][width]) { ...
piotrektnw's user avatar
1 vote
2 answers
74 views

Blur only working with middle pixel

I've been stuck in this problem for a while, and the code only works when its inputted a middle pixel. Does anyone have a clue? I've searched everywhere for this particular issue, but I have only ...
fer 545's user avatar
  • 11
1 vote
1 answer
89 views

pset4 filter - only blurs the corners correctly

i can`t get the picture blurred at all (it comes out a complete mash up of colours blended together ...) ...i' ve been trying to figure this out for months now :(( HELP! void blur(int height, int ...
andream's user avatar
  • 109
0 votes
1 answer
82 views

CS50 Pset4 Blur

Greatings fellow Humans So I am about at my wit's end with this one. I have set it all out and have the maths (I beleive) correct on the averages. BUT... check 50 says that some of the averages are ...
EdCase's user avatar
  • 7
0 votes
1 answer
98 views

My helpers doesn't pass check50

my helpers doesn't pass check50 and I don't know why. This is the code: #include "helpers.h" #include <math.h> // Convert image to grayscale void grayscale(int height, int width, ...
Gloria Isedu's user avatar