Questions tagged [blur]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 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 ...
user avatar
  • 3
0 votes
0 answers
8 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 ...
user avatar
0 votes
0 answers
3 views

YOUR OPINION IS APPRECIATED, pset4, less comfortable, BLUR code, SPOILER

... Fellow Students of CS50, I have finished the problem pset4/filter-less. I would appreciate if more experienced programmers take a look at my code and provide comments, observations, suggestions. I'...
user avatar
0 votes
0 answers
10 views

pset4, blur, filter-less ...using POINTERS and NULL character

I've been working on blur from PSET4, filter-less for about a week now. I've been trying to filter those pixels with no content by copying the image pixels into a pointers array. Then, I paste NULL ...
user avatar
0 votes
1 answer
22 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

It looks like it correctly blurs the photo, but the test on 3x3 and 4x4 are slightly off // Blur image void blur(int height, int width, RGBTRIPLE image[height][width]) { RGBTRIPLE copy[height][width]; ...
user avatar
  • 1
0 votes
2 answers
40 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]) {...
user avatar
0 votes
0 answers
19 views

pset4 blur loop passing but not sure why

I've been working on the blur segment for a while now, trying many different iterations of its code. I finally got it down to where it (kind of) passed with this code with the exception of two checks: ...
user avatar
0 votes
1 answer
50 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, ...
user avatar
  • 103
0 votes
1 answer
16 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++) ...
user avatar
0 votes
0 answers
23 views

PSET 4 Blur - How to construct logical flow to average values without many IF statements?

I'm working on the Filter-more Blur problem, and I'm having trouble translating my ideas from paper to code. My first thought was to have many IF statements that would take care of the specific cases (...
user avatar
1 vote
1 answer
35 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. ...
user avatar
0 votes
1 answer
38 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][...
user avatar
0 votes
1 answer
59 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 ...
user avatar
2 votes
1 answer
89 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 ...
user avatar
0 votes
0 answers
64 views

Pset4 Blur and Edge check50 problem with 3 x 3 image and 4 x 4 image

For both edge and blur check50 is saying: :( blur correctly filters 3x3 image expected "70 85 95\n80 9...", not "70 85 95\n80 9..." :( blur correctly filters 4x4 image expected &...
user avatar
0 votes
0 answers
7 views

pset4 (more comfortable) blur

coded only for the middle pixels first but result was a complete mess! how do i retain the pixels information after its use for other pixels i think that is the most prominent problem with my code? // ...
user avatar
1 vote
1 answer
869 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 ...
user avatar
0 votes
0 answers
33 views

CS50 Problem Set 4 filter less blur: please help debugging

//:( blur correctly filters 3x3 image expected "70 85 95\n80 9...", not "70 85 95\n80 9..." //:( blur correctly filters 4x4 image expected "70 85 95\n80 9...", not "...
user avatar
0 votes
1 answer
36 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 = ...
user avatar
0 votes
1 answer
18 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 = ...
user avatar
0 votes
0 answers
67 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 ...
user avatar
0 votes
1 answer
296 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 >> ...
user avatar
0 votes
1 answer
84 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&...
user avatar
0 votes
1 answer
80 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 ...
user avatar
  • 47
0 votes
2 answers
40 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: ...
user avatar
  • 1
0 votes
1 answer
76 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 ...
user avatar
1 vote
2 answers
73 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]....
user avatar
0 votes
1 answer
58 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 ...
user avatar
0 votes
1 answer
66 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 ...
user avatar
1 vote
1 answer
99 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 ...
user avatar
0 votes
1 answer
192 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 &...
user avatar
0 votes
1 answer
210 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 ...
user avatar
0 votes
1 answer
32 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; ...
user avatar
0 votes
1 answer
44 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 ...
user avatar
  • 3
1 vote
1 answer
31 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, ...
user avatar
0 votes
1 answer
65 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 ...
user avatar
0 votes
1 answer
41 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++) { ...
user avatar
0 votes
1 answer
95 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 ...
user avatar
  • 101
0 votes
1 answer
50 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 ...
user avatar
0 votes
1 answer
49 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 < ...
user avatar
0 votes
1 answer
44 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 ...
user avatar
  • 3
0 votes
1 answer
72 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]) { ...
user avatar
0 votes
0 answers
47 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 ...
user avatar
0 votes
1 answer
66 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]) { ...
user avatar
1 vote
2 answers
55 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 ...
user avatar
  • 11
1 vote
1 answer
62 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 ...
user avatar
  • 109
0 votes
1 answer
69 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 ...
user avatar
  • 7
0 votes
1 answer
82 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, ...
user avatar
0 votes
1 answer
56 views

Pset4 filter problem: blur problem Runtime Error

I'm working on a solution to Pset4 blur and have hit a roadblock. My aim is to create average RGB values from a 3x3 grid surrounding and including current pixel and change pixel in original image to ...
user avatar
0 votes
1 answer
40 views

Pset4 Blur filter, loop for searching surrounding pixels

I'm trying to write the part of the code where the surrounding pixels around the main pixel are searched in order to make the average and later replace the main value for the average value. I am ...
user avatar